Archived

This topic is now archived and is closed to further replies.

GekkoCube

models, textures, and leading them...

Recommended Posts

I always wondered about this...since Im not very experienced with using 3d models. I noticed that some models, lets say a building, might have textures, maybe even multiple textures, that are applied on that model. The question is this: if all the texture information is all "wrapped" inside the model file (lets say 3DS), then how will the programmer have control over any of it? For example: What if I want ALL textures to be in the Textures directory, but the building.3ds file calls for a brick textures, but it doesnt look under textures\brick.bmp? Also, once the model is loaded, do you have to explicitly call and load the textures as well? And, what about applying the texture(s) before I render the model? Must I explicitly set the textures or is that taken care of by rendering the model (since the texture data is encoded within that 3DS file)??

Share this post


Link to post
Share on other sites
I''m not sure if I exactly get what your question is, however I assume you want to create a game which uses models with textures in a way.
Normally (I think; I''m not a pro), texture information is saved outside the model file. In the model file, there is a link (e.g. the filename) to the texture used which the game engine can interpret. So how this is exactly done depends on your engine. So that the engine will know, if the texture "brick" is requested, load "textures\brick.bmp".


"George W. Bush Geography Simplification Initiative"

More info on George W. Bush
My Homepage (C++ SDL OpenGL Game Programming)

Share this post


Link to post
Share on other sites
Exactly, I''m using this method for my engine.
Models and textures aren''t aren''t in the same file.

You have a directory for models and another for textures.

It''s quite important to do this if you want to use things like skins: you can change the texture that''s apllied.

What I read above is right, the model file contains the texture filename.

Share this post


Link to post
Share on other sites