surface rendering from data points

Post: #1

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 Wink

Quote this message in a reply
Post: #2
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 are two that I saw:
Quote this message in a reply
Post: #3
Thanks! I'll definitely explore these heightmaps.

Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #4
I think what you're looking for isn't heightmaps, but delaunay triangulation...
Quote this message in a reply
Post: #5
Wow! Thanks, I did not know about this triangulation method!

Quote this message in a reply
Posts: 52
Joined: 2007.06
Post: #6
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
Quote this message in a reply
Posts: 1,199
Joined: 2004.10
Post: #7
A little googling on OSC's suggestion found this paper:

Complete with implementations in several languages. Seems to triangulate sparse heightfield data. Pretty awesome.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Rendering Heightmap using texture data ardowz 4 4,459 Nov 17, 2015 03:32 AM
Last Post: mark89
  Two gluProject points? mikey 5 6,603 Jan 5, 2012 01:03 PM
Last Post: mikey
  texture no square surface kendric 7 6,583 Mar 20, 2009 05:26 PM
Last Post: kendric
  Trouble turning an SDL surface into an OpenGL texture Joseph Duchesne 4 6,998 May 22, 2007 05:14 PM
Last Post: Joseph Duchesne
  Surface/Vertice Normals and Scene Placement Jones 3 3,813 Aug 22, 2006 02:45 PM
Last Post: scgames