ParticleSystem trigger via animation fcurve - possible?

I’m not super experienced in the Unity particle system, so it’s entirely possible I may have overlooked something in the docs.

My VFX director is expecting dozens (likely hundreds) of animation files in FBX format, and use them as fcurves to trigger certain particle systems to keep them synchronized with the overall scene.

Think of a cutscene where certain particles need to trigger at specific times, and they may need to fire repeatedly at specific times, depending on how the fcurve is shaped. The animation file really is just a value that jumps between 0 and 1.

Before (possibly) reinventing the wheel, I’m wondering if there’s a system that’s already in place to support something like this before I go off and create a possibly redundant solution. Perhaps as some sort of an emission parameter on the particle system?

what is the major problem with using the built-in animator tool and keying the systems that way?

do you need to do the work in the 3D package to work out the timing?

All the data is coming in from Maya. So using the animation and animator tools to enter events (we’re talking hundreds of events here) is not an option unless it’s done in an automated way via scripting.

I haven’t used Maya, but do you see the event keys of your curves imported from Maya in Unity’s animation editor? These event keys should be usable to trigger particle system or audio source.

Yes I know about those keys. The real issue is these cannot be added manually. Since we’re talking about a whole separate team of animators generating animations in Maya, this would create a huge bottleneck if someone has to sit down and enter all these keys by hand.

I have used the AnimationCurve class to do this for UI fx. Just use the Evaluate() function to get the current curve value, if its 1 call Play() on the particle system if its 0 call Stop().

4 Likes

I like that. I think that provides a neater solution than trying to add animation events to FBX animations (where animations are read-only until you clone them out of the FBX file where you could then add events), and it comes pretty close to what I was looking/hoping for.