Parts of heightmap appear/disappear

I'm guessing this is due to the complexity/oddity of this particular heightmap, but I would like someone to confirm that before I go any further:

here are three screen caps - notice how as I move to the right the 'mountain' in the center magically appears

here is the heightmap it is based off of:

I am using a regular StandardGame for this test, nothing special.

I am still experiencing this issue - does anyone have any insight on it?


Here are more screenshots.

Notice how when I move parallel to the trench the walls clip away along with my movement.  It isn't dependent on how close I am to the object. 

I am applying the texture with the command:


I do not have any lights set up - just using whatever is default to StandardGame at the moment.

Looks a bit like your zbuffer is somehow messed up. Do you have the latest graphics drivers installed?

You can also try toying around with the camera's far and near planes to get a better zbuffer resolution.

Did You use a 16Bit Raw File? In Past der was a problem, because in your grafik the vlaues are from "0 to 65K", but java swaps them to "0 to 32K and -32K to 0".

We made a map from black to grey instead of wheite, so we only used 15Bit of the 16Bit image File, and than it works.

I thoungt the Problem is solved, but I never tested it again, would you try a 8Bit File?

It isn't a driver issue for sure - I've tried it on an ubuntu laptop with the nix driver, and an XP box with the proper nvidia drivers.  I'd hope it isn't a zbuffer setting - because I am using StandardGame, I would think all those would be set up properly by default.

Also, it happens almost like a line down the middle of the screen when I move in the X axis, almost like jME can't agree with itself what the actual terrain should look like on the screen - it's very odd.

I can reproduce the problem with both raw files and gif files (using raw heightmap and image based heightmap).  I am only using values 0-255 for height at this point.

There definitely seems to be a Z-buffer / State issue… try putting some updateGeometricState adn UpdateRenderState here and there to see if it fixes it.

looks like a z-fight.

Finally had a chance to look at this again - here's the problem

            tmpTB.setModelBound(new BoundingBox());

apparently I have to update the render state on the root node as well - because when I added state.getRootNode().updateRenderState(); after the attachChild the terrain distortion disappeared.  For some reason it also makes the lighting much darker - from daylight to dusk basically.  I am just using whatever the default lighting setup is for StandardGame, so that's probably why - I'll play around with adding my own lights later.