|
(0003976)
|
|
Mathieu Malaterre
|
|
2006-04-06 17:09
|
|
copying comments from 2nd url
I've also struck the problem of images rendering fine on-screen
but losing their user-defined lighting when rendered off-screen.
e.g. into the clipboard. One place damage may occur is here:
void vtkOpenGLRenderer::DeviceRender(void)
{
this->RenderWindow->MakeCurrent();
this->ClearLights(); <--- clears all lights!
this->UpdateCamera();
this->UpdateLightGeometry();
this->UpdateLights(); <--- not properly restored?
glMatrixMode(GL_MODELVIEW);
this->UpdateGeometry();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}
If no user-defined lights are active, then UpdateLights() adds
a headlight and at least there is some light in the image. But
(guessing here) if we have added a custom set of lights, then
these are lost in the call to ClearLights(); but not restored
in UpdateLights(). And since there is a "non-zero" number of
lights, the default headlight is not added, and scene is dark.
My (solution :-) when making movies, is to turn off light-kits
or other user-defined lights, and adjust the scene to be visible
with just the default headlight (which is better than nothing).
If I get time, I plan to build a debug Vtk and trace this. |
|