PDA

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



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

SirKnight
11-08-2002, 05:17 AM
Global Illumination is done with ray tracing, and OpenGL is not a ray tracer, it's a triangle rasterizer. There is a paper about Global Illumination in real-time scenes from SIGGRAPH, you may want to check that out.

Oh and yes OpenGL uses a local illumination model. Maybe you will be interested in this page: http://trident.mcs.kent.edu/~farrell/cg02/lectures/color/illum_local.html

-SirKnight

[This message has been edited by SirKnight (edited 11-08-2002).]

Maj
11-08-2002, 06:37 AM
Global illumination is not exclusive to ray tracing. See particle tracing, radiosity, Doom3, etc.

SirKnight
11-08-2002, 07:50 AM
True it's not JUST done w/ ray tracing (I meant to add the word etc or something in my first post but I forgot, dang it) but all the techniques for global illumination is way different than how OpenGL does things.

Doom 3 does NOT do global illumination. They use the standard perpixel lights like we see in the demos on ATI's and NVIDIA's demos.

-SirKnight

Maj
11-08-2002, 08:58 AM
Hrm... you must be using a different definition of global illumination to me, then. Doom3 is pretty much equivalent to Whitted ray tracing after all, minus ideal specular materials.

EDIT: Bleh, can't even spell it properly now :P

[This message has been edited by Maj (edited 11-08-2002).]

zed
11-08-2002, 11:02 AM
im not 100% sure of all these (i really need to tidy up my list of links, ive prolly missed a few)
www.cix.co.uk/~colbeck/glutrad.htm (http://www.cix.co.uk/~colbeck/glutrad.htm) http://24.167.95.242/vault.html http://freespace.virgin.net/hugo.elias/radiosity/radiosity.htm http://www.uni-kl.de/AG-Heinrich/Alex.html http://www.cs.utah.edu/~schmelze/radiosity/proj/proj.html <http://graphics.lcs.mit.edu/~fredo/>
<http://www.cs.unc.edu/~zhangh/shadow.html>
<http://www-imagis.imag.fr/Membres/George.Drettakis/DM.html>
<http://www.cis.upenn.edu/~diefenba/home.html>
<http://www.cs.cmu.edu/~ph/shadow.html>
<http://www-imagis.imag.fr/Publications/1998/SS98b/MoreInfo.html>
<http://www.stereopsis.com/shadow/index.html>
<http://www.cs.cmu.edu/afs/cs/user/ajw/www/index.html>
<http://www.cs.yorku.ca/~wolfgang/publications.html> http://www.graphics.cornell.edu/~phil/GI/> http://www.helios32.com/resources.htm

Korval
11-08-2002, 11:55 AM
Doom3 is pretty much equivalent to Whitted ray tracing after all, minus ideal specular materials.

Doom3 applies a successive series of hacks in an attempt to fake the look of global illumination. There is nothing real going on there.

By contrast, Radiosity cannot help but be global diffuse perfect (to the degree that the objects are subdivided). Raytracing can be global specular perfect, if you have enough rays.

With scan conversion, the best you can really do is define a volume to be in shadow of a particular. That is nothing by comparison to either raytracing or radiosity. There's no concept of diffuse or specular interreflection in scan conversion, which is part of global illumination.

Don't let dynamic shadows fool you; it's still just a successive series of hacks.

Maj
11-09-2002, 08:32 AM
Well, I consider it global illumination if it takes non-local information into account (occlusion in Doom3's case).

Yes, if you want to define it as anything that takes interreflection into account then Doom3 is definitely not.

Personally, I'd say finite element radiosity and Whitted ray tracing are both hacks too, and that scan conversion has nothing whatsoever to do with lighting, but now I'm just being mean :P

Overmind
11-09-2002, 01:29 PM
Originally posted by Maj:
Well, I consider it global illumination if it takes non-local information into account (occlusion in Doom3's case).

According to your definition shadow volumes and shadow mapping would be global illumination...

In my opinion the most important part of global illumination is interreflection of the light source. Both raytracing and radiosity solve small parts of it, but it is far from perfect. The nearest approximation to global illumination is the photon casting approach in povray. With a polygon renderer you don't have a chance to get global illumination except you try to fake the effect (which may not be that hard, because we are really bad at recognising correct lighting without having a correct image to compare with).

The various dynamic shadowing technics are only hacks. They don't really calculate anything, they basically just turn on/off lightsources on a per-pixel basis. Shadowing has (nearly) nothing to do with lighting. Shadowing is only the decision IF you calculate lighting on a surface/lightsource pair.