SkyNode per view or global light source per view? #2336
-
Our application currently supports multiple 3D views that share the same mapNode. Right now, were using the simple sky node for illumination of the scene which is shared with all the views. We would like to have an illumination source for each 3D view in the scene so that each camera can be at different locations on the earth and have its own light source. As it stands right now, we are unable to do this because the skyNode sits above the mapNode which is shared with all the views. We don't want to have a mapNode per view for performance reasons. My question is, is it possible to have a skyNode or the simple sky node per view that is independent of the others? If the answer is "no", is there a way to set a global light source (e.g. osg::View::SKY_LIGHT) for each view and have it play with osgEarth shaders? Any help or feedback would be appreciated... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to solve the problem by simply making the mapNode have multiple skyNode parents. Each view is then attached to its respective skyNode with the calls
followed by
Each skyNode has its own Ephemeris function for independent control. |
Beta Was this translation helpful? Give feedback.
I was able to solve the problem by simply making the mapNode have multiple skyNode parents. Each view is then attached to its respective skyNode with the calls
skyNode->attach(view)
followed by
view->setSceneData(skyNode)
Each skyNode has its own Ephemeris function for independent control.