Skip to content

Voxel triangulation - #141

Open
filipppavlov wants to merge 33 commits into
feature/voxelsfrom
voxel-triangulation
Open

filipppavlov wants to merge 33 commits into
feature/voxelsfrom
voxel-triangulation

Conversation

@filipppavlov

Copy link
Copy Markdown
Member

Summary

This PR adds Tr2VoxelGeometry class that takes in voxel data from Tr2VoxelData and builds a triangular mesh based on it. It uses either boolean occupancy or floating-point SDF per-voxel data (or both, combined). The class implements 3 different ways to build a mesh based on that data:

  • "Simple" box shapes for all occupied voxels. Mostly for debugging.
  • Mesh built with surface nets algorithm
  • Mesh built with dual contouring algorithm

The class can modify the built mesh using "surface cuts": pseudo-random plane facets and cleaves.

Note that the code is not final: no optimizations have been done; partial updates are missing.

Linked issue (optional)

https://fenriscreations.atlassian.net/browse/PLAT-12261

AI assistance

A lot.

@filipppavlov
filipppavlov marked this pull request as ready for review November 5, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant