specular lighting example from the orange book
I set up the multitexturing example from the orange book where it applies a texture of the earth and a gloss map to a sphere. My issue is with the spectral highlight. It looks great when viewing the earth with the sun behind the "camera" (viewing the day side of the planet). However, when I orbit the camera around to where the earth begins to eclipse the position of the light source the highlights seem to be unnatural because the light begins to highlight areas of the sphere well beyond where daylight ends. To explain it another way, the spectral highlight wraps past where light directly hits the sphere so that the specular component is non-zero where the diffuse component is zero. Even when the camera is completely behind the earth in line with the light source, the edges of the earth show slight highlighting from the specular component.
Looking through the code, it makes sense to me that this should be happening, but it doesn't look right. Has anyone heard of the problem I described?
I'll have some screen shots in about 15 min.
The lighting here is all in the same direction which is given as the vector passing through the center of the sphere and that little white dot on the back surface of the sphere. The rose shaded region represents all areas of the sphere which do not receive any light (dot product between the light vector and surface normal is <= 0 with the light vector pointing to the source of light). I have blended the specular component into the rose color which is why the rose region does not have a clean line on its boundary. The specular highlight is apparent on the left side of the sphere and instead of fading out before it hits the edge of daylight, it extends past into the night region. The tiled dark pattern is the effect of the gloss map of the country India. I only have partly assembled images for the texturing so that is why I don't have the entire earth mapped on there. The daylight texture is just blue across the entire planet.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement