🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

3DS file textures

Started by
3 comments, last by deadstar 16 years, 1 month ago
I have MANY tutorials, links and Google pages, I wrote a hex dump program to look at the 3DS files, found and use ghex as well to get a file dump and read the file directly. I have trouble reading other peoples code alot, so is there someone just willing to work directly with me please? I can read a lot of the information from a 3DS file format at this point but I can not figure out the texture map coords. I used a simple block and a pair of block. I applied a texture to each, different ones to the pair of blocks, I also made a block ( cube if you will ) that I shifted the image to use only one portion of the image on the face of the block. I want to be able to use the objects from the 3DS in an OpenGL environment. I have the blocks' vertices, I do not understand how to find, get, convert, contrive, whatever the texture mapping coords for the faces of the block. I find the 4120 block and it has a number pattern as though it were indices I find no 4140 block. No floating point coordinates. I am could easily have not exported correctly from Blender, I may not have UV mapping applied right. Some sort of code would be fine but I really want information more. I can open the file, read into the file, find the texture name, the object name, the object vert list and so on but the texture mapping coordinates is lost to me. Is there enough information to help me out some? Thanks much in advance kumado
Advertisement
The UV coord chunk header is 0x4140, which should contain 2x float: U and V.

There should be one UV coord per vertex, and they should be in the same order you loaded the vertices.

I had a few problems with Blender, it wouldn't export the UV coords at all even with the correct options set. Made coding a 3DS loader hell.

If you have 3DS Max anywhere, make yourself a cube with a texture just for testing purposes. Ask Google about Blender and 3DS export.


EDIT: Sorry, my mistake. Chunk 0x4140 contains a quantity (short int) and THEN a stream of UV coords, 2x float each.

"The right, man, in the wrong, place, can make all the dif-fer-rence in the world..." - GMan, Half-Life 2

A blog of my SEGA Megadrive development adventures: http://www.bigevilcorporation.co.uk

hmmmm, that will sure stink if I been beating my head over that type of thing.
I guess I should have looked into that possibility as well.
Thanks so much for the help, I am going to find a station for MAX now.

Kumado
The blender problems were it. I got a file from MAX and I can read in the testures.

Thanks much for the reply!

kumado
Glad it works!

If I remember correctly, it was the method of applying the textures in Blender that didn't agree with the exporter.

I haven't used Blender in a while, but I think you can apply a texture using the Materials GUI, or by using the UV Image Editor thing. Try whichever method you didn't use...

"The right, man, in the wrong, place, can make all the dif-fer-rence in the world..." - GMan, Half-Life 2

A blog of my SEGA Megadrive development adventures: http://www.bigevilcorporation.co.uk

This topic is closed to new replies.

Advertisement