I'll bet your normals are point "in" rather than "out".  Try vtkReverSense on the output of your isosurface.<br><br>On Mon, Jul 2, 2012 at 2:37 PM, Dale "Luke" Peterson <<a href="mailto:hazelnusse@gmail.com">hazelnusse@gmail.com</a>> wrote:<br>
> I tried ScalarVisibilityOff() and it didn't fix the problem.  However,<br>> it did make me realize that the problem is different from what I<br>> originally thought.  I've attached two window screen shots, both with<br>
> ScalarVisibilityOff().  The only difference is that in the second one,<br>> I've called contourActor->GetProperty()->SetColor(0, 0, 1).  You can<br>> see that the blue color is just barely visible.<br>
><br>> Just to check, I tried setting ScalarVisibilityOn(), and then repeated<br>> the test with and without calling SetColor(0, 0, 1).  In both cases<br>> the surface appears to be very dark but slightly red.  So it seems<br>
> like red is the default color for the zero-level curve, but for some<br>> reason, my surface is showing a whole lot darker than I would like.<br>><br>> Thanks for suggestion and let me know if you have any other ideas.<br>
><br>> Thanks,<br>> ~Luke<br>><br>><br>> On Mon, Jul 2, 2012 at 10:51 AM, Jothy <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>> wrote:<br>>> Can you try contourMapper->setScalarVisibilityOff()<br>
>><br>>> Jothy<br>>><br>>> On 02-Jul-2012, at 5:52 PM, "Dale \"Luke\" Peterson" <<a href="mailto:hazelnusse@gmail.com">hazelnusse@gmail.com</a>> wrote:<br>>><br>>>> I subclassed vtkImplicit function and implemented EvaluateFunction()<br>
>>> and EvaluateGradient().  I then use vtkSampleFunction,<br>>>> vtkContourFilter, vtkPolyDataMapper, and vtkActor and add the actor to<br>>>> a renderer.  I am only interested in one iso-surface, the zero<br>
>>> iso-surface, and in the past it always displayed in red.  Something<br>>>> changed (likely in my code) but I can't figure out what, and the the<br>>>> surface renders only in black.  I have tried calling<br>
>>> GetProperty()->SetColor() on the actor but this has no effect.  I also<br>>>> tried dropping in example code for the vtkSphereSource which shows up<br>>>> blue, as in the tutorial.  Based on this, I'm guessing that there is<br>
>>> something going on with vtkSampleFunction, vtkContourFilter, or<br>>>> vtkPolyDataMapper, but I can't figure out what.<br>>>><br>>>> I am doing all of this in my own subclassed QVTKWidget, and the color<br>
>>> used to work fine.  I also have a minimal example of the surface that<br>>>> doesn't use QVTKWidget and it shows the surface in red.  Perhaps there<br>>>> is something strange going on in Qt?<br>
>>><br>>>> Any ideas on what might be going on?<br>>>><br>>>> The relevant code I have in the constructor of my QVTKWidget subclass is:<br>>>><br>>>>  configurationSurface = vtkSmartPointer<vtkHolonomicConstraint>::New();<br>
>>>  sample = vtkSmartPointer<vtkSampleFunction>::New();<br>>>>  sample->SetSampleDimensions(50, 50, 50);<br>>>>  sample->SetImplicitFunction(configurationSurface);<br>>>>  // Create the 0 isosurface<br>
>>>  contour = vtkSmartPointer<vtkContourFilter>::New();<br>>>>  contour->SetInputConnection(sample->GetOutputPort());<br>>>>  contour->GenerateValues(1, 0.0, 0.0);<br>>>>  contour->Update();<br>
>>><br>>>>  // Map the contours to graphical primitives<br>>>>  contourMapper = vtkSmartPointer<vtkPolyDataMapper>::New();<br>>>>  contourMapper->SetInputConnection(contour->GetOutputPort());<br>
>>><br>>>>  // Create an actor for the contours<br>>>>  contourActor = vtkActor::New();<br>>>>  contourActor->SetMapper(contourMapper);<br>>>><br>>>>  // Has no effect: still shows up as black.<br>
>>>  contourActor->GetProperty()->SetColor(0,0,1);<br>>>><br>>>> Thanks,<br>>>> Luke<br>>>><br>>>><br>>>> --<br>>>> “People call me a perfectionist, but I'm not. I'm a rightist. I do<br>
>>> something until it's right, and then I move on to the next thing.”<br>>>> ― James Cameron<br>>>> _______________________________________________<br>>>> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
>>><br>>>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>>>><br>>>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>><br>>>> Follow this link to subscribe/unsubscribe:<br>>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br>><br>> --<br>
> “People call me a perfectionist, but I'm not. I'm a rightist. I do<br>> something until it's right, and then I move on to the next thing.”<br>> ― James Cameron<br>><br>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br><br><br><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>