Hi J-S,
1. single light source object can be placed two times to the scene.
Because of multi-parenting, the light may have two different
transformations. Although one object and one unique pointer, it
identifies two light sources, thus it is not unique light
identification.
How do you give a single light source two different OpenGL light IDs?
Or do you manage that all in shaders, thus without the restrictions of
light IDs?
No, because it is one light source, it has one OpenGL ID.
As I understand it, if we're on the fixed pipeline then
multi-parenting lights wouldn't make sense because the light would
still have only one ID, and the traversal would just use the last
(first?) transformation when sending that light's state each frame.
How would you handle this?
Let's expect a large train station model with many trains, each composed
of many wagons. The wagons are for passangers and because it is night,
there are light sources in the wagons. The wagon model is definitely
loaded from file only once and reused, say hundred times throughout the
large train station for each wagon (let's expect just one type of
wagons). And because the light is stored in the wagon model, each wagon
will use the same light for lighting the interior of the wagon (not
exterior). The camera can be on any place and I always see through the
windows of wagons their lit interiors. The same light is instanced using
multiparenting in all the wagons in the train station, still using the
same OpenGL ID.
This works perfectly in OSG until I start to think about shadows... :-) ....
Maybe, it is a border case, but I wish OSG can handle any scene....
If I am designing something, I want to do it in a way to handle most
possible situations to avoid people having issues.
Hope, there is a solution for it. Thanks for your recent comment.
John
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org