- Home /
Size Grow (ParticleAnimator). How does this work exactly?
I'm finding it frustrating that, when I adjust the lifespan of a particle the grow size changes. So if I make the life span shorter the particle won't grow as big.
It seems that the 'size grow' function has a built-in notion of rate, where it scales the particle over a fixed time rather than adjusting it to its lifespan. It seems like a value of 1 means, double in size over 1 second or something like that.
Can someone please confirm how this works?
Red herring: The 'Max Particle Size' in the Particle Renderer box will prevent a Billboard particle growing in screen space. This is not the issue. I am using a Horizontal Billboard which seems not to be affected by 'Max Particle Size', presumably because it's rendered in world space.
I'd report this as a documentation bug (actually, I think I already have :-)
Unity docs tends to be sparse on specifics like this.
I don't think we can say the behaviour is wrong - different particle effects will need different things, but certainly it is under-documented.
Answer by timmypowergamer · Dec 07, 2011 at 09:57 AM
I too was wondering about this. After much experimentation I think I figured out how it works (at least, for the values I'm working with it holds true, it might not at higher values. Someone may need to confirm.)
It seems that Size Grow is the percentage increase in current size per second. To put that another way, if your size grow is 0.5, your particles will increase in size by 50% each second. At first I thought that it was 50% of the initial size, but apparently it compounds it over time.
So, for example: If you have an emitter with a Max/MinSize of 100 and a size grow of 0.5, after 1 second your particle will have a size of 150. After 2 seconds, it will be 225, 3 seconds 337.5, and so on (1.5 x the current size each time). So essentially it is actually growing faster the longer it exists. I suspect that they did this because if it grew at a constant rate it would actually appear to grow slower the larger it got.
The equation for this would look something like:
size = startSize * (1 + ParticleAnimator.sizeGrow)^energy
At any rate, if I am wrong about any of this then please correct me. Hope this helps someone else out.
Answer by KruegerT · Oct 06, 2011 at 05:32 PM
Probably you have to set the "Max Particle Size" inside the "Particle Renderer" to 1. Then the particles are allowed to get renderer over the complete viewport.