3DS Texture problem

Started by Borislav, November 02, 2018, 10:00:15

Previous topic - Next topic

Borislav

Hello, I used 3DS and I encountered some problems with texturing the models.
As I had some issues with my B3D add-on, I used 3DS rather than using B3D as I did for some other models(the textures worked for B3D).
When I used 3DS, my textures weren't displayed correctly.
The first 2 pictures are from OpenB3D where 3DS doesn't work and the second 2 pictures are from Blitz3D where 3DS works.
It does show the correct colour(kind of) but it doesn't show the texture.
I am using OpenB3D and BlitzMax NG.
Local bench1:tmesh = LoadMesh("assets/mesh/bench.3ds")
Local benchtexture:TTexture = LoadTexture("assets/img/tex/bench.png")
EntityTexture bench1, benchtexture
PositionEntity bench1,10,0,0


RemiD

#1
Why not use a .b3d mesh ?

Alternatively you can apply a texture to a surface using a brush (similar to a material)

I would also check that the texture(s), UVs, material color, of the surface of your mesh is correct, using others mesh editors/analyzers (like Fragmotion or b3d hacker)

markcwm

Hello Borislav,

the 3DS loader is still a WIP, I'll need to test more to find out why textures are't working, I've only tested with a few Blitz3d models, if you email me your models I can debug with them. What modeller where they exported from?

There are actually 2 sets of loaders, the library one or the native/Bmx one, which is a different loader ported from Warner engine (this one loads from zip/incbin, does vertex transforms and loads meshes as children). I made the Bmx loader the default, to change you use: MeshLoader("cpp") the textures should work fine with that one. You will need to reorient the model as 3DS swaps the y/z axis, so use: mesh.RotateMesh(-90,180,0) or RotateAnimMesh if there are children.

Borislav

Quote from: RemiD on November 02, 2018, 19:26:04
Why not use a .b3d mesh ?

Alternatively you can apply a texture to a surface using a brush (similar to a material)

I would also check that the texture(s), UVs, material color, of the surface of your mesh is correct, using others mesh editors/analyzers (like Fragmotion or b3d hacker)
As I said, my B3D add-on is broken.
It gives me an error that it has no attribute "register".
That's why I tried using 3DS instead.

Borislav

Quote from: markcwm on November 03, 2018, 03:38:13
Hello Borislav,

the 3DS loader is still a WIP, I'll need to test more to find out why textures are't working, I've only tested with a few Blitz3d models, if you email me your models I can debug with them. What modeller where they exported from?

There are actually 2 sets of loaders, the library one or the native/Bmx one, which is a different loader ported from Warner engine (this one loads from zip/incbin, does vertex transforms and loads meshes as children). I made the Bmx loader the default, to change you use: MeshLoader("cpp") the textures should work fine with that one. You will need to reorient the model as 3DS swaps the y/z axis, so use: mesh.RotateMesh(-90,180,0) or RotateAnimMesh if there are children.
I used Blender for my meshhes.
Thank you, I will try to do that.