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.

  • [r8=y Z 35ɜٓqRbW "Aou=;Ov %R4%QRrhn4@uo?wœ;_ 7k*-x f#(Γ\} ;gx%BssB>d; 2>0F~GL׺z=u< ` Ga.J$b%Ud.8W,yWi$8|)MX>gd,Ex! e~IzB[ݯ0j)Vz=[JT`g-|"S k *3Q4Q:/瘙OuS@nȓ|Lˏ~D֏5_dhBY!tNIViF"j`)m'Nl6Drilct3%zゑ2wuyݻÆwAuylC&1ǝ]*]ޕ WWf=N{\roU{L?Zg-g-'| Ae.#[Oͩ5-u!,g: bPbϏ wlcO|係x['NUO#i${σq;5 נ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