Jump to content
  • Advertisement
Sign in to follow this  
beebs1

Storing World Data

This topic is 4061 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

Hiya, I've been bothered about how world data can be stored on disk, more specifically how techniques such as bump-mapping, gloss mapping, etc are 'mapped' to the vertices that make up the static 'world' mesh in a game. I was wondering if anyone could offer any insight? As an example, consider a car racing game. Let's say the 'track' is small enough that it is modelled as a single static mesh that is stored in a file containing the mesh data as well as references to the textures that it uses. But then say that the actual road needs a bump map, and a shed needs a gloss map, and another part of the mesh needs a Cook-Torrance reflection model or whatever. The question is, how would the engine know which parts of the mesh need which techniques applied when it loads the level? Would the static mesh be split into smaller meshes that need different effects (by the modelling package)? I believe the .X format is template based, so instead perhaps it could be expanded to support references to techniques? Or perhaps a level editor could be used to import a static world mesh, and export a custom file containing the vertices and the effects they need, references to ligh/bump/etc maps? Maybe they're all valid solutions, or maybe none? Anyway, many thanks for any replies! I hope that was clear enough [smile]

Share this post


Link to post
Share on other sites
Advertisement
Looking at Half-Life 2, they're applying materials to surfaces: a material can be a simple diffuse texture map, but also a shader, or a combination of various textures and shaders. Various other properties, like texture movement, transparancy, etc. can be configured per material. Several materials contain fallback settings, for lower systems, too.

In other words, they're treating shaders just like textures, in terms of applying them to geometry.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!