GeoMipTerrain Problems and Questions

Hello everyone.

I’ve been working with Panda for a few months now and have had no problems with it until recently when I started trying to get GeoMipTerrain to work for me. I have a few questions I’d like to pose to the experts here:

  1. Has anyone gotten scaling to work correctly in x and y? I saw this post: … bcc56986e3 on making scaling work in z, but I haven’t seen anything about scaling in x and y. It turns out that the terrain map I’m using needs to be scaled up about 8 times in x and y to make the terrain units the same as the rest of the units in my scene. When I scale in x and y, I get a giant white blob, which I’m assuming is the terrain’s normals going way out of whack, much like the post above. Also, do I have to patch the source myself to fix these issues or is there a new release that will fix it just around the corner?

  2. Does GeoMipTerrain assume a height field of a particular size? I know it wants the size to be a power of two plus one, but is there a practical upper limit to this? I’m trying it with a height field that is a bit more than 8,000 pixels on a side and I’m getting incredibly bad performance.

Thanks in advance for your help.

Eh, that’s just a matter of setScale / setSx / setSy ?

Yeah, you get very bad performance if it’s not a power-of-two-plus-one. Other than that, it doesn’t surprise me if large heightfields perform poorly, too.

I tried setSx and setSy on the terrain, but with very large heightfields, it appears to generate terrain with incorrect normals. I scaled the heightfield down a bunch and was able to get it to work correctly in testing. Since the scaled version of the heightfield works and the larger one doesn’t, I’m assuming this is a scaling problem with larger heightfields.

Even at powers of two plus one, the GeoMipTerrain generator seems to break down on my machine at 4097x4097 and perform at fewer than ten frames per second.

I’m running a few more tests, but it looks like I might either load much smaller heightfields or run tiles with separate GeoMipTerrain instances and just hide the ones that I’m not near and stop updating them.