Radium-Engine icon indicating copy to clipboard operation
Radium-Engine copied to clipboard

Add operation with wedge to ease the representation of the topology of core mesh, with wedges to handle attribs.

Open dlyr opened this issue 5 years ago • 16 comments

  • Please check if the PR fulfills these requirements

First part of this PR has been moved to #595 (add quad meshes for Core and Engine). Second part of this PR has been moved to #719 (add wedge collapse).

Next steps, sorted by decreasing priority:

  • [ ] Topological test collapse on non triangular faces
  • [ ] Topological mesh for polymesh: split
  • [ ] Topological mesh add/del face/halfedge/edge/vertex which should update wedges ref count
  • [ ] Add Catmull-Clark subdivision (from previous implementation, see in code todo's)
  • [ ] Refactor UpdateGL to remove duplicated code
  • [ ] Test on real data
  • [ ] Docs have been added / updated (for bug fixes / features)
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Check picking/wireframe to show only edges corresponding to the core geometry
  • [ ] Cleanup history NO FORCE PUSH IN THE MEANTIME (other than rebase)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) Add operation with wedge to ease the representation of the topology of core mesh, with wedges to handle attribs.

dlyr avatar Jul 09 '20 22:07 dlyr

@nmellado the answer to your question about impact of degenerated triangles on rendering is on the picture post by @dlyr. Seen from here, I'm sure there is no T vertices on the polymesh and everything is well done. clap clap @dlyr. But I think there are degenerated triangles along the horizontal edge just abode the bottom. If, instead of rendering flat color, you have to interpolate attributes to compute smooth shading, you'll have interpolation artifacts along that edges. degenerated triangles will be removed by the rasterizer and you will see discontinuity in the attribute interpolation.

MathiasPaulin avatar Jul 10 '20 17:07 MathiasPaulin

This kind of artifact.

Screenshot from 2020-07-10 22-45-52

Note that it is also present in "simple quads" and are not linked to degenerated triangles, just to thin triangles as seen here: Screenshot from 2020-07-10 22-48-16

dlyr avatar Jul 10 '20 20:07 dlyr

Thin triangles are bad for rendering. More than computation precisions that degrade as the triangles become thin, the most proeminent problem relies to interpolation along the triangles in a mesh : piecewise linear approximation of non linear function over the mesh exhibit large errors and continuity issues. That's why a good mesh for rendering is a mesh that maximise the minimum triangle area and that maximise also the minimum internal angle on the triangle mesh (Delaunay triangulation does this).

MathiasPaulin avatar Jul 11 '20 08:07 MathiasPaulin

PolyMesh loading has been tested using this file: cube_quads.zip

nmellado avatar Jul 20 '20 08:07 nmellado

Codacy Here is an overview of what got changed by this pull request:


Issues
======
- Added 4
           

Clones added
============
- tests/unittest/Core/topomesh.cpp  3
- tests/ExampleApps/DrawPrimitivesApp/minimalradium.cpp  3
         

Clones removed
==============
+ src/Core/Geometry/TopologicalMesh.hpp  -10
+ src/Core/Geometry/TopologicalMesh.cpp  -10
         

See the complete overview on Codacy

nmellado avatar Jul 23 '20 07:07 nmellado

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

stale[bot] avatar Aug 22 '20 09:08 stale[bot]

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

stale[bot] avatar Oct 16 '20 18:10 stale[bot]

@dlyr what is the current status of this PR ? Could we merge some of the functionalities ?

nmellado avatar Nov 13 '20 08:11 nmellado

Well the status is as describe in the first comment, there is some work to do, and nothing is really tested. Something that can really help is to remove prop management in topological mesh and use only wedges.

dlyr avatar Nov 13 '20 15:11 dlyr

Chems do you think you could do that ?

nmellado avatar Nov 13 '20 16:11 nmellado

@dlyr I have update the PR description to rephrase the current state and next steps to do.

nmellado avatar Nov 20 '20 08:11 nmellado

Codecov Report

Merging #589 (4ea117f) into master (aaf8686) will increase coverage by 0.21%. The diff coverage is 49.40%.

:exclamation: Current head 4ea117f differs from pull request most recent head 4a1be9c. Consider uploading reports for the commit 4a1be9c to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #589      +/-   ##
==========================================
+ Coverage   23.48%   23.70%   +0.21%     
==========================================
  Files         286      288       +2     
  Lines       15255    15803     +548     
==========================================
+ Hits         3583     3746     +163     
- Misses      11672    12057     +385     
Impacted Files Coverage Δ
src/Core/Geometry/CatmullClarkSubdivider.cpp 0.00% <ø> (ø)
src/Core/Geometry/LoopSubdivider.cpp 0.00% <ø> (ø)
src/Core/Geometry/deprecated/TopologicalMesh.cpp 0.00% <0.00%> (ø)
src/Core/Geometry/deprecated/TopologicalMesh.inl 0.00% <0.00%> (ø)
...ts/ExampleApps/DrawPrimitivesApp/minimalradium.cpp 0.00% <0.00%> (ø)
src/Core/Geometry/TopologicalMesh.cpp 71.03% <60.61%> (+3.85%) :arrow_up:
src/Core/Geometry/TopologicalMesh.inl 86.14% <85.47%> (+19.87%) :arrow_up:
tests/unittest/Core/topomesh.cpp 95.02% <93.93%> (-2.34%) :arrow_down:
src/Core/Geometry/TopologicalMesh.hpp 100.00% <100.00%> (+13.63%) :arrow_up:
src/Core/Utils/Attribs.hpp 50.00% <0.00%> (-50.00%) :arrow_down:
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aaf8686...4a1be9c. Read the comment docs.

codecov[bot] avatar Jan 23 '21 08:01 codecov[bot]

This PR contains hot fixes for wedges, if nobody works on hit, I'll do a hot fix PR with just the fixes, and the rest will wait. @nmellado @loicbarthe ?

dlyr avatar Jan 25 '21 13:01 dlyr

Yes please, push the hot fix and leave the remaining work to another PR.

nmellado avatar Jan 25 '21 14:01 nmellado

Is this draft PR still needed ?

MathiasPaulin avatar Apr 01 '21 20:04 MathiasPaulin

yes, there is all the TODO's to do

dlyr avatar Apr 01 '21 20:04 dlyr