Skip to content

silviaarellanogarcia/3D-Terrain-Generator

Repository files navigation

3D-Terrain-Generator

terrains_readme

Generate your custom 3D terrains, download them, and use it in your favourite robotics simulator!

Settings

The 3D Terrain Generator is only available locally. Therefore, to use it you have to download this repository.

$ git clone [email protected]:silviaarellanogarcia/3D-Terrain-Generator.git

Then, you have to install the necessary libraries to execute the tool.

$ pip install -r requirements.txt 

The tool is now ready to use! To launch it use the following commands:

$ export FLASK_APP=temp
$ export FLASK_ENV=production
$ flask run

And press the link outputted by the terminal

* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

How to generate your terrain?

Start by pressing the Generate Heightmap button.

step0_readme

Once the heightmap appears on the right side of the screen, decide if you want to keep it by clicking the Choose this one! button, or start the process again by pressing Regenerate heightmap.

step1_readme

Once you are satisfied with your heightmap, scroll down to the Step 2 and create the textures. You can add as many as you wish. To do so, just press the Add texture button. To get rid of a texture, just press the cross next to the texture you want to delete.

step2_readme

Don't forget to customize them! The texture can be chosen between several options, displayed in a drop-down list. Then, you have to choose in which range of textures would you like to apply it. In the example shown below, the mud is applied to the areas of the image that have a grey level between 0% and 20%, represented as a percentage instead of the usual 0-255 range. Lastly, you can decide whether you want to apply the texture to the full image, or just in a specific region of the image. When you are finished adding and customizing textures, click on Apply!.

To obtain a complete texture, without blank spaces, remember to assigning a texture to all range of levels (0 - 100).

Your terrain is ready to go! To check if your terrain meets your expectations, click on Render terrain. Then, press Download the render files to obtain the .obj and .mtl of your terrain. There will be two types of files downloaded. On the one hand, all the terrain as a whole will be available under the name MyTerrain. On the other hand, if you want to assign different surface parameters to each texture, it would be more practical to use the files named as Separate_X, that contain the mesh and texture of each part.

step3_readme

Finally, you can introduce the files into your robotics simulator!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages