<div><br>Hello John & NG,</div>
<div> </div>
<div> I made a relatively small example (with a VTK data file) that shows the problem. Basically, once loaded the VTK file, just zoom since the grid occupies all the available screen space of the VTK window (more or less). Then, if you rotate the scene you will see that the grid is corrupted in some zones (you will see some artifacts). This may be reproduced using:
</div>
<div> </div>
<div>1) The script I am attaching (sorry it's Python);</div>
<div>2) Mayavi</div>
<div>3) Paraview</div>
<div> </div>
<div>At this point I don't know what to do or to think... does anyone have a suggestion? Could please someone try and see if he/she gets the same results? The VTK Data file is here:</div>
<div> </div>
<div><a href="http://xoomer.virgilio.it/infinity77/KPO3.zip">http://xoomer.virgilio.it/infinity77/KPO3.zip</a></div>
<div> </div>
<div>It's 600 Kb zipped and about 5 MB unzipped... sorry for that, but it is the only grid I have to show that problem...</div>
<div> </div>
<div>Thank you very much for every suggestion/hint.</div>
<div> </div>
<div>Andrea.</div>
<div><br># Python Script</div>
<div>
<p>import vtk</p>
<p>reader = vtk.vtkUnstructuredGridReader()<br>reader.SetFileName("KPO3.vtk")<br>reader.SetScalarsName("cell_scalars")</p>
<p>grid = reader.GetOutput()<br>grid.GetCellData().SetActiveScalars("cell_scalars")<br>data_range = grid.GetScalarRange()</p>
<p>surfaceMapper = vtk.vtkDataSetMapper()<br>surfaceMapper.SetInput(grid)<br>surfaceMapper.SetScalarRange(0, 14600)<br>surfaceMapper.GlobalImmediateModeRenderingOn()</p>
<p>surfaceActor = vtk.vtkActor()<br>surfaceActor.SetMapper(surfaceMapper)</p>
<p>ren = vtk.vtkRenderer()<br>renWin = vtk.vtkRenderWindow()<br>renWin.AddRenderer(ren)<br>iren = vtk.vtkRenderWindowInteractor()<br>iren.SetRenderWindow(renWin)<br>iren.GetInteractorStyle().SetCurrentStyleToTrackballCamera()
</p>
<p># Add the actors to the renderer, set the background and size<br>ren.AddActor(surfaceActor)</p>
<p>ren.ResetCamera()<br>ren.ResetCameraClippingRange()</p>
<p>ren.SetBackground(0, 0, 0)<br>renWin.SetSize(750, 400)</p>
<p>iren.Initialize()<br>renWin.Render()<br>iren.Start()</p>
<p># End Pythin Script</p>
<p> </p></div>
<div><span class="gmail_quote">On 4/4/06, <b class="gmail_sendername">Andrea Gavana</b> <<a href="mailto:andrea.gavana@gmail.com">andrea.gavana@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr">
<div>Hello John,</div>
<div> </div>
<div> thank you for your answer. Well, I don't think I have coincident cells, and at the moment I have taken the screenshots I didn't have any filter. I had just an unstructured grid with a property selected. BTW, I noticed that the effect disappears *only* when I rotate the grid in such a way that its upper surface is perpendicular to my eyes' view (parallel to the screen... I don't know how to explain it better...). But obviously I can not leave it always in that position...
</div>
<div> </div>
<div>Thank you for your suggestions.</div></div>
<div style="DIRECTION: ltr"><span class="sg">
<div> </div>
<div>Andrea.<br><br> </div></span></div>
<div style="DIRECTION: ltr"><span class="e" id="q_10a63f9da1704f7b_2">
<div><span class="gmail_quote">On 4/3/06, <b class="gmail_sendername">John Platt</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:jcplatt@dsl.pipex.com" target="_blank">jcplatt@dsl.pipex.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr">
<div>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi Andrea,</span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Do you have any coincident cells with different scalars (some filters will merge points when they are very close).
</span></font></p></div>
<div style="DIRECTION: ltr"><span>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">John.</span></font></p></span></div>
<div style="DIRECTION: ltr"><span>
<p><font face="Arial" color="navy" size="2"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"> </span></font></p>
<p style="MARGIN-LEFT: 36pt"><font face="Tahoma" size="2"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">-----Original Message-----<br><b><span style="FONT-WEIGHT: bold">From:</span></b> vtkusers-bounces+jcplatt=<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:dsl.pipex.com@vtk.org" target="_blank">
dsl.pipex.com@vtk.org</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org" target="_blank">vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org</a>]
<b><span style="FONT-WEIGHT: bold">On Behalf Of </span></b>Andrea Gavana<br><b><span style="FONT-WEIGHT: bold">Sent:</span></b> 03 April 2006 15:06<br><b><span style="FONT-WEIGHT: bold">To:</span></b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:vtkusers@public.kitware.com" target="_blank">
vtkusers@public.kitware.com</a><br><b><span style="FONT-WEIGHT: bold">Subject:</span></b> [vtkusers] Strange VTK Behavior...</span></font></p>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Hello NG,</span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> thanks to Amy, John, Goodwin and Prabhu I solved the problem of vtkThreshold (I think :-) ). Now everything seems OK, except one small thing. I have a vtkUnstructuredGrid in which I have some scalars. Now, irrespective of which scalar I am visualizing, I get strange visualization effects when I rotate/zoom the vtkUnstructuredGrid. For example and for comparison, please see the 2 pictures here:
</span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xoomer.virgilio.it/infinity77/AlmostOK.JPG" target="_blank">
http://xoomer.virgilio.it/infinity77/AlmostOK.JPG</a></span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xoomer.virgilio.it/infinity77/SomethingWrong.JPG" target="_blank">
http://xoomer.virgilio.it/infinity77/SomethingWrong.JPG</a></span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">They are showing exactly the same grid with the same scalars, but in the second one there are strokes of green that should not be there...
</span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Does anyone know what I am doing wrong? May it be a light problem?</span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Thank you very much for your help and suggestions.</span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt"> </span></font></p></div>
<div>
<p style="MARGIN-LEFT: 36pt"><font face="Times New Roman" size="3"><span style="FONT-SIZE: 12pt">Andrea.<br clear="all"><br>-- <br>"Imagination Is The Only Weapon In The War Against Reality."<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xoomer.virgilio.it/infinity77/" target="_blank">
http://xoomer.virgilio.it/infinity77/</a><br> </span></font></p></div></span></div>
<div style="DIRECTION: ltr"></div></div></blockquote></div><br><br clear="all"><br>-- <br>"Imagination Is The Only Weapon In The War Against Reality."<br><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://xoomer.virgilio.it/infinity77/" target="_blank">
http://xoomer.virgilio.it/infinity77/ </a><br></span></div></blockquote></div><br><br clear="all"><br>-- <br>"Imagination Is The Only Weapon In The War Against Reality."<br><br><a href="http://xoomer.virgilio.it/infinity77/">
http://xoomer.virgilio.it/infinity77/</a><br>