Xonotic Forums
[SOLVED] Help with a Model: OBJ textures missing - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4)
+--- Thread: [SOLVED] Help with a Model: OBJ textures missing (/showthread.php?tid=1267)



Help with a Model: OBJ textures missing - Minkovsky - 11-27-2010

So I'm working on another map, Lost Temple (purely assault), and I'm hoping to finish the work and be ready for the first compile when my new graphics card arrives (nVidia GTX-470 based). So I started mapping it out, I have the layout ready and some concept of doing this. One of the concepts is to create a terrain with model details. I'm using OBJ format since no MD3 exporter would work for me (Blender 2.55). So I've created first few elements today - the Temple (defenders' base), and a rock on which the temple would stand. The latter one was created in Blender, and is pretty high-poly (since I used the sculpting tool for this). However, when I import it into Radiant, the textures wouldn't show (however the UV was preserved).

I tried renaming the texture paths that worked in Blender into relative game paths (ie.
//xonotic-maps.pk3dir/textures/terrain01x/ground/ice01.tga → /textures/terrain01x/ground/ice01.tga), but it didn't work. How can I fix this?


RE: Help with a Model: OBJ textures missing - tZork - 11-28-2010

If if only uses one texture, the simple fix is using the _remap misc_model key, like this: add a key to your misc_model named "_remap", enter its value as "*;some/texture-shader/youwant"
Blender has a rather low limit on how long material names can be, unfortunately, this often messes things up.
Another option is to use .ase instead of obj, as ase is a text-file its easy to correct the material names whit your favorite text-editor.


RE: Help with a Model: OBJ textures missing - Minkovsky - 11-28-2010

(11-28-2010, 12:36 AM)tZork Wrote: If if only uses one texture, the simple fix is using the _remap misc_model key, like this: add a key to your misc_model named "_remap", enter its value as "*;some/texture-shader/youwant"
Blender has a rather low limit on how long material names can be, unfortunately, this often messes things up.
Another option is to use .ase instead of obj, as ase is a text-file its easy to correct the material names whit your favorite text-editor.

Will _remap work with a shader? I mean, ice01 _has_ a shader script.


RE: Help with a Model: OBJ textures missing - tZork - 11-29-2010

no, its only works as a entity key. If it has a shader, its either referenced with the wrong name in the model, or the shader is broken.


RE: Help with a Model: OBJ textures missing - sev - 11-30-2010

.obj models are text files as well. You can open them in a text editor.
Look for the line starting with usemtl.
Shader names should not include the file extension. They should be identical to the shader name that is used in the respective .shader file.

In your case, it should be something like this: usemtl textures/terrain01x/ground-ice01
(which is the shader name defined in scripts/terrain01x.shader)


RE: Help with a Model: OBJ textures missing - theShadow - 11-30-2010

when I add the launchpad model in radiant, the textures do not show, but once I compile it and load it into the game, they do.

might this be what is happening?


RE: Help with a Model: OBJ textures missing - BARTUC - 12-10-2010

Hi all, I use this topic because i got similar problem using a .obj model inside Nexuiz/Xonotic.
First of all my question is : obj model needs UV map when i’m using only a texture for all the model ??? Yes or not, dunno because i going to be crazy for this model.

My problem is born when i tryed to export my noob creation : http://www.midiverto.net/images/2021.khe_Screenshot.jpg
and using it inside Nexuiz.
After compiling i gain this : http://www.midiverto.net/images/485nexuiz000002.jpg

The texture is missing Sad, i’ve tried to resolve the problem like Sev wrote but it doesnt work in my case.
Another problem is : wtf is the .mtl file obtained with the .obj file after exporting ???
Can anyone help me plz ???


RE: Help with a Model: OBJ textures missing - Friskydingo - 12-10-2010

(12-10-2010, 09:48 AM)BARTUC Wrote: Hi all, I use this topic because i got similar problem using a .obj model inside Nexuiz/Xonotic.
First of all my question is : obj model needs UV map when i’m using only a texture for all the model ??? Yes or not, dunno because i going to be crazy for this model.

My problem is born when i tryed to export my noob creation : http://www.midiverto.net/images/2021.khe_Screenshot.jpg
and using it inside Nexuiz.
After compiling i gain this : http://www.midiverto.net/images/485nexuiz000002.jpg

The texture is missing Sad, i’ve tried to resolve the problem like Sev wrote but it doesnt work in my case.
Another problem is : wtf is the .mtl file obtained with the .obj file after exporting ???
Can anyone help me plz ???

Not being very knowledgeable on mapping, I can't help you much there, but I can answer your question on the .MTL's.
An .MTL file is a Materials definition for the .OBJ file. Basically, it stores info of the different surfaces in your mesh, such as reflectivity and color. The .OBJ reads this file and applies the properties listed there. It's a pretty important file, IMHO. You can find more info on .MTL's here.

Hope this helped! Smile


RE: Help with a Model: OBJ textures missing - BARTUC - 12-11-2010

Thank you very much for your infos ... ok one step is done Big Grin