If you plan to create a game set in a non-flat outdoor environment, you will need a way to create a natural looking terrain consisting of mountains, hills, and slopes. Luckily, Panda3D comes with the GeoMipTerrain
class that allows you to generate such an environment from a simple grayscale image called a height map.
Create a new project as described in Setting up the game structure and add a directory called textures
on the same level as the models
, nbproject
, sounds
, and src
directories. Also copy the height map and terrain texture you are going to use for rendering the landscape to the textures
directory.
Height maps can be created with specialized tools like Terragen or by rendering the height information of a mesh created by hand to a texture using a modeling package like Maya. A very quick solution is to generate a random landscape using a difference cloud filter found in many professional image editing programs.