RenderParticles upgrade
Moderator: Moderators
RenderParticles upgrade
I think having an option to make particles shrink over their lifetime would in certain cases make them look much better. Maybe something as simple as having the equivalent of the already existing RenderParticles.AnimateAlpha property, but for "size" should do the trick?
Last edited by rrTea on Sun May 17, 2015 10:26 am, edited 1 time in total.
RenderParticles AnimateSpeed
I was trying to replicate a fireworks effect I saw in GameCube version of Mr Driller and noticed that they also animate speed of their particles (the speed is decreasing with passing of time) which looks very good to me - is it possible to slow particles down in a similar way like their size and transparency?
Here is a reference video:
https://youtu.be/xn_jgbFPyBQ?t=12s
(each "particle" gets blown off by the explosion and then almost stops before starting to fall down).
Here is a reference video:
https://youtu.be/xn_jgbFPyBQ?t=12s
(each "particle" gets blown off by the explosion and then almost stops before starting to fall down).
I created fireworks in Karamball; see the screenshot. This effect was achieved by several models with RenderParticles... see the attached project which is part of the Karamball project. Maybe Kjell or Ville can give us some advice how to achieve it more efficiently (?)...
- Attachments
-
- Fireworks in Karamball.
- scr9_small.png (40.03 KiB) Viewed 23330 times
-
- fireworks.zgeproj
- project file
- (4.26 KiB) Downloaded 848 times
Here's a sketch of what I'm trying to achieve (attached). This one uses models for each particle, this is just to illustrate the point - of course I'd like to use RenderParticles instead.
I was unable to find the Mr Driller video I mentioned earlier, all the videos online are showing the game etc, but the fireworks effect can only be seen in a side "menu" of sorts and nobody uploaded that part. Their particles look a bit too good though, it's almost as if they were pre rendered or something.
I was unable to find the Mr Driller video I mentioned earlier, all the videos online are showing the game etc, but the fireworks effect can only be seen in a side "menu" of sorts and nobody uploaded that part. Their particles look a bit too good though, it's almost as if they were pre rendered or something.
- Attachments
-
- explosion.zgeproj
- Click Left Mouse Button!
- (4.27 KiB) Downloaded 766 times
I've now added a "AnimateSpeed" property. Try something like setting Speed to 10 and AnimateSpeed to -10.
http://www.zgameeditor.org/files/ZGameEditor_beta.zip
http://www.zgameeditor.org/files/ZGameEditor_beta.zip
I guess if somebody wants to use both SpeedRange and AnimateSpeed, the best thing to do is to instead overlay 5 or 10 RenderParticles components with fixed but slightly different (manually tweaked) Speed properties...
One thing I noticed is that RenderParticles ignores RenderSetColor even if the OnEmitExpression is completely empty, and the Alpha of the RenderParticles messes up the components following it... For example, in the attached file: just run it and click left mouse button once to see what it should look like (except for the "particles going backwards before they expire" effect), then go to Content / mod_fxParticles / OnRender / OnEmitExpression and delete the code, then move RenderParticles one position down (below the RenderSetColor). Now the particles are white and the rest of the effect doesn't use the Alpha from ExplosionTint.RenderSetColor component anymore?
One thing I noticed is that RenderParticles ignores RenderSetColor even if the OnEmitExpression is completely empty, and the Alpha of the RenderParticles messes up the components following it... For example, in the attached file: just run it and click left mouse button once to see what it should look like (except for the "particles going backwards before they expire" effect), then go to Content / mod_fxParticles / OnRender / OnEmitExpression and delete the code, then move RenderParticles one position down (below the RenderSetColor). Now the particles are white and the rest of the effect doesn't use the Alpha from ExplosionTint.RenderSetColor component anymore?
- Attachments
-
- explosion 2.zgeproj
- (2.82 KiB) Downloaded 649 times
I tried to get used to it, but... After a bit of testing, I really think it falls squarely in the "glitch" category. The mistake is especially pronounced when the difference between Speed and SpeedRange is relatively big, say 2 and 0.5 combined with AnimateSpeed -4.0, the particles close to the center of explosion just go back to the centre boomerang style... As if there was a gravity point in the middle, pulling them back. Really weird effect, I'm attaching an example.VilleK wrote:I noticed that too, but I think that it can be a cool effect in some situations
In the attached example try changing SpeedRange to 1 for even weirder effect.
- Attachments
-
- explosion 2.zgeproj
- Click left mouse button to trigger the effect. Keep an eye on what happens in the middle of explosion.
- (2.91 KiB) Downloaded 674 times
Excellent!!!
Yuhuu! It works - I'll use it for both fireworks and explosions!