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