Page 1 of 1

[done] Delay factor for the Sparkle operator

PostPosted: Wednesday, 18.September 2013, 09:52
by Skinnytorus
Having played with the spiral examples (here viewtopic.php?f=55&t=1329), I see that Sparkle needs a Delay parameter. It should allow to start sparkling from a certain moment (like in Ballistic). The matter is that at the first frame of the animation, the initial particles just fly away from the spiral (see spirals2.wz4) which makes me think that Sparkle picks up particle initial position from Lissajoux and no direction info.

Delay parameter might eliminate that. Besides it would allow for easy fireworks effect without looping emitters. What do you think?

Re: Delay factor for the Sparkle operator

PostPosted: Sunday, 22.September 2013, 21:38
by ikam
ok I added a delay.
I add the possibility to set a negative value. it allow to advance time of particles, so for the spirals2.wz4 example, at anim start the spiral is already formed.

Re: Delay factor for the Sparkle operator

PostPosted: Sunday, 22.September 2013, 21:56
by Skinnytorus
Thank you, it's a cool effect, but it doesn't eliminate the problem. The stray particles at the start still exist. My idea was to pass the original particles through Sparkles op unaffected and, when the delay time has elapsed, turn on the sparkles starting from the current position of the original particles. It should work like a fireworks - the original particle reaches some time mark (delay) and then - boom! Sparkling starts.

Re: Delay factor for the Sparkle operator

PostPosted: Sunday, 22.September 2013, 22:02
by Skinnytorus
Here is how the stray particles look.

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 06:36
by ikam
Ok, it is better now.
stray particles at the start are removed. originals particles are only used if they are > delay.

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 07:51
by Skinnytorus
Damn... I'm in the office now and can't check the new build. I'll have to wait till the evening comes...
originals particles are only used if they are > delay

Did you mean "original particles are only used for the sparkling effect if their current lifetime is more than sparkle delay value"? Are the original particles seen before sparkling?

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 08:03
by ikam
Did you mean "original particles are only used for the sparkling effect if their current lifetime is more than sparkle delay value"?

yes.

Are the original particles seen before sparkling?

no. Sparkles start to be seen when delay is passed and computed from the original pos at the current time.

For example in you explosion cube builds,if you set a little delay in sparckles, they are seen only when the cube really explodes and pieces are disperced.

I also added a flag to set if sparkles are animated or static.
If animated the delay param is active else it is static i put another param to set the static time of the particle. This allow in the spiral effect for example to show the spiral already formed at the lifetime you want it and static to not consume this lifetime and keep the shape permanently.

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 08:33
by Skinnytorus
no. Sparkles start to are seen when delay is passed and computed from the original pos at the current time.

Do you mean that in order to see the original particles before sparkling begins I need to render the original particles separately (using particle Add or another Srites renderer)?

I also added a flag to set if sparkles are animated or static.
If animated the delay param is active else it is static i put another param to set the static time of the particle. This allow in the spiral effect for example to show the spiral already formed at the lifetime you want it and static to not consume this lifetime and keep the shape permanently.


Cool. I'll check that this evening.

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 09:08
by ikam
No, You don't to have to add anything. I think you must see it in action to avoid any misunderstandings :)

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 09:18
by Skinnytorus
Sure, mate. :)
I will get back to this topic this evening.

Re: Delay factor for the Sparkle operator

PostPosted: Monday, 23.September 2013, 18:19
by Skinnytorus
Yep. I like the way it works. Well done! Really cool effect. =D> =D> =D>
Some quick tests here.