March 20, 2019, 03:54:45 AM

Author Topic: 3DS Texture problem  (Read 490 times)

Offline Borislav

  • Jr. Member
  • **
  • Posts: 42
3DS Texture problem
« on: November 02, 2018, 10:00:15 AM »
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.
Code: [Select]
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

Offline RemiD

  • Hero Member
  • *****
  • Posts: 801
Re: 3DS Texture problem
« Reply #1 on: November 02, 2018, 07:26:04 PM »
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)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 351
Re: 3DS Texture problem
« Reply #2 on: November 03, 2018, 03:38:13 AM »
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.

Offline Borislav

  • Jr. Member
  • **
  • Posts: 42
Re: 3DS Texture problem
« Reply #3 on: November 03, 2018, 11:13:29 AM »
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.

Offline Borislav

  • Jr. Member
  • **
  • Posts: 42
Re: 3DS Texture problem
« Reply #4 on: November 03, 2018, 11:20:38 AM »
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.