OpenGl sun
I have a space scene (the camera is located inside a box textured in stars...). I want to draw a sun inside this box. I can draw a textured sphere but i don't know how to "throw" light from this sphere. Or i can create the sun only with many lights? That's why i am asking for some technique of creating it. :)
Like AP said, if you want you can use GL Lighting which for simple effects is decent and automatic,
Heres a chapter out of the opengl Red book that has some code samples and the explanation of how to use it
Just remember that because the Sun emits light turn off lighting for it, else you'll end up with a dark ball at the center of a lit solar system ;)
Heres a chapter out of the opengl Red book that has some code samples and the explanation of how to use it
Just remember that because the Sun emits light turn off lighting for it, else you'll end up with a dark ball at the center of a lit solar system ;)
or you can make the sun illuminate using opengls built-in functions, i think you can get all the light effects on the sun that way? I don't know if the illuminate methods just makes the sun plainly colored though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement