Have Trainwreck of an OBJ File - What Files Do I Need?

General discussion and questions about XNALara go here.

Moderators: ObscureMemories, Runa, Love2Raid

Post Reply
JCVGN
Posts: 2
Joined: Tue Mar 16, 2021 12:49 pm

Have Trainwreck of an OBJ File - What Files Do I Need?

Post by JCVGN »

Hello, I have a .obj model with three JPG textures - a (base color, diffuse, and roughness). That's it, nothing else.

When I load the .obj into XNA (under Modify- Load Generic Item/Load Static .obj) the textures are not applied so the model is that base greyish/white.
There are no error messages or anything.

What files do I need to have the textures applied to the model?
User avatar
XNAaraL
XPS Author
Posts: 120
Joined: Fri Sep 21, 2012 9:01 am

Re: Have Trainwreck of an OBJ File - What Files Do I Need?

Post by XNAaraL »

JCVGN wrote:Hello, I have a .obj model with three JPG textures - a (base color, diffuse, and roughness). That's it, nothing else.

When I load the .obj into XNA (under Modify- Load Generic Item/Load Static .obj) the textures are not applied so the model is that base greyish/white.
There are no error messages or anything.

What files do I need to have the textures applied to the model?
You need the .mtl file (Wavefront Material Template Library (MTL) File Format).
The ASCII-based MTL file describes textures to be applied to polygonal facets defined in an OBJ file.


....

Or just use the "XPS-->Modify-->Material Editor" to assign the textures.


BTW:
I am sure, there is a error message ;) Just switch "Config-->Show warnings" to On :pi:
JCVGN
Posts: 2
Joined: Tue Mar 16, 2021 12:49 pm

Re: Have Trainwreck of an OBJ File - What Files Do I Need?

Post by JCVGN »

Hello, thank you for the reply. Is there a way I can tell which texture goes with which in the material editor?
User avatar
XNAaraL
XPS Author
Posts: 120
Joined: Fri Sep 21, 2012 9:01 am

Re: Have Trainwreck of an OBJ File - What Files Do I Need?

Post by XNAaraL »

Sure.
Just show me your .mtl file. :ohn:

map_Kd --> diffuse map
map_Ka --> lightmap map
map_bump or map_Kn --> bump map
map_Kd --> specular map
ilego
Posts: 4
Joined: Sat Nov 03, 2018 2:40 pm

Re: Have Trainwreck of an OBJ File - What Files Do I Need?

Post by ilego »

XNAaraL wrote: Sun Mar 21, 2021 1:43 am
JCVGN wrote:Hello, I have a .obj model with three JPG textures - a (base color, diffuse, and roughness). That's it, nothing else.

When I load the .obj into XNA (under Modify- Load Generic Item/Load Static .obj) the textures are not applied so the model is that base greyish/white.
There are no error messages or anything.

What files do I need to have the textures applied to the model?
You need the .mtl file (Wavefront Material Template Library (MTL) File Format).
The ASCII-based MTL file describes textures to be applied to polygonal facets defined in an OBJ file.


....

Or just use the "XPS-->Modify-->Material Editor" to assign the textures.


BTW:
I am sure, there is a error message ;) Just switch "Config-->Show warnings" to On :pi:
And to get the Xps to OBJ?
PM me if u reply
Post Reply