PDA

View Full Version : HDRI lighting...



gunslinger
12-12-2003, 01:47 AM
hi everybody,
recently i came across a very good global lighting tecnique named HDRI. It is something like a radiosity algorithm, but more enviroment dependent. With that u can melt the far scene and the local object in a very realistic and convincing way. As i saw so far it is all pre-calcolated and useful just in static renderings. I hate static... I'd like to import it in my opengl app, realtime http://www.opengl.org/discussion_boards/ubb/smile.gif
Now my question is. How can i override OGL lighting engine and use mine. (well using the engine i'll write as soon as i'll manage to actually write one http://www.opengl.org/discussion_boards/ubb/cool.gif ). I am not really an advanced user, but i was afraid that in the beginners forum no one would be able to help me! thx The Gunslinger

AdrianD
12-12-2003, 05:51 AM
one way to override opengl lighting is to use vertexprogramms with own lighting code.
..another way to "overide" the opengl lighting is not to enable it at all, and to compute the lighting on the cpu, and storing the lighting resultls in an color array.(vertex lighting)
and the last method is to use lightmaps (precomupted lighting textures).

jwatte
12-12-2003, 07:47 PM
You can also use environment cube maps with NORMAL_MAP texgen mode for diffuse environment illumination, and REFLECTION_MAP texgen mode for specular environment reflection. Typically, you want something like:

NORMAL_MAP * DIFFUSE_COLOR_MAP + REFLECTION_MAP * REFLECTIVITY_MAP

which is one pass on GeForce 3 and two passes on GeForce 2. DIFFUSE_COLOR_MAP and REFLECTIVITY_MAP are object-surface description maps.

gunslinger
12-14-2003, 11:21 PM
thank you,
i will work on those hints asap. In case i'll get stuck, be aware that i'll get back here asking help http://www.opengl.org/discussion_boards/ubb/wink.gif
bye The Gunslinger