Skip to main content
gamedev.net
🔒 Locked

specular lighting

Started by The Atomic Mouse 0 replies 550+ views
Original Post
The Atomic Mouse
The Atomic Mouse
Hello, I''m working on a solar system editor which allows you to add planets, moons, comsats and everything. I added some light in my project coming from the sun, making it to light the satellites orbiting around it. Ambiant, Diffuse and emission lights seems to work correctly, but specular is not correct. Here is the problem: When the project starts, the camera is centered in the Z axis looking at the origin, where is located the sun. We can then create planets on the XY plan orbiting the sun. Planets are displayed using gluSphere. Using this view, the specular spot drawn on my planets is correct. As you know, the specular spot location on the objects depends of the angle created by the light, the lit object and camera locations. If you move the camera, the specular spot should then ''move'' on your object. but in my project, when I change the camera location, the specular spot on my planets doesn''t move, its like if OpenGL was thinking that the camera is still located on the Z axis. So when making its calculations using those coordinates, the specular spot on my planets are not at the right place when the camera has been moved. Anybody knows why its doing that?? I hope I have been clear in the explanation of my issue. Thanks very much for any help. -The Atomic Mouse

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.