Hi Robert,

On Fri, Dec 12, 2008 at 2:26 PM, Robert Osfield <robert.osfi...@gmail.com>wrote:

> Hi Jefferson,
>
> On Fri, Dec 12, 2008 at 3:56 PM, Jefferson Pinheiro
> <jeffersonmpinhe...@gmail.com> wrote:
> > I'm working on a driving project on OSG, and now I am making it rain. I
> > added a precipitation effect for that. My scale is 1 unit = 1 cm.
> >
> > First question:
> > When my car runs just a bit (say, 5 km/h), the rain comes at my face as
> > though I was running at 200 km/h. And if I run faster than 20 km/h or so,
> > the rain bacomes glitchy (looks like it's snowing, too).
>
> Shudder.  Why or why would you have such a scale?  Can't you just have
> a sensible scale like 1 unit = 1m?


Even so,  my colleague's project is on that scale and the same thing
happens.

>
>
> I you really must have such as scale then try putting a scale above
> the PrecipitationEffect.


setParticleSize? I tried increasing that, and big values causes the rain to
look like snow; lower values makes it look normal or too small.
Or adding a matrix transform and scale matrix? That didn't seem to work,
either.

>
>
> > How do I change the speed at which the rain comes?
>
> Have you looked at the API?


I tried several combinations of setParticleSpeed, wind and cell size, the
problem persisting.

Is it possible to just disable the effect of rain "coming at your face" when
the camera moves forward?

>
>
> > Second question
> > It also rains inside my car. I tried adding a node mask for that, but it
> > didn't seem to work. Is it possible not to make it rain inside the cars
> > (which are on a separete osg::Group)?
>
> PrecipitationEffect doesn't have an support itself for constraining
> the effect to appear inside/outside specified geometries.
>
> The best thing you could do would be to either try using the stencil
> buffer to prevent the fragments of the effect being rendered where you
> don't want them.


Thanks, I'll take a look at that.

>
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Jefferson Pinheiro
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to