[osg-users] Precipitation problems

Robert Osfield robert.osfield at gmail.com
Thu Dec 20 00:34:14 PST 2018

HI Bruce,

When I wrote the osgParticle::PrecipitationEffect is was specifically for
local ground based usage, I didn't attempt the handle the case of a
geocentric scene.  Off the top of my head I don't know if would be possible
to adapt it - I'd need to sit down spend time review the code and thinking
about the particular usage case, unfortunately I don't have much free time
right now so can't just head off looking into stuff.

As a general statement, if I were to write a precipitation effect for a
geocentric application right now I'd want to add extra rendering
constraints to the rendering technique over what PrecitpitationEffect
uses.  I would want to add geometric constraints for the coverage of the
effect and support having multiple blocks of precipitation - essentially
have it so we have the ability to have individual clouds with precipitation
beneath them.  These precipitation blocks would naturally have their own
transform that could place them in a geocentric setting.

This is differs from PrecipitationEffect as it uses an infinite effect
approach.  This scales beautifully - you can drive forever in super heavy
snow for hours and never break a frame, but this approach does limit one to
how general purpose it is.

With modern shaders there are probably ways of implementing the effect in a
more general way, so it may be more efficient to sit down and work out how
to implement exactly the type of effect you need for your application
rather than trying to reuse something that wasn't written with that usage
case in mind.


On Thu, 20 Dec 2018 at 03:16, Bruce Clay <bclay1297 at gmail.com> wrote:

> We are trying to integrate precipitation from the OSG examples into an
> osgEarth application.  In the initial attempt the application crashed every
> time we zoomed out beyond a certain point.  In the current application
> included ass attachment it no longer crashes but we still have orientation
> problems.  This issue was reported on the forum a couple years back as a
> geocentric issue.  I can get the snow to appear and it looks normal until I
> try to rotate the earth to be tangent to the surface.  The it disappears.
> We could use the precipitation if we could put it in a transform but that
> did not work either.  Even if it was loosely attached to the camera so we
> could push it out in front of the viewer some distance and not try to show
> the particle until the viewer was close to the tangent line.
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75326#75326
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20181220/01e73300/attachment.html>

More information about the osg-users mailing list