I’m rendering large scale terrain where 1m = 1 babylon unit.
I was confident in my lod system so I tried rendering with a size of 12742000m as a diameter.
It did produced good results but when I get to the lowest depth where space between two vertices is 1m everything turns into stairs and the vertices start vibrating when I move.
At first I moved the terrain round the origin while the camera remains at zero and it was working, but when I put the terrain under a transform node then make the node position inverse of where the camera is supposed to be then it stopped working and started making stairs.
game.universeNode.position = game.universeNode.position.subtract(game.camera.position);
game.camera.position = new BABYLON.Vector3(0,0,0);
No matter how many times I press undo to go back to when it wasn’t under a node it still doesn’t work.
It took me about 3 hours to realize that the meshes position in babylon is still at 0 and engine uses that position for a lot of things (like auto frustum culling).
How do I update the meshes position without updating its vertices position? (I don’t even think thats possible) so I can do the split double transform in the vertex shader where it needs it.
I know if you get up too far beyond four or five digits on the left side of the decimal you start losing fractions… Idk wyt (the same thing would technically happen at 64bit?)
You are not sampling textures as the height or density map and are getting this problem?
How are you caching everything? This is similar to the problem I had when I used int textures to cache my terrain vs float. Looks like your setup is quite a bit different though and might not be the same issue, Id have to see if and how you are caching the buffers.
I wish I could say I was sampling height map textures and pass that as the problem, but I’m not. Using high res textures would be too long to load for earth scale so until I find a good way to load them I’m using a noise function on the CPU.
I haven’t yet done the 64 bit vertices thing yet, I didn’t have time today so I’ll push it to tomorrow.