Skip to content

robagnaibaf/SolidMesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SolidMesh

Data structure for global mesh operations

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.

How to load the test scene?

  1. Download ZIP or clone the repository.

  2. Create a new Unity Project. Choose 3D Bulit-in Render Pipeline. I've used Unity 2022.3.15f1 for testing, make sure you are using a compatible version of Unity.

Creating a new project
  1. Move the downloaded files to your project folder (overwriting Assets, Packages, and ProjectSettings folders).

  2. Open Test Scene from the Scenes folder.

Loading the test scene

How to use SolidMeshBehaviour?

Import options

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. Loading a new input mesh

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).
SolidMeshBehaviour options

Laplacian smoothing

Smooth the mesh by clicking the Laplacian Smoothing button. Laplacian smoothing

Note: When running algorithms, we measure their execution time. Please check the console window for the measurement results.

Loop subdivision

Subdivide the mesh by clicking the Loop Subdivision button. Loop subdivision

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.

Reimport input mesh

Use the Reimport button to reload the original input mesh. Reimport input mesh

Testing with your own meshes

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.
Import settings

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages