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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