This repo contains an implementation of the SolidMesh data structure introduced on EUROGRAPHICS 2024 and CAD 2024 conferences. The implementation is created in C# using the Unity Real-Time Development Platform.
-
Download ZIP or clone the repository.
-
Create a new Unity Project. Choose 3D Bulit-in Render Pipeline. I've used
Unity 2022.3.15f1for testing, make sure you are using a compatible version of Unity.
-
Move the downloaded files to your project folder (overwriting
Assets,Packages, andProjectSettingsfolders). -
Open
Test Scenefrom theScenesfolder.
In the Test Scene you can see a camera, a light, and a 3rd GameObject containing a Solid Mesh Behaviour component. You can select the input mesh by clicking the bullet beside the Input Mesh field.

Note: This GameObject also contains a Mesh Filter and a Mesh Renderer component. These components are handled by the Solid Mesh Behaviour, please do not change them.
You can use the following options by importing:
- Swap the Y and Z coordinates
- Transform mesh to the unit sphere (translate the center of gravity to the origin, rescale the mesh to fit inside the unit sphere).
- Move mesh to the ground (translate along the Y-axis to set the minimum of the Y coordinates of the vertices to zero).
- Flip normal vectors of triangles (and vertices).
Smooth the mesh by clicking the Laplacian Smoothing button.

Note: When running algorithms, we measure their execution time. Please check the console window for the measurement results.
Subdivide the mesh by clicking the Loop Subdivision button.

Note: While testing I used a 16-bit index buffer, which supports at most 65536 vertices in a mesh. Therefore, if the number of vertices of the subdivided mesh exceeds this bound, the operation will be ignored. Comment out the return statement of Subdivide() function in SolidMeshBehaviour.cs to eliminate this protection.
Use the Reimport button to reload the original input mesh.

You can use custom meshes for testing. We used simple OBJ files imported to Unity. We strongly recommend disabling all of Unity's built-in mesh compression/optimization options, since using these, the topology of the mesh may change.
Note: SolidMesh data structure is created to store and manipulate a special class of surfaces. The limitations are the following.
- The mesh has to be a topological 2-manifold.
- Only triangle meshes are allowed, quad meshes are not supported (yet).
- Boundaries are not allowed (yet), i.e. the surface represented by the mesh has to be closed.