STORM-IRIT / Radium-Engine

Research 3D Engine for rendering, animation and processing
https://storm-irit.github.io/Radium-Engine/
Apache License 2.0
100 stars 50 forks source link

Handling quad mesh #588

Open hoshiryu opened 4 years ago

hoshiryu commented 4 years ago

I have encountered issues with the handling of quad meshes (which I need to apply nice-looking Catmull-Clark subdivision):

nmellado commented 4 years ago

Thanks for the issue.

Do you need to handle meshes with both triangles and quad, or only quad meshes ?

dlyr commented 4 years ago

I think the easiest way to handle that is to have triangle mesh on one side (with one to one mapping with engine gpu mesh represetnation) and polymesh on the other side, with on the fly triangulation to map to a engine gpu mesh). We can assume that polyhedrons are flat and convex for fast triangulation. General case, if needed, is left as futur work.

nmellado commented 4 years ago

ok, and what do you suggest about the TopologicalMesh ? Does it takes both Triangle and Poly meshes ?

MathiasPaulin commented 4 years ago

Quad meshes have nice properties but mix meshes migh be very hard to manage. if we only need this for subdivision, why not using Loop subdivision on triangle mesh?

nmellado commented 4 years ago

I guess because Loop doesn’t have the desired property (e.g., continuity).

MathiasPaulin commented 4 years ago

Loop is C2 except at extraordinary vertices where it is C1. Si Catmull-Clark is better at quad-triangle jonction?

dlyr commented 4 years ago

Well I guess quad mesh is de facto standard in modelling community, along with catmull clack subdivision (better behavior along parameterization ?) Current implementation of topological mesh is already base on OpenMesh's poly mesh, there is surely some function in our implementation that suppose triangle, but we may adapt.

hoshiryu commented 4 years ago

Also to be noted (I will add it to the description), Assimp loading parameteris must then be changed to avoid triangulation: aiProcess_Triangulatemust be removed, and I don't remember the effect of aiProcess_SortByPType on the loaded data.

dlyr commented 4 years ago

Is it time to remove deprecated props management from topo mesh ?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

nmellado commented 4 years ago

Yes it is. Maybe Chems can help here ?

chemseddinehimeur commented 4 years ago

Okay I will give it a shot

chemseddinehimeur commented 4 years ago

From what I understood from the doc and code, the structure already exists, we have polymesh that supports quad and also have triangle conversion for gpu. also topological mesh supports poly meshes by default, but it only takes in triangle meshes, the issue is there are some classes like wedge class for example that depend on topomesh to be 100% triangular. I think we need to adapt topomesh to support polymesh, since all the processes are applied on topomesh including catmull clack subdivision.