info and algorithms for 3D graphics

This is a discussion on info and algorithms for 3D graphics within the Tech Board forums, part of the Community Boards category; I am trying to create 3D elavation maps for Mandelbrot set and similar type fractals. My data files are x, ...

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    384

    info and algorithms for 3D graphics

    I am trying to create 3D elavation maps for Mandelbrot set and similar type
    fractals. My data files are x, y arrays of elavation (z) values.

    Is there any information available, describing the basic procedures used in
    generating a 3D view of elevation data?

    I am just looking for simple renderings, with one illumination source.

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    1,616
    Quote Originally Posted by megafiddle View Post
    Is there any information available, describing the basic procedures used in
    generating a 3D view of elevation data?
    Google is your buddy!
    Devoted my life to programming...

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    384
    I should have mentioned that I have been searching, and there is information for the common renderings.

    But I can't find anything related to producing things like a perspective view of a relief or elevation map surface.
    Everthing seems to relate to geographical maps and the commercial software used for those.

    Perhaps they're known by another name.
    Last edited by megafiddle; 04-06-2011 at 08:32 PM.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Use your fractal as a heightmap. Displace the Y values on an x/z grid in local space according to the values in the heightmap. The resulting grid need not be transformed to world space since the terrain can sit with it's center at 0,0,0.

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    384
    Quote Originally Posted by Sipher View Post
    Google is your buddy!
    Actually, I did find a few more things using google. I had been using Bing exclusively to try
    it out. Thanks

    Quote Originally Posted by VirtualAce View Post
    Use your fractal as a heightmap. Displace the Y values on an x/z grid in local space according to the values in the heightmap. The resulting grid need not be transformed to world space since the terrain can sit with it's center at 0,0,0.
    Thanks

    I've been thinking along those lines. I basically need to draw a series of x, z plots, each one
    "in front of" the last, displacing it down one pixel, and possibly to the right for an angle view.

    Where I started having questions was in how to deal with gaps in the height from one point
    to the next. The x value steps across one pixel at a time, but the height can change by any
    amount. So you get an x, z scatterplot. If I can get each new line of height values to obscure
    the previous, more distant lines, that will take care of the hidden surfaces.

    A line graph would fill the gaps, and since each connecting line would be one or two vertical
    sections, maybe just use a vertical line for each height, with the height value at the upper
    tip of the line?

    I think this adds a bunch of new vertices to be shaded though, not sure. Which gets to the
    2nd question, better to just shade the original vertices and take care of the hidden surfaces
    there, or shade the perspective view? What is the best way to generate the perspective
    view for shading purposes?

    Anyway that was the type of information I had been searching for. "Map height" did get me
    some new information.
    Last edited by megafiddle; 04-07-2011 at 10:17 PM.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    I've been thinking along those lines. I basically need to draw a series of x, z plots, each one
    "in front of" the last, displacing it down one pixel, and possibly to the right for an angle view.
    No you need to project the vertices into screen space from 3D space if you want to view the terrain in 3D.

  7. #7
    Registered User
    Join Date
    Mar 2011
    Posts
    384
    Quote Originally Posted by VirtualAce View Post
    No you need to project the vertices into screen space from 3D space if you want to view the terrain in 3D.
    I realize that I would need to do that to produce a true 3D perspective.

    My idea would produce a distorted image if applied to an existing 2D map. I would be scaling
    things while generating the original map however. The more distant vertical "slices" would be
    smaller in both width and height. (same number of pixels, but a scaled down image)

    The only distortion would be in the height. With a perspective view of a plane tilted towards
    you, you should see vertical objects leaning towards you slightly. My vertical objects would
    remain vertical on the slightly tilted plane.

    For low viewing angles, I think the height perspective error might be of little cosequence.
    Looking around at the real world, vertical lines appear more or less vertical. This would
    certainly be no good for a perspective that had to be variable.

    Basically just a shear between the x, z planes.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help: compression algorithms...
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 02-24-2002, 05:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21