-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skirts between differing LOD borders occasionally leave holes #63
Comments
Nick Gildea referenced in #24 posted two blogs about stitching seams between chunks on his Dual Contouring terrain. He says at the end of the first if you're using marching cubes you'll need something like Transvoxel. But since you use Octrees with DMC, maybe it's useful? https://ngildea.blogspot.com/2014/09/dual-contouring-chunked-terrain.html |
There is a huge caveat coming from Godot when it comes to handling seams: they either have to be part of the mesh, or be separate meshes. In the first case, this requires to remesh A LOT more times than necessary, since any edit or LOD transition requires to rebuild and re-upload the entire mesh and its neighbors on each update. In the second case, this basically triples the amount of meshes Godot has to render, so triples draw calls and slows down culling. Last time I investigated this, seams could be swapped in and out by directly altering the rendering method (index buffers?), which ideally doesn't involve any remesh or reupload since seam configurations would already be embedded in the mesh. Other "efficient" methods also involve altering the rendering itself, which is not possible without forking VisualServer to add specific methods. No wonder voxel engines are often best built in completely custom engines^^" Note: I'm not really using octrees for mesh generation. There is one in DMC but it's not as effective as I thought. Note 2: even if we get perfect seams, issue #60 remains |
Most (all?) holes appear on borders between different LODs above 2. In the top row, the hole appears only when LODs 3 and 2 are next to each other. When it's all L2 (4th pic) or all L3 (5th pic) they don't appear. I moved the camera back and forth and counted LOD shifts from 0. In row 2, notice the overdraw does not show a hole for the top one. In rows 2 & 3, the size of the meshes looks like where L3 and L2 connect, as above. In row 4, this particularly large hole appears where L3 and L4 connect. |
I just found out Screenshots posted earlier show In other news it means I'm almost done converting |
This one here #63 (comment) is |
I saw it on VLT heightmap using distance 4096, LODs 8. |
I think I fixed it with 051034f |
Yep, even extending out the terrain beyond the far clip I see no holes anywhere. Good job! |
See more in action with different materials:
https://youtu.be/uNVG_49DGNo
@Zylann said:
In #59 this was identified as an issue with marching square skirts.
This is different from #57 which appears to be rendering in between the removal and repairing of the terrain during edits.
The text was updated successfully, but these errors were encountered: