Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / 3DS File Format Specification

Author
Message
8truths
21
Years of Service
User Offline
Joined: 10th May 2003
Location: United States
Posted: 22nd Jun 2003 11:27
I cannot get the texture map filenames to read out from 3DS files.

Can get the object names, the material names, so forth. Cannot dig out the actual reference to the name of the bitmap used for the texture.

Everything's being done by reading out the chunks, as explained in any of the good 3DS file spec docs.

Depending on how I read out the chunk for the texture #1 and texture #2, I either get an old school carriage return square, nothing, a long number, or some single symbol.

Anyone have a suggestion on how to get the file name out?

Basically, I'm trying to make a single program that will copy all the 3DS files and their textures in one directory to a new directory.
JAT
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 24th Jun 2003 05:18 Edited at: 24th Jun 2003 05:20
It's in the MaterialMapName (0xa300) chunk, which is nested as follows:



Basically you have to be able to recursively walk the chunks, knowing which ones might have nested chunks. The following is from some debugging messages from my .3ds exporter in JTEdit, up to the end of the MaterialData chunk. You can just skip the chunks you don't know or care about because of the embedded chunk size:



-John

John Thompson
http://www.jtgame.com/jtedit
8truths
21
Years of Service
User Offline
Joined: 10th May 2003
Location: United States
Posted: 24th Jun 2003 09:45
I'm doing this in VB, and as long as I read it out properly, by through all the binary file and get and so forth, I'm still getting a CR (which I am inclined to believe means I am screwing up how I read out the zero-string, or possibly, somehow I am getting lost in the levels of the file, but that doesn't seem to me it would matter if the format works the way I think it does).

The goony part is, it just struck me there is a very ghetto solution to this. If you read the 3DS files out in a text editor, all the strings are sitting right there. While it is hardly good work to do it, it is far easier to just parse the damn thing for references to JPG, GIF, BMP, and so forth.

Thanks. I was deeply afraid no one would read this thread and give an answer.

Login to post a reply

Server time is: 2024-05-20 11:24:05
Your offset time is: 2024-05-20 11:24:05