27. Dezember 2024

Studio Game 2 | Mattia | Week 3

Crack-Patching

This week I started looking into methods and algorithms on how I could fix the cracks in the mesh.
The cracks appear when neighbouring chunks don’t have the same resolution. So when one chunk already got dynamically reloaded with a higher resolution than its neighbour, the marching cubes algorithm doesn’t perfectly connect the chunks. This is because the vertices are always created in the middle of the edges of the cubes from the marching cube. So because the cubes don’t have the same size, the center of the edges is also offset a bit.

Each color represents a different level of resolution. The cracks in between those are clearly visible. So it’s really important to get those cleaned up!

 

 

 

I found different solutions to this problem, but all of them are meant for static meshes, so this wouldn’t really work in my case anyways. Another problem is, that those algorithms all traverse the octree in a breadth-first manner, but when i would need to run this step, im at the bottom of the octree, which would again make those solutions fairly inefficient.
I first thought about simply correcting for it on the most outer rows of the chunks, but this would mean that as soon as the bigger neighbour now also gets smaller, I would have to readjust the first mesh again.So i now came to the conclusion to simply create separate meshes for the crack-patches. Those will be also generated with marching cubes. So as soon as they are not needed anymore. they can just be removed.

I havent started implementing this yet, but i will start doing so next week.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert