PDA

View Full Version : rendering a terrain



staind
02-14-2002, 03:02 AM
hello all of you,

what is the best solution to create a terrain: use nurbs, or use vertex ?
and if you have vertices, can you transform them into nurbs ?
nurbs are there fast ?

thanx

chowe6685
02-14-2002, 03:32 AM
I would use a heightmap, its fast, easy and very flexible

staind
02-14-2002, 06:41 AM
and what's heighmaps ?

what do you use in opengl for that ?

chowe6685
02-14-2002, 05:47 PM
a height map is an array of heights. For example you could use a greyscale bitmap, where white was the heighest and black the lowest. Using that map you can generate an array of coordinates which produce a terrain. Most paint programs can easily produce an appropriate greyscale image I believe there is also a tutorial at nehe.gamedev.net

staind
02-15-2002, 02:35 AM
and if i want to use datas from a modeler, the heightmaps couldn't be used anymore. i think.

or do you think i have to take a 'photograph' of my model and convert it into gray scale ?

thanx

rIO
02-15-2002, 04:23 AM
Better to use vertexes arrays , so that u can cull/clip/organize them in octrees/quadtrees.

If you'll use a model it's a matter of model rendering, not terrain, even if some tecniques are similar.

To render terrain usually it's better to use an heightmap (a matrix containing height values for terrain), and render it using vertexes arrays.

On nurbs it's difficult to remove a node.

my 2 euro cents

rIO.sK http://www.spinningkids.org/rio

staind
02-15-2002, 05:42 AM
my 2 euro cents ? what do you mean ?

OK, then, i use my 3D model file then heighmaps for the relief and then put them into vertex array !

OK !!

thanks a lot

staind
02-15-2002, 05:48 AM
rIO,

i took a quick look at your site.
some 3d, some music (no staind ?), but it's fairly pretty ! very nice.

The devil can fly ! and angel can fall down !

see u next

staind

MrShoe
02-15-2002, 09:09 PM
The basic way of doing terrain is through a two dimentional array of heights. The way you get the height is up to you. You can read the heights from a 3D modeller file, or you can read it from a heightmap, it doesnt really matter in the end. Do you have a square grid of heights as your terrain, the x and z coords of the verteces are so that they are uniformly spaced and the space is up to you, while the y coords are the heights.

PigeonRat
02-16-2002, 01:43 AM
I would use heightmaps. A good tutorial for actually creating the heightmap can be found @ http://www.ndmedia.net.

staind
02-19-2002, 04:58 AM
thank you !

rIO
02-19-2002, 05:26 AM
staind : tnx http://www.opengl.org/discussion_boards/ubb/biggrin.gif