Hi Bill, thanks for your response, but <div>I am curious to Phong illumination (reflection) model not to Phong shading. </div><div><a href="http://en.wikipedia.org/wiki/Phong_reflection_model">http://en.wikipedia.org/wiki/Phong_reflection_model</a> </div>
<div>Have a nice day<br><br><div class="gmail_quote">On 29 July 2012 19:10, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If I recall, by default, uses gouraud shading as implemented in opengl:<br><a href="http://en.wikipedia.org/wiki/Gouraud_shading" target="_blank">http://en.wikipedia.org/wiki/Gouraud_shading</a><br>For very small polygons (< 1 pixel) I believe that Gouraud shading approaches Phong Shading.<br>
<br>I believe you can program any illumination model you want with vtk programmable shaders.<br><br><br><div class="gmail_quote"><div><div class="h5">On Sun, Jul 29, 2012 at 9:44 AM, Jana Sefcikova <span dir="ltr"><<a href="mailto:neollie@gmail.com" target="_blank">neollie@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi, I made small algorithm when I am manually computing phong illumination. <div>What illumination formula is used in VTK ? It looks that is not phong illumination. </div>
<div>I would need obtain same color as VTK made is. </div>
<div>---------------------------</div><div>I made small test : </div><div><br></div><div><div>My 'phong' illumination formula is :</div><div> I = kd * abs((n*l)) + ks * abs(h*n) ; </div><div>where diffuse term kd = 0.6 and specular term ks = 0.4, </div>
<div>view vector is default v = (0,0,1), light vector l is also located at (0,0,1), </div><div>n is normal at the point, and h is standard halfway vector.</div><div><br></div><div>For comparison with VTK I used same settings for drawing purely with vtk setting property :</div>
<div>actor->GetPorperty()->SetAmbient(0);</div><div>actor->GetProperty()->SetDiffuse(kd);</div><div>actor->GetProperty()->SetSpecular(ks)</div><div><br></div><div>The results are different, see attached picture.</div>
<div><br></div><div>Therefore it looks that VTK is not using pure phong. So what illumination formula is used in VTK ? </div><div>It is done via shaders ? Or it is somewhere computed ? </div><div>Where is made color computation in vtk, where those ambient, diffuse, specular coefficient are used ? </div>
<div>I found method GetColor() in vtkProperty() , but it has different meaning, but i am searching for s.t. like this.</div><div><br></div><div><br></div><div>Any hint would be highly appreciate.</div><div>Thanks in advance. </div>
</div><div><br></div><div><br></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">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" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</font></span></blockquote></div><br></div>