VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Complex IM Terrains Adam Hoult (7 replies, 0 views) (2000-May-7) OK, it's not often i like to ask for some assistance =), but im getting into some heavy D3D IM stuff at the moment and im wondering if anyone has any samples lying around to help me.
Basically I am rendering a Terrain using TriangleLists, now because i need to use different textures for different polys it's not a simple case of a single DrawPrimitve call. I am packing the textures but basically i need more textures than i can fit onto a 256x256 texture surface =). OK so here is where it gets messy, I can create seperate lists for each set of polys which use different textures (so if i am using 10 packed textures, i could have 10 Sets of lists).
Now i need to know how to sort the Polys somehow so that : firstly i dont draw polys which originate in the distance on top of polys close to the camera (which will happen with several calls to DrawPrimitve), secondly i need to remove all polys which are not visible (i.e behind other polys in the same or one of the other Sets) whilst minimizing SetTexture Calls.
So basically i need a sample which uses multiple Texture Surfaces (NOTE: Actual Textures, not simply different parts of a texture using coordinate shifts) for this type of outdoor scene.
PLEASE mail me if you know of, or have a sample like this in C++ or VB, i'd be VERY greatful.
Thanks in advance.
Adam Hoult
|