Can't figure out Landscaping

Started by
2 comments, last by MatuX 21 years, 9 months ago
Specifically, I can''t understand how to calculate the normals and put the textures. My main objective with my landscape renderer is to be able to show a tiled landscape (LOD is not important) that can be iluminated by point and spot lights (vertex light calculations) and textures have to be able to be added at any tile (a texture has 4x4 tiles). Now, the solution for the textures is to simply divide the entire landscape in 4x4 patches and let the user add the texture on those patches. The problem here is that I can''t calculate the normals this way! I need to average the normal''s patch borders with the other patches and I can''t if they''re separated and generated separately. What about generating the whole landscape? I solve the normal generation problem buuut, how on earth do I subdivide the entire landscape in 4x4 patches now so I can add the textures the way I want? As you may already guessed, I''m trying to work on a tile based landscape for a game like Neverwinter Nights and Dungeon Siege.
Advertisement
well a solution thats worked well for me, and may well do for you:

Use one input heightmap (say a bitmap), or whatever you want to generate your height data from.

This will be split into NxM sectors with unique textures. Generate all the normals based on the master data set, then create additional structures/classes to handle each sector - but only give it a pointer to the input data/master data, and it can then extract the relevent geometry with the normals pre-processed...

lemme know if that''s not clear As I said, its worked for me several times now!

Jack;

DirectX 4 VB: All you need for multimedia programming in Visual Basic
Formula 1 Championship Manager, My Game Project.

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Check this out. I based my terrain on their algorithm.
http://cbloom.com/3d/techdocs/splatting.txt
That''s very interesting, thanks for your help!

This topic is closed to new replies.

Advertisement