PDA

View Full Version : how can i create global lighting model?



bala
11-07-2002, 09:00 PM
someone told me that in OpenGL only has local
lighting model, is it true?
can i create global lighting model in OpenGL?

mikael_aronsson
11-08-2002, 12:06 AM
Hi !

The short answer is no, but of course you can implement global lighting, but if you do you loose almost all acceleration, so it would not be any faster then doing it without OpenGL.

What you could do would be to use radiosity, the nice thing with that is that it is run as a precprocessing step, then yon use the generated solution for your own rendering, it's camera independent so you can change the view without having to regenerate the data.

The downside is that radiosity is pretty useless for anything but indoor scenery.

If need true global lighting you need a raytracer, maybe combined with photon mapping, but now we are getting sloooow here.

Mikael