Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Erik et. al, I have now fixed osgParticle to behave as it did before w.r.t particle rotation. The fix is now checked in to svn/trunk. I reviewed the changes from Tom, but these would have broken other functionality so I re-factored ParticleSystem::single_pass_render() and Particle::render() methods so that the rotation implementation moved out of the lower level Particle::render() into the single_pass_render() function. With this change I also made the rotation so that it was done in eye coordinates, and made the rotation operation optional so the cost of computing the rotation matrix was only applied to particle systems that actually needed it. This change should speed up particle systems that don't use rotation. In investigating this issue I found that the concept of particle rotation is actually broken in osgParticle, as the particle rotation really should be done in object coordinates not in eye coordinates, however billboard doesn't mix well with such a model without doing something clever with projecting the rotation from local to eye coordinates. I will cross this bridge another day though, for now I've implemented the original, if somewhat conceptually broken, behviour. Could you try out svn trunk to see if this fixes it. Cheers, Robert. On Thu, Aug 21, 2008 at 12:07 AM, Erik Johnson r.erik.john...@gmail.com wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi all! We are having this issue as well in our simulation software, since we are also rotating our smoke particles to add a nice motion the smoke. Any idea when it will be fixed? Or does someone know of a workaround? Kind regards, Michael *** Zsa Zsa Gabor - A man in love is incomplete until he has married. Then he's finished. 2008/12/5 Michael Bach Jensen [EMAIL PROTECTED]: Hi Thom, Thanks for the detective work. The change you've suggested as causing the regression is r7961. http://www.openscenegraph.org/projects/osg/changeset/7961 It's six months since I code this so it's a bit cold a topic so off the top of my head I can't point to anything in a particular as being the cause of the problems. I will have to sit down and step through the code. Thanks for pointing out that SmokeBox.osg reproduces the problem, with the problem in front of me it's very difficult to spot issues in code. Robert. On Tue, Nov 11, 2008 at 11:21 PM, Jolley, Thomas P [EMAIL PROTECTED] wrote: Hi Robert, I've looked into this a little further. It appears the changes you made to ParticleSystem.cpp on March 17th is the reason for the behavior change. I don't have a solution yet other than backing out the changes. I'm still trying to understand what you're doing in the single_pass_render function before coming up with a solution. I think this problem was mentioned in an earlier thread around May. See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-May/011595.html. To see the problem look at SmokeBox.osg with osgviewer (I'm using osg 2.6.0). The particles are rotating about the wrong axis (or at least a different axis). Tom Jolley From: Jolley, Thomas P Sent: Thursday, August 21, 2008 2:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() Hi Erik, I noticed the same thing about a week ago while upgrading an application from osg 1.0 to 2.4. It was on my list of things to look into. From: Erik Johnson [EMAIL PROTECTED] Sent: Thursday, August 21, 2008 10:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Particle system setInitialRotationalSpeedRange()
Hi all! Does anyone know if the bug mentioned in the following post will be fixed or if there is a workaround? http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg18069.html We use it, like Erik Johnson mentioned, to create a nice motion to smoke effects. /Michael *** Steve Martin - I've got to keep breathing. It'll be my worst business mistake if I don't. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Michael, You can try one of the following: 1. Fix the problem in ParticleSystem.cpp and submit it to Robert. 2. Backout the 7961 changes to ParticleSystem.cpp. 3. Change the particle rotation axis so particles rotate about the Y axis instead of the Z axis. Number 3 is probably not the best as you will need to change it again once the problem is fixed. -Original Message- From: Michael Bach Jensen [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2008 4:44 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() Hi all! We are having this issue as well in our simulation software, since we are also rotating our smoke particles to add a nice motion the smoke. Any idea when it will be fixed? Or does someone know of a workaround? Kind regards, Michael *** Zsa Zsa Gabor - A man in love is incomplete until he has married. Then he's finished. 2008/12/5 Michael Bach Jensen [EMAIL PROTECTED]: Hi Thom, Thanks for the detective work. The change you've suggested as causing the regression is r7961. http://www.openscenegraph.org/projects/osg/changeset/7961 It's six months since I code this so it's a bit cold a topic so off the top of my head I can't point to anything in a particular as being the cause of the problems. I will have to sit down and step through the code. Thanks for pointing out that SmokeBox.osg reproduces the problem, with the problem in front of me it's very difficult to spot issues in code. Robert. On Tue, Nov 11, 2008 at 11:21 PM, Jolley, Thomas P [EMAIL PROTECTED] wrote: Hi Robert, I've looked into this a little further. It appears the changes you made to ParticleSystem.cpp on March 17th is the reason for the behavior change. I don't have a solution yet other than backing out the changes. I'm still trying to understand what you're doing in the single_pass_render function before coming up with a solution. I think this problem was mentioned in an earlier thread around May. See http://lists.openscenegraph.org/pipermail/osg-users-opensceneg raph.org/2008-May/011595.html. To see the problem look at SmokeBox.osg with osgviewer (I'm using osg 2.6.0). The particles are rotating about the wrong axis (or at least a different axis). Tom Jolley From: Jolley, Thomas P Sent: Thursday, August 21, 2008 2:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() Hi Erik, I noticed the same thing about a week ago while upgrading an application from osg 1.0 to 2.4. It was on my list of things to look into. From: Erik Johnson [EMAIL PROTECTED] Sent: Thursday, August 21, 2008 10:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Thom, Thanks for the detective work. The change you've suggested as causing the regression is r7961. http://www.openscenegraph.org/projects/osg/changeset/7961 It's six months since I code this so it's a bit cold a topic so off the top of my head I can't point to anything in a particular as being the cause of the problems. I will have to sit down and step through the code. Thanks for pointing out that SmokeBox.osg reproduces the problem, with the problem in front of me it's very difficult to spot issues in code. Robert. On Tue, Nov 11, 2008 at 11:21 PM, Jolley, Thomas P [EMAIL PROTECTED] wrote: Hi Robert, I've looked into this a little further. It appears the changes you made to ParticleSystem.cpp on March 17th is the reason for the behavior change. I don't have a solution yet other than backing out the changes. I'm still trying to understand what you're doing in the single_pass_render function before coming up with a solution. I think this problem was mentioned in an earlier thread around May. See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008-May/011595.html. To see the problem look at SmokeBox.osg with osgviewer (I'm using osg 2.6.0). The particles are rotating about the wrong axis (or at least a different axis). Tom Jolley From: Jolley, Thomas P Sent: Thursday, August 21, 2008 2:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() Hi Erik, I noticed the same thing about a week ago while upgrading an application from osg 1.0 to 2.4. It was on my list of things to look into. From: Erik Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2008 10:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Robert, I've looked into this a little further. It appears the changes you made to ParticleSystem.cpp on March 17th is the reason for the behavior change. I don't have a solution yet other than backing out the changes. I'm still trying to understand what you're doing in the single_pass_render function before coming up with a solution. I think this problem was mentioned in an earlier thread around May. See http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2 008-May/011595.html. To see the problem look at SmokeBox.osg with osgviewer (I'm using osg 2.6.0). The particles are rotating about the wrong axis (or at least a different axis). Tom Jolley From: Jolley, Thomas P Sent: Thursday, August 21, 2008 2:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() Hi Erik, I noticed the same thing about a week ago while upgrading an application from osg 1.0 to 2.4. It was on my list of things to look into. From: Erik Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2008 10:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Particle system setInitialRotationalSpeedRange()
Hi Erik, I noticed the same thing about a week ago while upgrading an application from osg 1.0 to 2.4. It was on my list of things to look into. From: Erik Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2008 10:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() There is certainly a change in behavior, although I can't pinpoint the change in code yet. Setting the rotational speed with (0, 0, 1): OSG 2.2.0 - particles rotate like fans (pinwheels) OSG 2.4.0 - particles rotate like a margarita blender (cork-screw) OSG 2.6.0 - particles rotate like a margarita blender (cork-screw) I guess I'm just wondering if this is the expected behavior? And I'm surprised nobody has a problem with this. Thanks, Erik Date: Thu, 21 Aug 2008 09:26:52 +0100 From: Robert Osfield [EMAIL PROTECTED] Subject: Re: [osg-users] Particle system setInitialRotationalSpeedRange() To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, osgParticle has hardly been touched between OSG-2.2 and 2.6. Use svn log to check which files have changed. Robert. On Thu, Aug 21, 2008 at 1:07 AM, Erik Johnson [EMAIL PROTECTED] wrote: Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Particle system setInitialRotationalSpeedRange()
Hi all, It seems to me, back in the OSG 2.2.x time frame, that I could set the initial rotational velocity of the RadialShooter and have the particles pinwheel around their center point, while maintaining their billboard orientation and face the Camera. Perhaps it was a rotation on the Y axis. Nowadays with OSG 2.4/2.6, setting the rotational speed will cause the particles to rotate relative to the world axis and not in the camera-relative axis. Is this a bug? A feature? Is it still posible to pinwheel a particle around? Does anyone use setInitialRotationalSpeedRange()? This was a cool effect which added a nice dimension to smoke plumes and such. Thanks for any info! -Erik Johnson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org