3d model texturing

Hey guys,

I am developing a little first person shooter, the problem is I want to import a .obj file or convert it to .d3d doesnt really matter to me, the problem is my .obj file has a .mtl file which tells the .obj file where all the textures should be placed on the model. Now game maker doesnt support reading a .mtl file so what I would like to do is to save that .mtl file as a single big texture map to wrap arround the .obj or .d3d when it is loaded in game maker. I have searched and searched for software to do this, tried sketchup, ive tried blender(lost my patience with it), uvunmapper ect.

the model is all textured ready to go all I need to do is export a single image texture map for it.

any advice is really appreciated.

Regards
James
 
Z

zircher

Guest
What I do is create a single image of the textures I want to use like a quilt. UV map that file to the model (I usually convert to d3d.) Read in the model and image separately, and assign the image to the model as its texture. It's a bit annoying, but if you're building your own models, it is not too bad.

If you have an existing model that is already UV mapped, you're going to have to go in and scale/shift the UW coordinates to each of the textured sections. Also because you lose color mapping as well, I'll include a selection of color and map those as well.
 
What I do is create a single image of the textures I want to use like a quilt. UV map that file to the model (I usually convert to d3d.) Read in the model and image separately, and assign the image to the model as its texture. It's a bit annoying, but if you're building your own models, it is not too bad.

If you have an existing model that is already UV mapped, you're going to have to go in and scale/shift the UW coordinates to each of the textured sections. Also because you lose color mapping as well, I'll include a selection of color and map those as well.
thats pretty much what I want to do the model has allready been textured and in all model viewing programs that can support .obj and .mtl files (all of them basically), show the model perfectly, but when I choose export as obj it gives me the textures individually and a .MTL file that game maker cannot understand.

how can I export that to a single "Quilt" texture like you said?, Im very new to 3d modeling I must admit.
I do have an example of what I want to do with my model, this is a texture map of a tank .obj file
how could I export my other model texture to this format so I can load it into game maker, Any modeling programs that will export like this that you can think of?
I have no issues with converting the model to d3d, just need a texture "quilt" to be wrapped arround it in the draw model event.

 
Z

zircher

Guest
What you have there will work just fine. The kicker is that you need to edit all the UV coordinates of the model to match that file and not the original. There are a lot of tools out there that can help with that. I use an unusual pipeline of Japanese tools since I'm a mecha fan. You might want to look at programs like UVunwrap, Milkshape, etc.
 
Last edited by a moderator:
What you have there will work just fine. The kicker is that you need to edit all the UV coordinates of the model to match that file and not the original. There are a lot of tools out there that can help with that. I use an unusual pipeline of Japanese tools since I'm a mecha fan. You might want to look at programs like UVunwrap, Milkshape, etc.
ah really?!, I thought I could just load the .obj file and the .mtl file and the modeling program would be able to use that information to create a image like the one i uploaded above....

or am I just really confused, I downloaded Milkshape and had no luck with it... :/

I imported my model but when I tried to unwrap it I get just white outlines in my exported uv map? is that normal I was expecting it all to be textured
 
Z

zircher

Guest
Nah, the way it works is that the OBJ file will only have the geometry and UV coordinates. The MTL file is ignored. And, the model will use any one texture file that you assign to it. [Handy it you want to re-skin the same model with different images.]

UV maps (when you're working on them) usually looks like triangles or quads that map to geometry faces.
Example: http://s214.photobucket.com/user/mianiak/media/rF2/R33_wire.png.html

But, they're technically part of the OBJ file and normally invisible on the texture (the lines are there to help map faces but are not part of the texture itself.

This is a projected texture, but the same ideas apply.

The blue lines are not part of the texture, they're there to show you where the texture will map to the model. In this case, because we know the MTL files will not be used, even solid colors should be mapped. That's why there is color patches for the eyes, pistons, etc.

Does that make any sense?
 
Last edited by a moderator:

Alvare

Member
Restrictions have been the same for years. Here's a list:

-Uv maps that are out of bounds need to have texture_set_repeat set to on.
-Texture will always be within the zero to one bounds.
-3D textures are only working when 2x2 sized.
-No material support and only one texture per model/element. (Just select by material id and detach all the pieces.)
-Any realtime form of animation isn't possible without shaders or an extension. What you can do, but is a huge waste of time, would be to have different parts and use transformations to rotate them. (Back to the MGS1 era)
 
Nah, the way it works is that the OBJ file will only have the geometry and UV coordinates. The MTL file is ignored. And, the model will use any one texture file that you assign to it. [Handy it you want to re-skin the same model with different images.]

UV maps (when you're working on them) usually looks like triangles or quads that map to geometry faces.
Example: http://s214.photobucket.com/user/mianiak/media/rF2/R33_wire.png.html

But, they're technically part of the OBJ file and normally invisible on the texture (the lines are there to help map faces but are not part of the texture itself.

This is a projected texture, but the same ideas apply.

The blue lines are not part of the texture, they're there to show you where the texture will map to the model. In this case, because we know the MTL files will not be used, even solid colors should be mapped. That's why there is color patches for the eyes, pistons, etc.

Does that make any sense?
Sorta, I must admit I am a little confused, I dont wanna use the MTL file at all so thats good, I just want to load the model into a program and hit an export button that will give me a single image file with the lines like you said... BUT also assign all the textures in that model, cause from what ive seen online so far, you have to get that black and white image and put your own textures in, and with the size of my model that will be very difficult. basically what my model is is a level (full 3d environment) from a video game that ive ripped from the game files, converted it to an obj and mtl file with its associated textures. when I load the model up in any of these unmapping programs the 3d model displays all textured and everything, but when i try to get that uv map it is either all black and white with the lines (which i know you said wont show in the model I understand that and that its used for guiding purposes) or its all collored sections filled in but not the texures from the actual model which is what I need.

I could upload my obj and mtl and the related textures if that would help?

sorta what this guy is doing, but just a texture only, no specular lighting or anything
 
Last edited:
Z

zircher

Guest
Ouch, it sounds like you're going to have to re-map that level. The geometry is fine, but you'll need to put all the wall/floor textures into a single file and then map that texture (manually) to your wall sections in order to get them to sync back up.
 
Ouch, it sounds like you're going to have to re-map that level. The geometry is fine, but you'll need to put all the wall/floor textures into a single file and then map that texture (manually) to your wall sections in order to get them to sync back up.
damnit that will take like days to do ahah, the model ive ripped is the first level from halo CE, basically im trying to recreate the first level of halo CE in game maker, and just lifting the map file directly and using the P3DC Extension, if i cant then ill just make a doom themed version of it.... tell you what ill upload the model and the files, and if you feel like having a peak then you can tell me if im better off just scrapping that idea.

https://mega.nz/#!kdEUSRhQ!FEbi0pDnCe0iWj3mTg6gYSRTxL8kTYj25uV0XFuDtNI
 
T

Typhon

Guest
James222 what I have found is helpful is to split the obj model by opening it in a text editor. There is a clear designated section for polygons. Just use that and split the model into multiple text files. It is tedious but then each model will be a portion of the structure with proper texture mapping.
 
I

icuurd12b42

Guest
That tank texture is straight out of gmmodelfix. see my tools page. I guess the guy who made the model published it!?

d3d models don't support multiple textures. you need to combine the textures and fix the uvs to map where the parts would be on the new texture...

Someone did make a multi texture obj loader, it basically splits the model into multiple d3d models. go in the legacy forum and try to find it.
 
That tank texture is straight out of gmmodelfix. see my tools page. I guess the guy who made the model published it!?

d3d models don't support multiple textures. you need to combine the textures and fix the uvs to map where the parts would be on the new texture...

Someone did make a multi texture obj loader, it basically splits the model into multiple d3d models. go in the legacy forum and try to find it.
Yeah I actually am the guy who ended up making the multi texture loader you speak of haah :).
https://forum.yoyogames.com/index.php?threads/free-3d-obj-mtl-multi-texture-importer.47145/

^^
 
Top