MantisBT - VTK
View Issue Details
0013827VTK(No Category)public2013-01-28 16:242016-08-12 09:55
Mark Van Moer 
Will Schroeder 
highminorhave not tried
closedmoved 
5.10.0 
 
TBD
incorrect functionality
0013827: Incorrect contouring on quadratic tetrahedrons.
When a VTK_QUADRATIC_TETRA is contoured, visual artifacts can appear depending on the orientation of the data relative to the internal decomposition. A quadratic tetra is decomposed inside of vtkQuadraticTetra.cxx into 8 linear tetras: 4 for the corners and 4 that make a central octahedron. The 4 central linear tetras share a diagonal of the octahedron. Values interpolated along this diagonal get interpolated as if the linear tetra was independent of the quadratic tetra.

Data that is the central tetra region perpendicular to the diagonal is interpolated correctly.

Attached is a tarball with 2 small test unstructured grid data sets, images from those sets, and an image showing the effect in a fluid simulation.
hackaton
gz contouringQuadTets.tar.gz (684,157) 2013-01-28 16:24
https://www.vtk.org/Bug/file/9388/contouringQuadTets.tar.gz
gz quadtesting.tar.gz (1,540) 2014-10-03 09:34
https://www.vtk.org/Bug/file/9741/quadtesting.tar.gz
gz generated.tar.gz (3,117) 2014-10-03 09:34
https://www.vtk.org/Bug/file/9742/generated.tar.gz
png pv-3.14.1-wo-fix.png (892,043) 2014-11-05 13:23
https://www.vtk.org/Bug/file/9765/pv-3.14.1-wo-fix.png
png pv-4.2.0-with-fix.png (1,624,498) 2014-11-05 13:23
https://www.vtk.org/Bug/file/9766/pv-4.2.0-with-fix.png
png pv-4.2.0-with-fix-generated-surface-Ns.png (1,103,085) 2014-11-05 13:34
https://www.vtk.org/Bug/file/9767/pv-4.2.0-with-fix-generated-surface-Ns.png
Issue History
2013-01-28 16:24Mark Van MoerNew Issue
2013-01-28 16:24Mark Van MoerFile Added: contouringQuadTets.tar.gz
2013-01-28 18:37Mark Van MoerNote Added: 0030271
2014-10-02 09:48Will SchroederAssigned To => Will Schroeder
2014-10-02 10:02Will SchroederTag Attached: hackaton
2014-10-02 14:04Will SchroederNote Added: 0033503
2014-10-02 15:01Will SchroederNote Edited: 0033503bug_revision_view_page.php?bugnote_id=33503#r859
2014-10-02 16:16Will SchroederNote Added: 0033540
2014-10-02 16:16Will SchroederStatusbacklog => active development
2014-10-03 09:34Mark Van MoerFile Added: quadtesting.tar.gz
2014-10-03 09:34Mark Van MoerFile Added: generated.tar.gz
2014-10-03 09:35Mark Van MoerNote Added: 0033570
2014-10-03 14:59Will SchroederNote Added: 0033573
2014-10-03 14:59Will SchroederStatusactive development => gerrit review
2014-10-03 15:00Will SchroederNote Edited: 0033573bug_revision_view_page.php?bugnote_id=33573#r867
2014-10-06 16:48Will SchroederNote Added: 0033606
2014-10-06 16:51Will SchroederNote Edited: 0033606bug_revision_view_page.php?bugnote_id=33606#r871
2014-10-06 16:53Will SchroederNote Added: 0033607
2014-10-06 16:53Will SchroederStatusgerrit review => active development
2014-11-05 13:23Mark Van MoerFile Added: pv-3.14.1-wo-fix.png
2014-11-05 13:23Mark Van MoerFile Added: pv-4.2.0-with-fix.png
2014-11-05 13:34Mark Van MoerFile Added: pv-4.2.0-with-fix-generated-surface-Ns.png
2014-11-05 13:40Mark Van MoerNote Added: 0033731
2016-07-06 16:50Berk GeveciStatusactive development => expired
2016-07-06 16:50Berk GeveciNote Added: 0036309
2016-08-12 09:55Kitware RobotNote Added: 0037298
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0030271)
Mark Van Moer   
2013-01-28 18:37   
I just checked the other quadrilateral cells with the same type of test - a single edge with scalars = 1.0, rest = 0.0,
- VTK_QUADRATIC_TRIANGLE seems fine
- VTK_QUADRATIC_QUAD does contour correctly, but surface color mapping is wrong
- VTK_QUADRATIC_HEXAHEDRON has some faces with incorrect color mapping, contouring seems correct, but iso volumes in ParaView are wrong.
- VTK_QUADRATIC_WEDGE, color mapping the quad faces seems incorrect, contouring seems correct, but iso volumes on triangle edges seems wrong.
- VTK_QUADRATIC_PYRAMID, surface color mapping appears fine, edges from the triangles have incorrect contouring and isovolumes.
(0033503)
Will Schroeder   
2014-10-02 14:04   
(edited on: 2014-10-02 15:01)
The artifacts due to the orientation of the diagonal are a well known side effect of this quick and dirty tessellation/contouring algorithm. In this sense the algorithm is working correctly. It is possible to improve this algorithm using a general approach (e.g., polyhedral contouring, etc.) but it is very slow.

One approach we'll investigate is whether we can easily pick the diagonal of the octahedron across minimal gradient direction.

Other problems were reported and we'll look into those now.

(0033540)
Will Schroeder   
2014-10-02 16:16   
Working on gradient-directed tessellation
(0033570)
Mark Van Moer   
2014-10-03 09:35   
quadtesting.tar.gz contains scripts to generate the quadratic cells mentioned in note 0030271.

generated.tar.gz contains the output cells.
(0033573)
Will Schroeder   
2014-10-03 14:59   
(edited on: 2014-10-03 15:00)
First pass. May need tweaking to use gradient vs. absolute difference in scalar magnitude. We'll see how it performs.

http://review.source.kitware.com/#/t/4803 [^]

(0033606)
Will Schroeder   
2014-10-06 16:48   
(edited on: 2014-10-06 16:51)
The contouring on vtkQuadraticTetra is now improved (Change-Id: I2dea89829f59aa7d909d8263ea1fab07b339e77f merged through gerrit). To also improve the other cells would take significant work and is under investigation but will take time to implement.

Reopening issue to make sure we don't forget this important issue.

(0033607)
Will Schroeder   
2014-10-06 16:53   
Reopening as a placeholder
(0033731)
Mark Van Moer   
2014-11-05 13:40   
pv-3.14.1-wo-fix.png shows the incorrect decomposition on a real data set, this is fluid moving over an airfoil, contour of velocity magnitude.

pv-4.2.0-with-fix.png is same dataset, I just copied vtkQuadraticTetra.cxx/.h over to a ParaView source tree.

pv-4.2.0-with-fix-generated-surface-Ns.png is a zoomed in look at the surface with the Generate Surface Normals filter. The spikes are gone, but there's still a blockiness that shouldn't be there.

For comparison, the original linear cell version of this data looks like http://vis.ncsa.illinois.edu/images/spotlight/airfoil/q_crit_isos_w_p.jpg [^]

(though that is q-criterion, not velocity.)
(0036309)
Berk Geveci   
2016-07-06 16:50   
Setting bugs that have not been touched in 1 year to expired. If important, please re-open.
(0037298)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.