Terrain generation / importing


I am curious if Panda can import Heightmaps / Terregen, L3DT, or Freeworld 3D terrain information.

I didn’t see anything in the documentation on how panda handles terrain or at least didn’t see anything applicable.


Panda just does geometry. If you need to render heightmaps you must convert them to geometry. Search the forums, there are people working on ways to convert from heightmaps to geometry at runtime.

Not true! I added heightfield support over the summer.

(This is not in panda3d 1.2.3, but it will be in 1.3.0, which should be soon).

Look for class “HeightfieldTesselator”.

Nice! You’re holding out on us :wink:

Thanks Josh.

is it coded in c++ or just python? ( i guess it is c++ or else the performance would be pretty… cought)

ah… since we are at the topic of terrain implementation :stuck_out_tongue: i just got an email with an intresting hint in it.
it was about a terrain library which creates a editable pseudo-random (i think with seed number for same results) terrain based on a handful of controlpoints. the results are pretty intresting and editing seems to be quite easy. details can be added which overwrite the pseudorandom terrain at the modfied parts. results:small files nice looks
the library itself can be found at http://www.worldforge.org/dev/eng/libraries/mercator
… some videos with the library in action…
thought it would be quite some work to implement it into panda and there is no real LOD as far as i can see… but perhaps someone feels like doing it^^

thomas e

It’s one of panda’s built-in classes. It’s pretty cool, it can generate a multiresolution mesh if you give it a focal point and a polygon budget.

wth!?.. why did nobody mention that such features are already existent… whaahaa something like this is just like… christmas and birthday on together… i just hope that 1.3 will be released ,soon.
oh this sound so awsome… big thx for your work Josh!

very nice I look fwd. to trying it :wink:


I wrote it in August, as part of a project here at the ETC. Sorry I didn’t advertise it sooner.

Panda3D 1.3.0 should be out within 24 hours.

  • That has being said in the general forum section. :slight_smile:

Regards, Bigfoot29

I’d be very interested to talk with others about handling lots of terrain, and an underlying infrastructure for paging…

Has anyone thought about this?


Well, considering we just got the heightfield terrain code this release, we really don’t know much about it yet.

Note that we already have two implementations of height field renderers on the forum …


Having one built in will be a great feature if it performs well and looks good. I am interested in writing a heightmap rendering shader that implements some sort of optimized tesselation algorithm be it ROAM, Rottger, Lindstrom, Quadtree, or whatever else. I would be happy to stop thinking about how to do this if someone is gonna provide it for me :smiley:

The built-in one is really not very hard to use. Five or six lines of code, and you’ve got yourself a heightfield. May I suggest just diving in?

Oh believe me … I am swan diving right now … :smiley:

My first observation (remembering that my own heightfield renderer maxed out at around 150x150 samples with no inter-frame tesselation) is that I am running fast with a 2048x2048 terrain … WOW! Nice, very very nice … I think it would be worth my time to spend a day or two examining this class.