surface rendering from data points

mc1961
Unregistered
 
Post: #1
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 Wink

Marc
Quote this message in a reply
DesertPenguin
Unregistered
 
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 info...here are two that I saw:

http://www.lighthouse3d.com/opengl/terra...?heightmap

http://nehe.gamedev.net/data/lessons/les...?lesson=45
Quote this message in a reply
mc1961
Unregistered
 
Post: #3
Thanks! I'll definitely explore these heightmaps.

mc1961
Quote this message in a reply
Luminary
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
mc1961
Unregistered
 
Post: #5
Wow! Thanks, I did not know about this triangulation method!

mc1961
Quote this message in a reply
Member
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
Sage
Posts: 1,199
Joined: 2004.10
Post: #7
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Rendering Heightmap using texture data ardowz 3 533 Feb 25, 2014 10:25 AM
Last Post: SethWillits
  Two gluProject points? mikey 5 4,712 Jan 5, 2012 01:03 PM
Last Post: mikey
  texture no square surface kendric 7 4,242 Mar 20, 2009 05:26 PM
Last Post: kendric
  Trouble turning an SDL surface into an OpenGL texture Joseph Duchesne 4 5,520 May 22, 2007 05:14 PM
Last Post: Joseph Duchesne
  Surface/Vertice Normals and Scene Placement Jones 3 2,831 Aug 22, 2006 02:45 PM
Last Post: scgames