Hi All,

Anybody having an elegant hint for 3. ???

Christophe

----- Original Message ----- 
From: Christophe.medard 
To: [email protected] 
Sent: Friday, March 06, 2009 4:07 PM
Subject: [osg-users] Non emissive ParticleSystem and lighting


A patch solution could be introduced to give the impression ambient lighting 
works onto Particle System.

Into osgParticleSystem::update() method, after particles' update(dt) method 
call their _current_color are stepped.
We could there re-touch the stepped color and darken it according to an ambient 
color value if we can override setDefaultsAttributes not to have it enable 
LIGHTING when lighting parameter is true.

This trick should work provided :
1. ParticleSystem::setDefaultAttributes() method be set as virtual
2. Particle class be added a getColor()/setColor() method make it possible to 
read/write onto _current_color
3. We find a mean to get the active ambient lighting value in the place of the 
scenegraph where the ParticleSystem is attached

If someone has an idea for 3., I'm interested !
(A very ugly walkaround method would be to memorize a pointer onto the external 
osg::Vec4 value containing the ambient value and add a method into 
ParticleSystem interface just for this purpose, but how baaaaad !!!!)

Christophe
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to