PDA

View Full Version : ROAM and compiled vertex array



JacekPoplawski
07-30-2002, 04:52 AM
My landscape never changes. I am using ROAM. I split terrain to triangles, then draw it with textures. Should I use compiled vertex array here ?

AdrianD
07-30-2002, 09:04 AM
in order to be able to do frustrum culling
split your terrain in clusters (octree or quadtree) and store them in vertex arrays.
When you render your scene, perform a fast frustrum culling on the boundingbox of each cluster and draw it only when it's inside the view frustrum.

A027298
07-30-2002, 09:57 AM
Originally posted by AdrianD:
in order to be able to do frustrum culling
split your terrain in clusters (octree or quadtree) and store them in vertex arrays.
When you render your scene, perform a fast frustrum culling on the boundingbox of each cluster and draw it only when it's inside the view frustrum.
octree (or quadtree) and ROAM together or not?

AdrianD
07-31-2002, 06:32 AM
correct me if i'm wrong, but ROAM is the way how the landscape is created, and quad/octrees are methods to perform fast culling. So for rending it makes no difference how the landscape is created, it's allways a bunch of triangles.(which never changes, in this case)

so my suggestion is not to render (or lock in an compiled vertex array) the whole terrain. Just split it up in smaller chunks (btw.: 2-4k tris in a single cluster should be fine on todays hardware) and render them only if they are visible.

btw. in dynamicly created landspaces, i would suggest using VAR/VAO.

JacekPoplawski
07-31-2002, 09:03 AM
Hello AdrianD, you wrote:

"correct me if i'm wrong, but ROAM is the way how the landscape is created,"

Yes. I found previous answers completly offtopic.

"btw. in dynamicly created landspaces, i would suggest using VAR/VAO."

But what if I want to make it portable? There is no VAR/VAO in standard OpenGL.

I've read more about compiled vertex array, and looks like it's bad for ROAM, becouse _all_ vertices are calculated when using arrays, and in ROAM only few vertices are used.

Miguel_dup1
07-31-2002, 11:38 AM
I use quadtrees to cull my polygons... I works very well.
I have not tried using vertex arrays, so I cant tell you for certain, but I dont think vertex arrays will improve performance too much more.

If you decide to do it though, let us know if the use of vertex arrays is worth it.


[This message has been edited by mancha (edited 07-31-2002).]

stefan
07-31-2002, 09:22 PM
Just my 2 cent:

I implemented the SOAR algorithm described by Lindstrom ("Visualization of large terrain made easy"). To my surprise using the immediate mode can be almost as fast as using VAR (acutally VAR was 2% faster). To achieve that performance I switched to automatic texture coordinates generation and issued just a single glVertex3f for each new Vertex in the triangle strip. Using a standard vertex array was clearly slower than using the immediate mode. I agree absolutely on your opinion about using CVA for roam.

As for culling: Most algorithms stop subdividing if a triangle and all descendants are outside of the view volume, so maybe there's no need for other culling algorithms.

[Edit: typos]

[This message has been edited by stefan (edited 07-31-2002).]