Storing World Data

Started by
0 comments, last by Captain P 16 years, 10 months ago
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]
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.
Create-ivity - a game development blog Mouseover for more information.

This topic is closed to new replies.

Advertisement