[vtkusers] shading bug in vtk 6.2?

marcin.krotkiewski marcin.krotkiewski at gmail.com
Wed May 27 08:00:39 EDT 2015


Hi,

I have a problem with shading in VTK 6.2 when using OpenGL2. The problem 
is visible when using lightkit, but not with simple scene light. I have 
attached pictures that demonstrate the problem.

- model.jpg shows the 3D surface I am looking at - three combined 
gaussians.
- shading_flat.jpg and shading_gouraud.jpg show a view from below at a 
place in the shadows, with steep surface slope. Both pictures are taken 
at the same camera position.

shading_flat.jpg shows a strange patch that seems to me is a shading 
artifact. In contrast, shading_gouraud.jpg shows a nice, smooth gradient 
in the shadows. I have tested my code using vtk 6.1 and the result is 
different, i.e., similar to that shown in shading_gouraud.jpg.

It seems also that the artifact is not there (or not visible) when 
lightkit is switched off. I have played around and I think it is caused 
by the fill light in the lightkit. Depending on the position of the fill 
light I can make this artifact patch all black.

Could this be a bug related to the new OpenGL2 rendering engine?

Thanks,

Marcin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150527/0df1d53e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: model.jpg
Type: image/jpeg
Size: 40946 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150527/0df1d53e/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shading_flat.jpg
Type: image/jpeg
Size: 46665 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150527/0df1d53e/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shading_gouraud.jpg
Type: image/jpeg
Size: 41895 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150527/0df1d53e/attachment-0005.jpg>


More information about the vtkusers mailing list