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