Le Tue, 18 Nov 2008 18:50:17 +0100, dasari pavan kumar <[EMAIL PROTECTED]> a 
écrit:

> Hi,
>       I am relatively new to using Lights in openscenegraph. I would like to
> have a single light replicated 100 times at different places (The situation
> is something like this. I need to light all the rooms in an apartment.
> however every light is of the same ambient and diffuse color). But the
> lights are not being rendered in the scene. Can anyone help me with this
> situation ?
>
> I have created a LightSource with certain light properties and attached it
> to a group.
>
> Now I created different MatrixTransforms and added this lightGroup to these
> MTs as child.
>
> However cant see the result. If this is not the way it is to be done, plzz
> help me out with the solution.
>
> thanx in advance,
> pavan


Just to sum up a few points:
You are limited to 8 ligths by OpenGL. Each light must have a separate number 
in order to work.
Having the same light parameters is not important: you won't be able to 
"factorize" the lighting.
However in OSG, you are limited to 8 lights per RenderStage.
To have 100 lights, you need to use multiple RenderStages.
Else you can have only the most important ligths switched on (ie. the light 
sources in the current room). And to do my "advertising", you can use already 
existing code, such as the LightSourceManager from PVLE ( 
http://pvle.sourceforge.net/ - GPL'd ) which does 3/4 of the job.
http://pvle.sourceforge.net/Doc/Html/classLightSourceManager.html

But, as Gordon said, remember that more valuable information can be found in 
previous posts.

Sincerely, 

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to