Skip to main content
GameDev.net gamedev.net
🔒 Locked

Planet lighting

Started by Lode Aug 5, 2002 at 5:06 PM 0 replies 700+ views
Original Post
Lode
Lode
I''ve got a fully working star system in OpenGL with planets and a star, with realistic sizes and distances. The planets are gluSpheres. To avoid ZBuffering problems, the camera is always at position 0,0,0 and the world translates instead, and when a planet is further than a certain distance from the camera, it gets drawn at that distance and smaller so you can''t see the difference. Now I want the star (=sun) to enlight the planets. Currently I just use fake lighting by adding a shadow part on the planet texture, but it sux, painting on a spherical texture is difficult, and I want the planets to rotate slowly, so I want to use glLightfv (or glLightiv???). What would you do?? Remember the huge distances, and that most planets are in fact drawn much closer and smaller instead so their positions in vidcard memory are not the same as in the star system. Please give suggestions for this one... Thanks.

Topic Locked

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

Sign in to reply to this topic.