You mentioned in a post a while back that it was possible to simulate terrain by procedurally generating it. I’m trying to understand what you mean exactly.
Currently in Panda3d you build a large mesh to be your terrain and you just point a camera at it and place your actor inside.
I’m thinking by procedurally generating your terrain your saying something like…create a large flat mesh and then with script maninpulate the mesh (raise up/down etc) to produce your terrain as needed.
Is this what you mean? Or is it something else.
Please forgive my ignorance of the topic.
Thanks,
Steve
p.s. Josh, I’m not asking you to write this, I just would like to know a little more detail so I can explore it on my own.
I guess I’m still kind of confused about this whole subject. Its one of the reasons I haven’t been working on Panda3d in a while.
If Panda3d doesn’t generate the terrain for you, what purpose is reading a heightmap? This is what I know about heightmaps… they are a greyscale image where the lighter colors are higher elevations than the darker areas. So the lighter areas should tell you where the up (Z or Y) vertices are.
First of all, sorry I’m not responding promptly - I’m in a hotel, on a trip.
Anyhow, panda 1.1 has a convenient set of routines for creating an empty mesh, and then adding vertices and polygons one by one (from within code). You can see this API demonstrated in the “procedural geometry” demo programs.
Using this API, it’s not very hard to write a subroutine that converts an array of elevations into a GeomNode. We really ought to provide this subroutine, it’s such a common thing to want to do, I just haven’t gotten around to writing it.
Hmm and how about heightfield terrains ? There is a section about it in the manual but needs to written yet, could you point us to the classes and basics for this?