[osg-users] requesting help on lighting system

Paul Martz pmartz at skew-matrix.com
Tue Mar 31 09:47:44 PDT 2009


Eight light sources is only a limit of the fixed function pipe. You say you
are already doing per-pixel lighting in a shader, so I don't understand how
you could possibly still encounter an eight-light limit. You can have as
many lights as you want in a shader.

Of course, using more lights in a shader will show down your rendering, so
you'll still need some kind of scheme to alleviate per-pixel light
processing, such as light maps or limiting light affect to a specific area
by using attenuation.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Can Hosgor
Sent: Tuesday, March 31, 2009 9:10 AM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] requesting help on lighting system

Hello,

We are developing a commercial game/simulation engine based on
OpenSceneGraph. We will be using this engine for a driving simulator that
takes place in urban environments. Right now our most challenging problem is
how to implement a high performance lighting system without compromising
visual quality. 

The first issue was the poor lighting quality offered by fixed function
pipeline, which we tried to overcome by using per-pixel lighting in shaders.

The second issue we faced was the 8 light source limit of OpenGL. We tried
to overcome this issue by using either selective lighting or multipass
lighting. Selective lighting was fast, but introduced visual awkwardness
like suddenly switching on light sources while navigating the environment.
The multipass solution was better, but it degraded performance when used in
combination with shaders.

Since most of the lights in our scene are static (i.e. street lamps), we
thought about disburdening the gpu by using lightmaps for static light
sources. Unfortunately, using the lightmap generation offered by modelling
tools is not an option since our customers will be able to create new
environments in a custom "map editor" application. We implemented a simple
lightmap generator which generates a separate lightmap for each drawable and
for each light state (on/off), but this heavily increased our memory usage. 

We would like to hear your opinions on how we should progress from now on.
Also, some sources of information regarding the subject will be very much
appreciated.

Thanks in advance,
Can Hosgor

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9502#9502





_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list