I want to compute the resulting surface mesh of platonic (or maybe archimedian) solids applied with a displacement map for each face. The mesh should show fine details of the displacement map and be watertight and manifold (for 3d printing).
For this, I thought about using CGALs implicit function 3d surface mesher. I would then map each voxel point to the corresponding face, apply a coordinate system transformation from the voxel space to the face and look up the height field of the face. I know how to build the transformation matrix for each face, so I thought about the following algorithm for testing if a voxel is contained in the solid:
I guess there exists much better solutions, especially for finding the right face? Another approach might be to not use a surface mesher but build the surface out of the faces: take the displacement map of each face and apply the transformation matrix to it to build a solid, but then I need to simplify each face mesh and union them somehow so that the result is watertight and manifold (and the faces should support holes if the displacement map has certain values), so I thought a voxel based approach with an implicit function is the most general tool.
The voxel based approach was not successfull: To many artifacts, to low resolution. I ended in creating 2d height maps, aplying a simplification algorithm to them, then projecting them onto the faces of the solid and finally merging the face meshs into one single mesh by a custom algorithm.