View Full Version : directional vs position light
Ive got a strange problem, when i use a directional light, some models i load have a rapid and intense change of light across the model surface as i rotate it. Even shperical type models. Its like parts of the model transition suddenly from light to dark and visa versa. This only happens on some models and not at all when i use positional lights
any help appreciated
06-17-2004, 12:07 AM
It might be easier to help you if you could post some code :)
06-17-2004, 04:29 AM
Wild guess: Those models have non uniform scale factors (or indeed, any scale factor) and you haven't put a glEnable(GL_NORMALIZE) in your code. Normalization is very cheap on mostmodern hardware, but scaling (especially non uniform scaling) can cause other problems so in general it's better to avoid it and keep your transforms rigid body. There are alwys exceptions of course.
i dont think so, the models are normalised when loaded and i am calling glEnable(GL_NORMALIZE). the problem dose not occur with a positionallight, but does with a directional light. It very strange
06-17-2004, 08:48 AM
Double check that you do all your matrix manipulations on the modelview stack, except for projection (glFrustum/glOrtho/gluPerspective).
Ie all calls to glScale, glRotate, glTranslate, glLoadMatrix and glMultMatrix.
are correctly done on on the modelview stack
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.