Skip to main content
GameDev.net gamedev.net
🔒 Locked

Landscape LOD

Started by kill Jun 28, 2000 at 1:37 PM 4 replies 600+ views
Original Post
kill
kill
Hi. I was thinking a lot about realtime landscape rendering. It''s obvious that to make the landscape look good in real time it''s necessary to use LOD. I checked out the ROAM algorithm. It seems too complicated, and there are many issues related to implementing it. One of them is implementing a good memory manager, which is a subject to a complicated research by itself. I came up with a simpler idea, and I want to hear your opinions. I''m more then sure this won''t work, I just want to hear why Basically, here''s my idea. If two vertexes are on the same pixel, make them one. As simple as that. It should be rather simple to implement(OpenGL feedback buffers come to mind). Or may be, if you want a less strict LOD, if two vertexes are N pixels near each other, make them one. I''d like to hear any opinions, suggestions and ideas. Thanx.
Eric
Eric
I''m working on a ROAM-based LOD algo that renders my height-map.
It is different from the typical terrain-rendering algo in that it is designed to display just a particular rectangular portion of the height-map (the camera is bird''s-eye).

Anyways, here''s what I do:

If my height-map array is, say, 1600x1600, then I will also have a tri group array that is 100x100. triGroup is a structure that defines how a single 16x16 region of the height-map is divided. At the simplest LOD, a triGroup will define two right triangles to render the 16x16 region. Of course these two can be recursively split, allowing the 16x16 region to be rendered with up to 512 tris. The triGroup structure is really just an array of 510 bits (stored as 16 DWORDs) that designate each possible split.

Again, the point here is this: If I need to display, say, a 40x50 region of the height-map, then I just render the 3x4 region of the triGroup array that (roughly) corresponds to this.

I''m now writing the code that sets all the triGroups based on a desired LOD. I won''t bother with details, except to say that this process will be much less efficient than your typical ROAM algo. Fortunately I only need to adjust the LOD once, at initialization, due to the nature of my game.
Iceshadow
Iceshadow
Eric:

do you have any place i can check out your work? i am also working on a roam engine, and i am needing some guidance as to the way things are done for landscape.

Thanks.



- Iceshadow
-=[Iceshadow ]=--=[ ilnelson@cswnet.com ]=-
Eric
Eric
Iceshadow, this probably won't help you much, but I've finished the LOD algo and I just had to show off a screenshot:



Notice how I'm forced to split down to maximum LOD where-ever the texture is blending from grass to dirt. By the way, the blending from wireframe to texture was accomplished in Paint Shop Pro by combining two screenshots -- my game doesn't actually do that effect!


Edited by - Eric on June 29, 2000 3:28:02 AM
Ysaneya
Ysaneya
> If two vertexes are on the same pixel, make them one. As simple as that. It should be rather simple to implement(OpenGL feedback buffers come to mind).

You are right, it won''t work. The reason ? The architecture of OpenGL. Requests are stored in buffers, which are flushed to the card. In other terms, it is asynchronous.

Using a feedback buffer, it will become synchronous. Said it differently, whereas a call to glVertex3f returns immediately, a call to glGet (or using a feedback buffer) your application will wait for the 3d card to finish its task before continuing.

It will kill your performance.

Y.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.