Sign in to follow this  

Loading .3ds file format

This topic is 4587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I want to load a model in .3ds format into my game environment. however if I have two or more textures on my model then in the game environment only one texture is used. Is it possible that the .3ds file format will only store a single texture map. I have not been able to find any tutorials that load two or more textures. Hope you can help. Thanks Zainuluk.

Share this post


Link to post
Share on other sites
In .3ds every object can has more than 1 material. When I was implementing this I was also finding some tutorial but I didn't find any. What you can find is description of file format (which is very simple) and do it. I did it and add some new things like loading lights, cameras.

Share this post


Link to post
Share on other sites
Are you by any chance using Milkshape 3D to export your .3ds files? It's just that Milkshape doesn't have full support for 3ds files, as, for example, if I import a 3ds file with an opacity map so that Ic an scale it down for my game, Milkshape doesn't recognise it and saves it with a single texture map instead.

I'm not sure if this is the kind of thing you are referring to, but if so, then it is a failing of Milkshape (or whatever software you are using) not of the .3ds file format, as that is quite capable of storing more than one texture name (and even multiple textures per object, as in the case of an opacity map).

Assuming you have software that is capable of dealing with more than one texture, then you simply need to find a guide to the file format and learn how the different chunks work. As I found out when modifying my .3ds loader to include opacity maps, it's really not all that difficult. You simply allow the reader to recognise the appropriate chunk ID, determine how you will account for the extra material (multiple passes, multitexturing or using shaders for example) and the file format guide should then tell you what data is contained in the chunks. You then simply need to work out what to do with the data, which if you've managed to work out one extra type of chunk, shouldn't be too difficult.

Anyhoo, sorry I can't be more specific, as I don't have code to hand, but I hope that helps a little at least!

Cheers,

Steve

Share this post


Link to post
Share on other sites

This topic is 4587 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this