Landscape

Started by
1 comment, last by Motorherp 19 years, 4 months ago
hi i am working on an game with a very huge landscape i got at moment (200x200) segments of landscape and got 7x7 of them in memory, when leaving an imagineary border in the middle the missing parts are reloaded..thats ok but... is it better to render the whole landscape (7x7segments) as one mesh (with all tilings) or dividing the landscape in 49 single mesh (like they are loaded) and render only the viewable parts of it (a land_segment is 51x51vertices) what do you think is the better way? (next week i can show some screenshots) greetings Aragon
Advertisement
Personally, I would noto suggest you use meshes to draw landscapes, but do them procedurally (ie, use math to generate vertices yourself). One of the problems with using meshes is that they are somewhat inefficient storing data, if you don't write your own loader.

Another benefit to generating your terrain is that you can modify it during run time, easily get specific vertex coordinates (makes life a heck of a lot easier for collision detection), and a couple of other bonuses.

Just my 2 cents.
As far as drawing a large landscape goes you definately want to split it up into grids so you can quickly cull large sections of the terrain. Also if you plan on implementing some sort of dynamic level of detail stuff this griding is a must. Finally I'd render as much of the visible terrain as you can using tri strips. Insert degenerate tris to change the tri strip direction back and forth along a grid square so the entire section can be drawn with just the one long tri strip. Drawing a few degenerate tris is much faster than making a few seperate render calls for different tri strips.
[size="1"] [size="4"]:: SHMUP-DEV ::

This topic is closed to new replies.

Advertisement