[vtkusers] Unstructured grid and coincident face rendering

Miorelli, Federico Federico.Miorelli at CGG.COM
Wed Aug 24 12:05:23 EDT 2016

The problem is that the surface extraction filter marks all the vertical faces as external because they are all used by just one cell. This leads to all the other issues, including performance because everything is rendered even if inside.

I managed to solve the issue for my specific case by employing a StructuredGrid.
I create an extra column of degenerate cells with zero width at the interface between two columns and I add zero height cells at the bottom if columns have different cell counts.

This only works because my grid is horizontally structured.

I don't really like this and I still wonder if there is a general solution for adjacent cells with partially overlapping faces.

Any thoughts?


From: Miorelli, Federico
Sent: martedì 16 agosto 2016 17:29
To: 'vtkusers at vtk.org'
Subject: Unstructured grid and coincident face rendering

Dear All,

I need to render a 3D grid which is horizontally structured but vertically unstructured (a corner-point grid with vertical pillars).
This is made of columns on a regular grid, each column is made up of a possibly different number of voxels whose Z coordinates are different from the neighboring columns. Voxels are displaced only in Z, so their faces are always perfectly vertical and touch the adjacent columns.

/     /|
*-----* o-----o
|     |/     /|
|     o-----o |
|     |     | |
*-----*     | o
|     |     |/
|     o-----o
|     |/

I am using vtkUnstructuredGrid with VTK_VOXEL cells to represent this. In each column I have (Nz+1)*4 points to represent the voxel edges, so that 4 points are shared between two vertically adjacent voxels. I cannot share points laterally because the Z values are different.

My problem is that I get very bad surface rendering artifacts at the boundaries between two columns, probably because both faces are rendered (see attached screenshot).

The only way I could get the correct rendering is by using OSPray in Paraview, but it's very slow on my hardware.

-    Is vtkUnstructuredGrid the best way to do this?

-    Is there a way to hint VTK that some faces are partially coincident, as to avoid double rendering?

I can provide code samples or data if needed.

Thank you for your help,
Best Regards


This email and any accompanying attachments are confidential. If you received this email by mistake, please delete
it from your system. Any review, disclosure, copying, distribution, or use of the email by others is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160824/0c4b8f56/attachment.html>

More information about the vtkusers mailing list