Re: [osg-users] PrecipitationEffect blending of particles

2013-06-09 Thread Robert Osfield
On 7 June 2013 17:11, Louis Bouchard  wrote:
> any thoughts?

To do the effect you are after you are best to just write out own
particle system using a fixed osg::Geometry and then using shaders to
animate the textures.  It should be possible to scale up to 100,000's
of particles using shaders.  You can't tile and LOD the geometry
blocks to scale higher, using fog for far distance is useful as well.
The PrecipitationEffect is your best template for this type of
solution, but not the actual solution you'll need.

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


[osg-users] Experiments on Textures and Images, strange behavior.

2013-06-09 Thread Gaëtan André
Hi,

I am trying to understand how texture ande Image are working

//some initialized texture with contents
osg::ref_ptr map

//displays correctly the texture
osg::StateSet* stateset = HUD_camera->getOrCreateStateSet();
stateset->setTextureAttributeAndModes( 0,map);

//does not display the texture
osg::ref_ptr lm = new osg::Texture2D;
lm->setImage(map->getImage());
stateset->setTextureAttributeAndModes( 0,lm);

Why ?

Thank you!

Cheers,
Gaëtan

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54501#54501





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Experiments on Textures and Images, strange behavior.

2013-06-09 Thread Trajce Nikolov NICK
Hi,

initialize the texture and then reference it, in that order
osg::ref_ptr lm = new osg::Texture2D;
stateset->setTextureAttributeAndModes( 0,map);

Nick


On Sun, Jun 9, 2013 at 3:02 PM, Gaëtan André  wrote:

> Hi,
>
> I am trying to understand how texture ande Image are working
>
> //some initialized texture with contents
> osg::ref_ptr map
>
> //displays correctly the texture
> osg::StateSet* stateset = HUD_camera->getOrCreateStateSet();
> stateset->setTextureAttributeAndModes( 0,map);
>
> //does not display the texture
> osg::ref_ptr lm = new osg::Texture2D;
> lm->setImage(map->getImage());
> stateset->setTextureAttributeAndModes( 0,lm);
>
> Why ?
>
> Thank you!
>
> Cheers,
> Gaëtan
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54501#54501
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Experiments on Textures and Images, strange behavior.

2013-06-09 Thread Gaëtan André
Hi,
Thank you for the reply.

I am not quite sure to understand your answer.

Do you mean I should do this :

//does not display the texture
osg::StateSet* stateset = HUD_camera->getOrCreateStateSet();
osg::ref_ptr lm = new osg::Texture2D;
stateset->setTextureAttributeAndModes( 0,map); 
lm->setImage(map->getImage());
stateset->setTextureAttributeAndModes( 0,lm); 


Seems quite odd to me.

Cheers, 

Gaëtan[/quote]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54503#54503





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Experiments on Textures and Images, strange behavior.

2013-06-09 Thread Trajce Nikolov NICK
ah, I missread it. from your original post the map texture was not
initialized and was used later in the statest. I had to write something
like:

osg::ref_ptr map = new osg::Texture2D;
stateset->setTextureAttributeAndModes( 0,map);

if you post your code in whole then the chance to get help if higher

Nick




On Sun, Jun 9, 2013 at 10:29 PM, Gaëtan André wrote:

> Hi,
> Thank you for the reply.
>
> I am not quite sure to understand your answer.
>
> Do you mean I should do this :
>
> //does not display the texture
> osg::StateSet* stateset = HUD_camera->getOrCreateStateSet();
> osg::ref_ptr lm = new osg::Texture2D;
> stateset->setTextureAttributeAndModes( 0,map);
> lm->setImage(map->getImage());
> stateset->setTextureAttributeAndModes( 0,lm);
>
>
> Seems quite odd to me.
>
> Cheers,
>
> Gaëtan[/quote]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54503#54503
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org