Sign in to follow this  
beebs1

Storing World Data

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
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

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