Hi Luc,
Incidentally, thanks also for the thread link and the suggestions re potential culling issues. I disabled automatic calculation of near/far planes and fixed the code to work with manual settings, but the symptoms remained the same (ephemeris model enabled warps shadows), although I think my experimentation there might help out with some (unrelated) issues I had previously encountered and put on the backburner.
Going through the thread you provided, the idea of using a dedicated prerender camera to contain the dome seems to have been successfully used by others, so that might give me something else to experiment with. I might also code up my own skysphere-building code as it would let me compare the results with the osgEphemeris implementation to narrow down where the problem is coming from (osgEphemeris, or the distant geometry).
Thankyou again for your thoughts on this one. My attempts to solve this one have felt a bit aimless, and you've helped narrow down the focus somewhat. Much appreciated. :)
Garth On 05/04/12 23:30, Luc Frauciel wrote:
Hi Gath, I use osgShadow (VDSM) and osgEphemeris in conjunction, and they seem to work together. However, there are known problems related to osgEphemeris which are broader : - The Skydome in osgEphemeris can be very large, causing unwanted interaction with culling/ nearfar planes. see http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-April/026772.html long thread, but with useful hints towards solutions - I remember problems with clearing operation, but probably related to solutions to the previous problem. If the only thing that you want is a skydome, osgEphemeris is an overkill for that. You probably still have to consider the culling problems introduced by skydomes (a scene with a skydome is artificially big). Luc De : Garth D <[email protected]> A : OpenSceneGraph Users <[email protected]> Date: 05/04/2012 15:34 Objet : [osg-users] Using osgShadow with osgEphemeris (or alternatives) Envoyé par : [email protected] ------------------------------------------------------------------------ Hi everyone, In OpenSceneGraph 3.0.1, is there a known fundamental incompatibility between osgShadow and osgEphemeris (circa 4/4/12)? I am using osgShadow (namely ShadowTexture), with both animated and static models, and started to work in osgEphemeris in order to provide a more interesting sky than a single static colour. One thing I noticed is that whenever osgEphemeris is working, the location of cast shadows shifted around significantly, and they are nowhere near the objects that are casting them (ie. the shadows were very clearly incorrect). Depending on the view angle, they also bounced around to different locations. I noticed that animated models no longer cast shadows, but that may have just been a symptom specific to my particular case. In case the node mask was causing a problem (for osgShadow I am using 1 to cast, and 2 to receive), I tried different values. Setting it to zero caused the EphemerisModel to vanish (is this normal?), and to four left it there, but didn't help the shadow situation. In any case, when the EphemerisModel was working, the shadows were shifted around and incorrect. I've tried disabling lighting on the model (via state sets and GL_LIGHTING), as well as attaching it to different nodes, but I don't seem to have struck upon the correct combination. Interestingly enough, if I use either on their own, they work fine. Shadows work fine, without ephemeris models; and ephemeris models seem to produce good results if I turn off shadows. Can anyone suggest any things to try, confirm there are known problems, or otherwise? On a side note, I began to investigate osgEphemeris in the first case as I needed a simple sky. My requirements are pretty low, as the sky is merely decorative, so I don't necessarily *have* to use osgEphemeris specifically. I am wondering what the best approach to sky creation in OSG 3.0.1 would be? The potential solutions I ran into were: - Use the sky code osghangglide as a base/inspiration. - Find a spare $1.5k and use SilverLining (a bit overkill for my application at present!) - Use "skydome.osgt" from the OpenSceneGraph data dir (I gave this a shot, but I wasn't able to successfully get it working correctly with the rest of my app) - Build up my own geometry, customising the texture coordinates as I need (the most flexible approach, but the most time consuming, and the most pointless if someone has done it already), and grab or buy some existing sky textures to match the expected texture. - Use osgEphemeris, which is what I'm looking at above. Are there other solutions that I should be exploring as well, or in preference? Garth _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

