Page MenuHome

Specular changing when camera rotates (it's using infinite viewpoint instead of local)
Closed, ArchivedPublic

Description

Group: current SVN version
Resolution: Fixed
Category: Game engine

If you run this example file and press P and space, you will see that the specular is changing when we rotate the camera.

The reason can be read here: http://gregs-blog.com/2007/12/21/theres-nothing-wrong-with-opengls-specular-lighting/

It's basically the lack of this call:
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);

I hope this can be discussed in bf-comitters or here. But for now I will keep this short like that :)

Event Timeline

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.Feb 6 2009, 8:21 PM

Thanks a lot Brecht.

Though for some reasons I still need to call glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE) in the ApplyLights function for the dome.

I will try to spot if this is another bug or something. I will let you know.

And here is the video I promised you :)
http://vimeo.com/3170858

As you can see there is something in glsl mode that still doesn't look correct. Maybe the CSpec (you can see the line in the middle of the screen splitting the two renders).

Or ... (guessing) ... maybe the lights are not being deleted/turned off between renders. This could explain why if we have an overlay scene, the lights of the first scene affect the second one. (to test it load the new attached file - over.blend) press P, then 2 to load an overlay scene, then 1, 1, 1, 1,... you can see that each interaction in the main scene affects the 2nd one).

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.