Thursday, January 5, 2012

First Day: Installation and Basic Terrain

Today I went through a tutorial online to just get me started on getting the hang of the panda3D engine. The tutorial was very simple and easy to follow, so I didn't have too much difficulty. Basically, I used a tool called L3DT that created a terrain automatically for me. This is the terrain it created, seen from within the tool.The first picture on the left is the height map, a black-and-white image that shows the height the terrain, where white is highest and black is lowest. The second image is the texture map. This is basically the image that is applied to the 3d model of the terrain, to give it the appropriate look.

So we have the terrain in L3DT, so now how do we put that into the game? Apparently that is very easy in panda3D, it just took about 15 lines of code that were very easy to understand. I didn't even need to add controls for looking around the terrain, the engine provides basic navigation controls for me. So the last picture is of the terrain as it looks in the test program. Using the mouse, I can fly around this terrain and see it from all angles. Right now, it takes a while to load, because the program is generating the terrain from the height map and the texture map. Later on, I'll learn how to prerender the terrain, so all the program needs to do is slap it up there on the screen, and it will load a lot faster.



No comments:

Post a Comment