PDA

View Full Version : Need advice with terrains



Javac
10-07-2003, 01:19 AM
I need an advice to create some realistic terrains from data files with x,y and height
in world coordinates.I'm working with Open Gl version 1.1.Should I do it with GL_TRIANGLE_STRIP or GL_QUAD_STRIP?
Is there any difference between them in terrain aspect(excepting that quad strip will be twice faster)?

soconne
10-07-2003, 03:32 AM
I didn't know quad_strip was 2x as fast, I thought it was the other way around....

but to me quad strip looks a lot smoother and nicer, because with triangle strips you could have some wierd looking squares depending on the height of 2 of the vertices. But hey, if quad strips are faster for you, use those.

you can see what my terrain that i'm working on looks like here http://cs.selu.edu/~soconnell/3dengine.php

I'm using triangles, but with quads I think it might looks a little smoother.

Javac
10-07-2003, 03:45 AM
Wow! Your terrains are really great!!
I thought that quads need less calculations,but
I will take your advice!
Do you use texture everywere?

soconne
10-07-2003, 04:14 AM
Thanks, always good to get someone else's opinion.

Yes I use textures everywhere. In some of the screenshots, I'm using 3 ground textures with an alphamap to determine which textures blend where.

In the last few screenshots, I just textured 1 huge texture across the entire terrain and blended in a detail map, then blended in another texture with an alphamap.

Asshen
10-08-2003, 07:08 AM
I experimented with heightmap terrains and quadstrips before.
If the terrain will just be used for "looking beautiful" there is no problem http://www.opengl.org/discussion_boards/ubb/smile.gif

If however you want some character or so, to walk on it, then you have to keep in mind that quads are just 2 triangles for GL (depends on the driver I guess?) and if the 4 verts of a quad are not on the same plane, GL automaticly bends the quad (2 triangles), which can cause your character to suddenly walk underneath the terrain with his feet http://www.opengl.org/discussion_boards/ubb/smile.gif

K