I’m giving a try with geoMiMap since i love irregular random terrains, but unfortunately documentation is a bit cryptic in the panda manual, so here i throw a few questions:
Given a loaded geoMiMap terrain with a heighmap 129x129.png, not scaled, his nodePath scaled nodepath.setSz(10)…
my demo is 3rd person, so if i set the minLevel at any number greater than 0, my avatar doesn’t snap exactly at the terrain with getElevation(x,y,z*nodepath.getSz())
if i make a task to update the lod level with a big diference between setBlockSize(p.ex 64) and setMinLevel(p.e 0) the application makes sudden ‘freezings’ while running, like not being able to calculate all that ammount of data in a single smooth frame…
also updating the lod this way causes obvious drastic/ugly visual changes in the terrain, i wonder is there some way to fadein/out the lod transitions
being 3rd person camera, better to set focalPoint to the avatar instead than to the camera, cause camera always looks at avatar, also like this you get sure terrain is on max resolution in avatar feet for the collision to work fine, is that right?
how is working best at the moment is not updating the lod level at all, basically not adding any task to handle that, but of course, frame rate decreases drastically…
anybody could adress me to some tutorial/something for finding the way for ‘painting’ tiles in the terrain, better with multitexture, so textures get blured…
I’d really apreciate any ideas suggestions advising on these,
i can submit a zip source file if anyone interested, just don’t know how.
this is how it looks so far:
Thats correct. Though, if you set the minLevel to something like 1 or 2, the difference will be barely noticable. The minLevel is not intended to be used for close-up scenes, only when a highest quality level is not needed.
Correct. Keep your block size low for that. Though, if you make your block size too low, the terrain might tend have too much blocks – thats where Automatic Flattening kicks in.
Well, depends. If your camera can get far away from the avatar, it might be a problem. Having focal point at the avatar has its advantages, but also its disadvantages. Same for focal point at camera. Just try out and see which works best for you.
Not updating the LOD level means, if the avatar walks to the other end of the terrain, the terrain becomes quite low quality there. You can use bruteforce rendering, the terrain wouldn’t need to be updated at all and the terrain would be equal quality everywhere. In that case you could also make your block size equal to the terrain size. But, that would indeed give a framerate loss, depending on the terrain size and minLevel.
I see that farther away the terrain lod looks noticably bad, you need tweaking your Factor to make the terrain look better on the far away parts.
PS. The default values for GeoMipTerrain are horrid for some cases. Every case has its own values, and they need quite some tweaking and fine-tuning before you reach the perfect quality/performance level. The values strongly depend on the way your scene is organized and how your stuff is set up.
well i don’t have any idea of what Cg is
but since i always wanted to implement some grid based texturing blending textures on adjacents cells i think i should take a look
i’ll also try to swim in the Treeform code, the images looks amazing!
for the other issues i think i get it, just tune the thing for good relation quality/performance,
Ah. Shaders are programs executed on the graphics card instead of the computer, they come in several languages, like GLSL, HLSL, and Cg. Panda only supports Cg, it looks very much like C. (actually it means C for graphics.)
You put a shader script in a separate file (usually with .cg or .sha extension) and then load it into Panda3D using loader.loadShader, next you assign the shader to a model with setShader. It works just like textures.
I’ve posted a terrain texture blending shader in this post. If you have any trouble, I’d be glad to help.
My way of doing terrain blending will not work with geomipmap very well. It could be recoded to work with it at c++ level though. There are still better ways to do terrain blending we just need to read more Cg books.