surface rendering from data points
Hello,
I have what I thought would be a common situation but so far, after a lot of googling and studying, I am kind of stuck.
I have to render a surface for which I have XYZ data points (on a text file), where XY is a regular grid (but not fully filled). So far, I am defining triangles manually, and computing vertex normals, in order to use GL_TRIANGLES. There is way too many manual things in my way of doing this, so I started searching for a better solution.
My main problems are to sistematically define the triangles and decide which ones share a given vertex.
I have been studying NURBS, bezier surfaces, tessellation and a few other things, but I cannot find a way to plot my surface in an intelligent way.
I should say that I am not a programmer, but someone who learned how to program until now by studying examples found online (which has been quite good so far).
Thanks for any advise and pointer to examples to imitate
Marc
I have what I thought would be a common situation but so far, after a lot of googling and studying, I am kind of stuck.
I have to render a surface for which I have XYZ data points (on a text file), where XY is a regular grid (but not fully filled). So far, I am defining triangles manually, and computing vertex normals, in order to use GL_TRIANGLES. There is way too many manual things in my way of doing this, so I started searching for a better solution.
My main problems are to sistematically define the triangles and decide which ones share a given vertex.
I have been studying NURBS, bezier surfaces, tessellation and a few other things, but I cannot find a way to plot my surface in an intelligent way.
I should say that I am not a programmer, but someone who learned how to program until now by studying examples found online (which has been quite good so far).
Thanks for any advise and pointer to examples to imitate

Marc
Heightmap is a term for the data file. Often times they are stored in a simple .RAW file format. (The X and Z coordinates are not stored, only the height Y).
In order to render the heightmap, it is tyically loaded into a vertex array. This can be stored on the graphics card in OpenGL as a Vertex Buffer Object VBO.
Another useful technique is dividing up the terrain in a quadtree, and only rendering the nodes in the view frustum.
Try googling heightmap for more info...here are two that I saw:
http://www.lighthouse3d.com/opengl/terra...?heightmap
http://nehe.gamedev.net/data/lessons/les...?lesson=45
In order to render the heightmap, it is tyically loaded into a vertex array. This can be stored on the graphics card in OpenGL as a Vertex Buffer Object VBO.
Another useful technique is dividing up the terrain in a quadtree, and only rendering the nodes in the view frustum.
Try googling heightmap for more info...here are two that I saw:
http://www.lighthouse3d.com/opengl/terra...?heightmap
http://nehe.gamedev.net/data/lessons/les...?lesson=45
I think what you're looking for isn't heightmaps, but delaunay triangulation...
There is a technique that relies on rolling a sphere over the points for triangulation.
The Ball-Pivoting Algorithm for Surface
Reconstruction from
Bernardini at IBM!
Search google for the paper
The Ball-Pivoting Algorithm for Surface
Reconstruction from
Bernardini at IBM!
Search google for the paper
A little googling on OSC's suggestion found this paper:
http://local.wasp.uwa.edu.au/~pbourke/pa...index.html
Complete with implementations in several languages. Seems to triangulate sparse heightfield data. Pretty awesome.
http://local.wasp.uwa.edu.au/~pbourke/pa...index.html
Complete with implementations in several languages. Seems to triangulate sparse heightfield data. Pretty awesome.
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Rendering Heightmap using texture data | ardowz | 4 | 6,011 |
Nov 17, 2015 03:32 AM Last Post: mark89 |
|
Two gluProject points? | mikey | 5 | 7,812 |
Jan 5, 2012 01:03 PM Last Post: mikey |
|
texture no square surface | kendric | 7 | 8,236 |
Mar 20, 2009 05:26 PM Last Post: kendric |
|
Trouble turning an SDL surface into an OpenGL texture | Joseph Duchesne | 4 | 7,962 |
May 22, 2007 05:14 PM Last Post: Joseph Duchesne |
|
Surface/Vertice Normals and Scene Placement | Jones | 3 | 4,671 |
Aug 22, 2006 02:45 PM Last Post: scgames |