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.

  • Z6y ];CƼ.YN%s*[Tlש-Ϭ "AcBёd<)Hu)n4ݛ0cյ~\׷B [튂OX(<~X1C]Kl:/e}ݝ8y6K9fԏu{jS[@O4t<^UմGiׯiZ¹[_Dk- Wf8{PF{F/*T  b ,n[tfQҖñA$xs1 y̧w2B1o5WzN{Ubߦ(avώ\C I5x)&gA{lJċ&cd12h@S=\7K(sRQ`EF@IN ~Ur]mohV(ƷyRL }|dJ!lvKO܁d,^M ’&^z!K0lɆB0I0;crUuq)gYЁTh+Qb$m%鬩,80Ds m2cc=3ϜG㠍E3u8! (IӗO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