Archived

This topic is now archived and is closed to further replies.

CRRouse

multiple landscapes?

Recommended Posts

If 2048* 2048 is not big enough, can wrapping be turned off and multiple landscapes be used in a tiled fashion?, or is there another way to accomplish this?

Share this post


Link to post
Share on other sites
PR''s landscape engine is a bit different than everything else. The landscape never ends, and it''s not stored as a big mesh, so you can''t put one ''landscape'' next to another.

If you need something bigger I suggest splitting the world into smaller levels. 2048x2048 uses a lot of memory (8 megs of texture plus 32 megs of system memory for shadow buffers) and you still need space for the other objects and buildings.


Share this post


Link to post
Share on other sites
Well one way of doing this is having your supersize map split in small squares, say 128x128. Make a master map with indices to these 128x128 squares, and remember your position in this master map, all you have to do now is render the square you''re on and the 8 surrounding squares (or 24 or whatever depending on the length of your field of view). The tricky part is getting the world coordinates and the master heightmap to work together flawlessly.
here is an example of how you can do that, say you wanna start at the bottom-left corner of your master heightmap, in that heightmap your position is say (10,10) out of the 128x128 grid, then your world coordinates should be something like (10,10) (or a scaled value of that). then when you are in the next grid (the one to the right of the 1st one) in position (50,50) for example, your world coordinates would be (128+50,50)=(178,50). Of course the simplest way to acheive this is if the bottom-left corner of the master heightmap is position (0,0,0) of the world coordinates. So the start of the world coordinates and the master heightmap are the same and so you can plot the heightmap sector where they should be without too much headache.

Hope this helps.

Wolf,
------------------------------------------

http://www.cleverentertainment.com

Share this post


Link to post
Share on other sites
For our project we are sort of having the same problem. We want huge gigantic levels that stretch to the edge of infinity, but chris is right, it''s not practical. What we though of doing is divided our levels into areas using some kind of natural formation, like a river or a cliff, and making that a transition point. Once the game player crosses a certain point the screen fades out.....new landscape loads....screen fades in, voila. We haven''t tested it yet to see how effective it is, but it should be ok.

Dahadrael

Share this post


Link to post
Share on other sites
I wrote a landscape engine for OpenGL that worked sort of the way Wolf describes. It is practical. I just didn''t have sufficient know-how to write a complete engine, or even the desire to write a complete engine.

Can levels be loaded dynamically and transition seamlessly? The "loading, please wait" solution just won''t do.

Share this post


Link to post
Share on other sites
Well with the idea i mentioned above the sector heightmaps are small enough (128x128) to load without pause. you can add limited LOD to the same method, and for unlimited LOD you can add some Perlin noise. But concentrate on making the basic engine first, i can''t stress that enough.

Wolf

Share this post


Link to post
Share on other sites