The Feature-fracturing algorithm

Published January 20, 2015
Time for yet another rewrite of my CSG tool.
Instead of going down the iso-surfacing road like earlier attempts, I now take a more boolean-like approach. This in the sense that I no longer convert the input geometry into an intermediate distance field, but keep it in its original b-rep form throughout the merging process. The advantage being that it suffers far less from aliasing issues that occur when you bake a mesh down into a volumetric grid or tree structure. Secondly, there's no loss of information on connectivity within both the base geometry as well as any vertex map data (discontinuous uvs etc.) that comes with it.

the base parts:

render012.png

after running the CSG operation and texturing:

render013.png

and the accompanying uv map:

render013_uv.png

The algorithm behaves very similar to the construction of a constrained Delaunay triangulation. It looks for intersections between features of the
individual CSG parts and either splits geometry or spins edges until all overlaps are resolved, while at the same time trying to maintain the Delaunay (he was Russian; don't think he's French smile.png) property within constraining boundaries.

Obviously there are things the contouring method allows you to do that are simply not possible using strictly mesh-based booleans. You lose, for example, the ability to trace or do blending operations on noise functions and volume textures. I have to resort to basic displacement mapping or alternatively, replicate some actual geometry across the surface of the mesh and use the tool to merge all that into a single manifold:

render014.png

render015.png

Placement of the rock blocks is purely arbitrary and results in some undesired cut throughs in curved areas, so I'll have to look for a method that's a bit more controlled without being too involving.
6 likes 4 comments

Comments

Comments are shown oldest first so the discussion reads top to bottom.
JTippetts

What would be the odds of me getting a peek at the code for iso-surface stuff you were doing before? Your method sounded interesting, and I'm starting to get back into procedural stuff so I'm on the lookout for new thingies.

September 23, 2014 10:32 PM
riuthamus

I wish i had enough money to hire you and make you my own.... this is epic.

September 24, 2014 12:32 AM
eppo

JT: that's fine. Do you guys still visit the chat at times?

September 25, 2014 09:42 AM
JTippetts

Occasionally I visit chat. With the new work schedule, it's tough to do it is much.

September 25, 2014 02:35 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!