[vtk-developers] vtkUnstructuredGrid - Not rendering Overlapping Cells

Bhanu Hariharan bhanu at petrotel.com
Fri Feb 22 12:13:22 EST 2013


Small correction here..When all nodes identical, the points in the ascii
file should be the following.

But my point is still the same. Filter or not, VTKUnstructuredGrid is not
rendering the overlapping faces. Unless you saying that even VTKThreshold
filter can do that. But then I use similar threshold filter for
VTKStructuredGrid as well, and in that case I do see the overlapped faces.

POINTS 8 float
0 0 0
1 0 0
0 1 0
1 1 0
0 0 1
1 0 1
0 1 1
1 1 1

On Fri, Feb 22, 2013 at 11:03 AM, Bhanu Hariharan <bhanu at petrotel.com>wrote:

> Thanks Will.
> You are right. In my application,  I do use a filter BUT that is a
> VTKThreshold filter for showing only certain cells.
> If the two overlapping cells pass this threshold filter, then I don't see
> them at all (if i use structured grid, then you are right I see something
> not pretty but I see something).
>
> I did not use a VTKDataSetSurface filter. I understand if I used that then
> only the boundary cells will be rendered.
> But what I used was just a threshold filter.
>
> Infact I created a small ascii file with 2 cells and opened in Paraview as
> a Legacy VTK file.
> No filter. I cant see the two cells if ALL NODES ARE IDENTICAL.
>
> But if some nodes are identical and some different, then I see some
> surfaces.
>
> Both cases copied here.
>
> //===============ALL NODES IDENTICAL=================NOTHING RENDERED
> # vtk DataFile Version 3.0
> vtk output
> ASCII
> DATASET UNSTRUCTURED_GRID
> POINTS 8 float
> 0 0 0
> 1 0 0
> 1 1 0
> 0 1 0
> 0 0 1
> 1 0 1
> 1 1 1
> 0 1 1
> CELLS 2 18
> 8 0 1 3 2 4 5 7 6
> 8 0 1 3 2 4 5 7 6
> CELL_TYPES 2
> 12
> 12
>
>
> //===============SOME NODES IDENTICAL=================SOME FACES RENDERED
> # vtk DataFile Version 3.0
> vtk output
> ASCII
> DATASET UNSTRUCTURED_GRID
> POINTS 10 float
> 0 0 0
> 1 0 0
> 0 1 0
> 1 1 0
> 0 0 1
> 1 0 1
> 0 1 1
> 1 1 1
> 1 1 0
> 1 1 1
> CELLS 2 18
> 8 0 1 3 2 4 5 7 6
> 8 0 1 8 2 4 5 9 6
> CELL_TYPES 2
> 12
> 12
>
>
> Thanks
> Bhanu
>
>
>
>
> On Fri, Feb 22, 2013 at 10:40 AM, Will Schroeder <
> will.schroeder at kitware.com> wrote:
>
>> Rendering is not the problem. You can render a zillion things on top of
>> each other. It won't look pretty but you'll see something.
>>
>> Probably what is the problem is that you are going through some sort of
>> geometry filter. For 3D cells, the geometry filter looks at the number of
>> times each "face" is used by 3D cells. It the number of uses is <=1, then
>> it's a boundary face and is rendered. If used 2 times, then it's an
>> interior cell and not extracted (nor rendered).
>>
>> W
>>
>>
>> On Fri, Feb 22, 2013 at 10:56 AM, Bhanu Hariharan <bhanu at petrotel.com>wrote:
>>
>>> Thanks. I will look into the composite dataset but I do not have
>>> anything other than hexahedrons.
>>>
>>> I think it looks like VTKUnstructuredGrid will not render in the
>>> situation of overlapping cells and I have to find a way out outside of VTK.
>>>
>>>
>>>
>>>
>>> On Fri, Feb 22, 2013 at 9:28 AM, Sebastien Jourdain <
>>> sebastien.jourdain at kitware.com> wrote:
>>>
>>>> VTK has other type of data structure such a composite-dataset /
>>>> multi-block which let you create a dataset that is composed of multiple
>>>> dataset (i.e. Unstructured grid in your case).
>>>> And what you do is basically share the same vtkPoints across all your
>>>> unstructured grids which will then be gathered by the composite dataset.
>>>> and rendered as a single dataset.
>>>>
>>>> Hope that explain a bit more,
>>>>
>>>> Seb
>>>>
>>>>
>>>> On Fri, Feb 22, 2013 at 10:24 AM, Bhanu Hariharan <bhanu at petrotel.com>wrote:
>>>>
>>>>> Sebastian, I do not understand what you mean by multi-block. Could you
>>>>> please elaborate. Thanks.
>>>>>
>>>>>
>>>>> On Fri, Feb 22, 2013 at 9:20 AM, Sebastien Jourdain <
>>>>> sebastien.jourdain at kitware.com> wrote:
>>>>>
>>>>>> Unless it's a multi-block and then it is not the same dataset
>>>>>> anymore...
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 22, 2013 at 10:17 AM, Sebastien Jourdain <
>>>>>> sebastien.jourdain at kitware.com> wrote:
>>>>>>
>>>>>>> Then I'm not sure that VTK can handle 2 cells that are based on
>>>>>>> exactly the same points ID.
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Feb 22, 2013 at 10:12 AM, Bhanu Hariharan <
>>>>>>> bhanu at petrotel.com> wrote:
>>>>>>>
>>>>>>>> Thanks Sebastian. For the 2 cell case, I start with 16 points and
>>>>>>>> identify duplicates and bring it down to 8 and the two cells now map to the
>>>>>>>> same 8 nodes. In this scenario, can VTK render both cells with some flags
>>>>>>>> turned on.
>>>>>>>> Or can you please suggest another way.
>>>>>>>>
>>>>>>>> But removing duplicate nodes is a must for my application due to
>>>>>>>> memory constraints.
>>>>>>>>
>>>>>>>> -Bhanu
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Feb 22, 2013 at 9:03 AM, Sebastien Jourdain <
>>>>>>>> sebastien.jourdain at kitware.com> wrote:
>>>>>>>>
>>>>>>>>> duplicate the points.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Feb 22, 2013 at 9:59 AM, bhanu <bhanu at petrotel.com> wrote:
>>>>>>>>>
>>>>>>>>>> Please can anyone answer this query - is this forum active?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://vtk.1045678.n5.nabble.com/vtkUnstructuredGrid-Not-rendering-Overlapping-Cells-tp5718739p5718763.html
>>>>>>>>>> Sent from the VTK - Dev mailing list archive at Nabble.com.
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>>
>>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>
>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>>
>>
>>
>> --
>> William J. Schroeder, PhD
>> Kitware, Inc.
>> 28 Corporate Drive
>> Clifton Park, NY 12065
>> will.schroeder at kitware.com
>> http://www.kitware.com
>> (518) 881-4902
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130222/34ee6272/attachment.html>


More information about the vtk-developers mailing list