Lighthouse3d.com

Title: Terrain Generator

Latest Version: 1.2.5

Author: Antnio Ramires Fernandes

Downloads:

  • Win32 exe: tgwin.zip (89K)
  • Sources (win32 and linux) : tgsource.zip (30K)
  • Example TGA images: tgimages.zip (122K)
  • Requirements: GLUI v2 (only to build the sources), GLUT, OpenGL.

    Note: you may need to edit the makefile in Linux to set the paths for your system.

    Features:

    Version 1.2.5:

  • Terrain smoothing with matrix filters
  • Version 1.2:

  • Particle deposition algorithm for terrain generation
  • Terrain smoothing
  • simple water plane
  • Version 1.1:

  • Added the mid point displacement algorithm for terrain generation
  • Version 1.0:

  • Algorithms for terrain generation: Fault and Circles
  • GLUI interface.
  • Full control over the parameters.
  • Two navigation modes: Examine and Fly.
  • OpenGL window grabber.
  • Save the height map as a TGA image.
  • Load a TGA image (non-compressed, and no index colors) and build the height map.
  • Very Short Users Manual (for more information see the Terrain Tutorial):

    Terrain Module:

  • Image: input the file name of a non-compressed RGB(A) or Greyscale TGA image. A height map will be built using the image data.
  • Generate: takes a width and height and generates a flat terrain
  • Surface Type: Choose between Triangles and Quads.
  • Surface Mode: Wireframe or Solid
  • Surface Lighting: OpenGL, Simulated, or Off
  • Surface Normals: if checked normals will be generated for the height map
  • Scale Heights: set the minimum and maximum height for the surface.
  • Scale Heights Apply: Apply the height scale.
  • Scale Heights Reset: Set the minimum height to 0 and the maximum height to 20
  • Show water plane: shows a blue horizontal plane.
  • Height: set the height of the water plane
  • Screen Shot: Grabs the OpenGL and saves it as a TGA image. Filenames are given sequentially, 3dtechscreenxxx, where xxx starts at 0.
  • Save as TGA: Convert the height field to a TGA image
  • Iterate
  • Function: select the function for terrain generation
  • Random Seed: random seeds only take effect when a new terrain is generated
  • Max. Disp: Selects the maximum displacement, i.e. the displacement for the first iteration
  • Min. Disp: Select the mimimum displacement
  • Interval: The displacement will decrease from max disp to min disp over a number of iterations, this field specifies that number of iterations. After the number of iterations is reached the displacement will be equal to the minimum displacement
  • Wave Size: Only valid for Fault-Sine and Fault-Cosine. It is the amplitude of the function. The larger the smoother the terrain.
  • Circle Size: Only valid for the circles algorithm. It is the radius of the circle
  • Sticking Particles: sets the particle mode. If checked the particles will stick where they are deposited, otherwise they will roll to form a smoother surface
  • Add. iterations: input here a number of iterations to add to the current total
  • it done: displays the number of iterations to date
  • Show: if checked it will show every iteration, otherwise you'll only see the results in the end.
  • Start: adds the number of iterations in "Add. iterations" to the total counter and starts iterating
  • Stop: stops the terrain generation
  • Roughness: determines the general look of the terrain, 1 is the default value. Higher values create rougher terrains.
  • Steps: The number of steps for the midpoint displacement algorithm. This determines the size of the terrain, so if the step is n, the terrain will be 2^n+1. For instance for n = 7, will end up with a terrain 129x129.
  • Roughness: sets the roughness of the surface for the midpoint displacement algorithm. Use higher values for rougher surfaces, smaller values will provide a smoother terrain
  • Steps: the number of iterations for the midpoint displacement algorithm. The terrain will be a square with ((2^n)+1) x ((2^n)+1), where n is the number of steps.
  • k: smoothing constant. Varies between 0 and 1. Higher values provide smoother surfaces.
  • Show Filter Options: Opens the Filter Options window
  • Navigation:

  • Examine: Use the GLUI controls
  • Fly: arrows move and rotate the camera, the mouse (button pressed) also changes the orientation. (note: if the mouse button is pressed and you press either up or down you'll move much faster than without the mouse button pressed)
  • Filter Options:

  • Filter: Select one of the predefined filters
  • Go For It!: Apply the filter defined in the matrix
  • Close Me: Close this window
  • The entries in the Matrix panel show the filter to apply. You can edit these values to create your own filters.

  • }[6X>[rDj3%';sEBmdxnayvV RDo.g:N7  B ?z/ސUv/Ϟ?V΂| >^J{pA\[NS~j۵E|XqM:uaZtU_w MuBXD$+3p(V?Pvݰ?ww8=nb۶i=Z/(߅aE)0}|EM5Mb0ois\LBN-AV!]p,WO"ڵm`1 ,5X إ3x~L~_TyÞϣVs>5WD4?bRdN(&PWLF(Y,uQꧨAM@ƝO(E&{\y8:'|m*D!v5%eUc{,hlRt:QlƑz`DZXCr~H;R]R@=O!Da2 e8 :ƱVʸa1 =3Acƨa}}Vui[-/ȷuL:?Wz &͋% LEƥ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