[vtkusers] Unable to change the color of a contoursurface made from sampling an implicit sphere function

Mike Taverne Mike.Taverne at bristol.ac.uk
Fri Jul 25 14:37:40 EDT 2014


Ok, I have partially solved my problem.

Running the same script on another computer, I get a completely red sphere
(inside and outside).

And by adding "sphere_mapper.ScalarVisibilityOff()", I now get the expected
green sphere.

I will try on the previous computer again as soon as I can, but I suspect
it won't work or I will only get a green inside (since I had tried changing
the scalar visibility setting before without success).

So it seems to be some sort of graphics driver issue, although I don't
understand why normal polydata objects render without issues, but one
created via contouring/sampling does not.

Any tips on solving the rendering issue would still be appreciated...
Are there maybe any rendering/shading settings I can use to work around it?



2014-07-25 17:59 GMT+01:00 Mike Taverne <Mike.Taverne at bristol.ac.uk>:

> Hi,
>
> I have some strange VTK rendering problems.
>
> The attached code should create one blue sphere via:
> vtkSphereSource -> vtkPolyDataMapper
>
> And one green sphere via:
> vtkSphere -> vtkSampleFunction -> vtkContourFilter -> vtkPolyDataMapper
>
> But for some reason, the second sphere, created via a contour filter,
> always renders completely in black on the outside and red on the inside.
>
>
> How can I get the second sphere to be colored?
>
> I originally noticed that problem while trying out the iceCream.py
> example and have the same issue with C++ versions of the code.
>
>
> Version info:
> -Python 2.7.6
> -vtk version 6.1.0
>
> OS:
> -Ubuntu 14.04.1 LTS
>
> Also attaching glxinfo output.
>
>
> Regards,
> Mike
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140725/a7a8216f/attachment.html>


More information about the vtkusers mailing list