Hi Robert,
Hi Sebastian,
osgParticle is mostly quite an old CPU based design+implementation so
can be a bit awkward to fit around the needs of a shader based
approach.
That's what I'm trying to come around, and I might have a way.
What approach to take will depending upon the needs of your particular
task, which you haven't explained, so I can't provide any specific
advice on how I'd tackle such a problem. In general these days if I'm
doing a particle effect I'd happily just roll a solution out of a
standard osg::Geometry + shaders place a little glue code via
callbacks or custom osg::Node to manage high level control.
I was planning on something like this, but I didn't want to drop all the
stuff already implemented like operators/programs etc.
I finally tackled the "problem" by overriding the
ParticleSystem::drawImplementation. Here I construct my own array from
the particles and thus can render them in any fashion including instancing.
The need arose when I tried to pass more than on texture coordinate set
to allow for blending between animated texture phases. Apart from this I
needed to setup some custom uniforms to use geometry shaders etc.
It actually might be a good idea to refactor it completely, by replacing
the geometry/rendering part by something more modular while keeping the
osgParticle implementations which handle the logic.
Maybe it is time to refurbish the good ol' osgParticle to be usable with
more modern approaches.
Cheers
Sebastian
Robert.
On 28 April 2014 09:24, Sebastian Messerschmidt
<[email protected]> wrote:
Hi,
I'm facing a challenge trying to use osgParticle with customizations which I
need to use modern techniques to build a shader based particle system.
The problem is, that I want to use a vertex-attribute based implementation,
where I need some additional properties and uniforms to be pushed into the
state/vertex array.
Right now I tried to override the ParticleSystem drawImplementation to call
my own vertex array based implementation. Unfortunately I'm not able to
calculate stride etc. because the particle's members are protected.
Unfortunately I cannot derive the Particle either, as it is not a base
class.
Any ideas how customize the particles without re-inventing the wheel?
cheers
Sebastian
_______________________________________________
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