<HTML>
<HEAD>
<TITLE>Re: [vtkusers] diffuse lighting after scaling with negative values</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
Hi Manuel,<BR>
You should just rotate your actor 180 degrees rather than using the scale. &nbsp;This would avoid these kinds of problems.<BR>
Gerrick<BR>
<BR>
<BR>
On 9/3/08 1:55 PM, &quot;Manuel Feige&quot; &lt;<a href="manuelfeige@googlemail.com">manuelfeige@googlemail.com</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:11pt'><FONT FACE="Arial">Hello,<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">my application needs to mirror the actors with respect to the x-y-plane. I can do this by </FONT></SPAN><FONT SIZE="4"><FONT FACE="Times New Roman"><SPAN STYLE='font-size:14pt'>vtkProp3D::SetScale(1, 1, -1). Unfortunately the diffuse lighting does not work after this transformation (the ambient lighting does). In this example the cone appears gray instead of white.<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><FONT FACE="Arial">int main()<BR>
{<BR>
vtkConeSource* cone = vtkConeSource::New();<BR>
vtkDataSetMapper* mapper = vtkDataSetMapper::New();<BR>
mapper-&gt;SetInput(cone-&gt;GetOutput());<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">vtkActor* actor = vtkActor::New();<BR>
actor-&gt;SetMapper(mapper);<BR>
actor-&gt;GetProperty()-&gt;SetRepresentationToSurface();<BR>
actor-&gt;GetProperty()-&gt;SetColor(1.0, 1.0, 1.0);<BR>
actor-&gt;GetProperty()-&gt;SetAmbient(0.5);<BR>
actor-&gt;SetScale(1,1,-1);<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">vtkRenderer* renderer = vtkRenderer::New();<BR>
renderer-&gt;AddActor(actor);<BR>
vtkRenderWindow* renWin = vtkRenderWindow::New();<BR>
renWin-&gt;AddRenderer(renderer);<BR>
vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();<BR>
iren-&gt;SetRenderWindow(renWin);<BR>
iren-&gt;Initialize();<BR>
iren-&gt;Start();</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
&nbsp;<BR>
</FONT><FONT FACE="Arial">//Delete...<BR>
}<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">Any suggestions how I can get the diffuse lighting running?<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"> <BR>
</FONT><FONT FACE="Arial">Thanks in advance<BR>
Manuel Feige<BR>
</FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></FONT></SPAN><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
This is the private VTK discussion list.<BR>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><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>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>