how do you move a particle emitter without moving the whole system? What I would like is a particle emitter attached to a moving object, but when you attach the whole system(as a child) the particles that are already there move with the object, when they should just continue as they are...
any suggestions?
Particle system woes
well, if you modify the controller (which is what sets all of their positions) that will be able to add this vector.
It does not matter if they are moving-- this will not affect their normal behavior because you will only add to their position, not their velocity.
EX:
a particle emitter creates a particle 'A' at (0,0,0) with velocity (10,0,0)
the particle emitter is attached to an object moving (0,0,10)
next frame the particle 'A' would have been shifted up to (0,0,10)+(10,0,0) because of its emitter's new position and its velocity.
But we dont want that, we just want it to be at (10,0,0) right? So, we have the controller add the negative of the emitter's velocity to it: its new position would be (0,0,10)+(10,0,0)-(0,0,10) = (10,0,0)
get it?
of course, if you're able to add the negative of this velocity from somewhere, perhaps you can just not add the value. (which would be less computationally expensive-- we are talking about particles here after all). as I said, I dont know IrrLicht particle systems. It would be good if someone who did could chime in here.
It does not matter if they are moving-- this will not affect their normal behavior because you will only add to their position, not their velocity.
EX:
a particle emitter creates a particle 'A' at (0,0,0) with velocity (10,0,0)
the particle emitter is attached to an object moving (0,0,10)
next frame the particle 'A' would have been shifted up to (0,0,10)+(10,0,0) because of its emitter's new position and its velocity.
But we dont want that, we just want it to be at (10,0,0) right? So, we have the controller add the negative of the emitter's velocity to it: its new position would be (0,0,10)+(10,0,0)-(0,0,10) = (10,0,0)
get it?
of course, if you're able to add the negative of this velocity from somewhere, perhaps you can just not add the value. (which would be less computationally expensive-- we are talking about particles here after all). as I said, I dont know IrrLicht particle systems. It would be good if someone who did could chime in here.
a screen cap is worth 0x100000 DWORDS
but I don't think you can control particles individually from the system. And the emitter isn't in the scene node hierarchy, it's derived directly from IUnknown.keless wrote: But we dont want that, we just want it to be at (10,0,0) right? So, we have the controller add the negative of the emitter's velocity to it: its new position would be (0,0,10)+(10,0,0)-(0,0,10) = (10,0,0)
Maybe I could modify it to spit out billboards, but that many scene nodes would take up a lot of processor power.
again, I dont know how Irrlicht exactly implements this -- dont currently have time to thuroughly investigate either -- but the general idea behind a particle system is:
A) some points
B) a controller which creates and updates the position of those points based on a forumla/algorithm
that controller is in charge of constantly updating the positions of ALL the points EVERY update. so, simply hijack this controller, and make it add the emitter's velocity to ALL of the points EVERY update, in addition to how its already modifying their positions
its important to note, however, that you need to do things in this order:
1) update all points (including adding the negative of the emitter's velocity)
2) create new points
otherwise, all of your new points will be shifted by the emitters velocity immediately upon entry, and your system will look wrong.
its not a matter of procesor power, because we're simply modifying how the controller updates these positions every update, not adding a new routine. if the processor could handle a particle system in the first place (as most can), this will have no impact.
A) some points
B) a controller which creates and updates the position of those points based on a forumla/algorithm
that controller is in charge of constantly updating the positions of ALL the points EVERY update. so, simply hijack this controller, and make it add the emitter's velocity to ALL of the points EVERY update, in addition to how its already modifying their positions
its important to note, however, that you need to do things in this order:
1) update all points (including adding the negative of the emitter's velocity)
2) create new points
otherwise, all of your new points will be shifted by the emitters velocity immediately upon entry, and your system will look wrong.
its not a matter of procesor power, because we're simply modifying how the controller updates these positions every update, not adding a new routine. if the processor could handle a particle system in the first place (as most can), this will have no impact.
a screen cap is worth 0x100000 DWORDS