Results 1 to 5 of 5

Thread: Creating Terrain Model

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Liverpool, England
    Posts
    9

    Creating Terrain Model

    I was wondering does anybody know how I would go about creating a 3d Terrain Model in OpenGL? I have the X, Y, Z data ready that has been extracted from a GIS map. What sort of format should I store the data in so it can be read into OpenGL code?

    Any help would be greatly appreciated

    Cheers

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2011
    Posts
    150

    Re: Creating Terrain Model

    The first thing you need to do with the GIS data is to reduce the data such that it can be rendered efficiently. One technique ... use the 8 surrounding points of each point to determine whether it should be included. If the average of the 8 points vary by a threshold more than the center point, then, keep the center point; otherwise reject it. Do this averaging/testing for the whole set of data. What you will end up with is a sparce matrix (good visual representation) of data that will need to be connected together using Delaunay triangulation.

    You will find a really fast triangulator, Triangle, at http://www-2.cs.cmu.edu/~quake/triangle.html. It takes 2D points (your X/Y data) to determine how the points connect together. You then use this connection information to render using the Z data for the height of each point.

    I've wrapped Triangle to be a little more user friendly. We've used if on a few projects ... been very pleased.

    One last thing ... once you get the data to be "connected" you'll still need to do one more thing. You'll need to add hiearchical bounding regions to your database -- for culling.

    You can also buy software that builds terrains for you using DTED or GIS data (e.g. MultiGen Creator).

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2004
    Location
    Liverpool, England
    Posts
    9

    Re: Creating Terrain Model

    The program that I've extracted my data from allows me to interpolate the points I have into Grid form. Is that what you mean by simplifying? The Link doesn't work for me I'm afraid. Thanks for your help, its much appreciated.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Sep 2011
    Posts
    150

    Re: Creating Terrain Model

    Try the link (without the dot)
    http://www-2.cs.cmu.edu/~quake/triangle.html

    By simplifying I mean data reduction. Typicaly grided data contains more data than necessary. For example, a relatively flat area in a terrain can be represented with a few polygons. On the other hand, a very dynamic, mountainous, terrain must be represented with many more polygons.

    A typical terrain will contain both flat areas and mountainous areas. So, the goal is to reduce points where it's flat so that you don't spend extra processing time and memory -- with no benefit.

  5. #5
    Senior Member Regular Contributor
    Join Date
    Sep 2011
    Posts
    150

    Re: Creating Terrain Model

    Originally posted by eskimo:
    The program that I've extracted my data from allows me to interpolate the points I have into Grid form.
    If you don't have access to the code. You may need to write another program that converts the data to a more optimized format.

Similar Threads

  1. Project Shadows over terrain model
    By Adrian B in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 01-10-2011, 11:46 AM
  2. creating terrain
    By kata1970 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 03-07-2006, 05:25 AM
  3. Random terrain creating
    By agemenon in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 04-05-2005, 07:30 AM
  4. Real terrain model - Newbee
    By Lanstorp in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-08-2002, 03:49 AM
  5. Clamping md2 model on the surface of terrain ?
    By digitalash in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-07-2002, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean