Which animation procedure is "cheaper" to run in Unity?

First, I created a biological membrane animation in 3DS Max. It is composed of two layers of identical molecules, each layer with 400 molecules. Each identical molecule has random position and random rotation animation controllers applied to it in Max. The animation parameters are such that each molecule appears to wiggle and rotate very slightly in place, giving the impression of Brownian motion…

So, I imported the animated Max FBX file into Unity3D and t it worked perfectly. My question is whether this is the best way to run the animation in Unity (using imported animation controllers from 3DS Max), or could I import the FBX without any animation and then animate the molecules within Unitty 3D, still achieving the same animated results?

The question is two-fold…1) Can I animate the molecules in Unity3D and achieve the same result and, 2) Would it be less taxing on a Unity3D output file such as a game, to animate (if it is possible) the molecules within Unity instead of relying on the imported animation contained in the FBX file?

Thanks!
TheBotanist

  1. Unity doesn’t import your controllers. It just imports what is in the FBX file: position and rotation keyframes. It doesn’t care how you made them.

  2. Animating it within Unity will do the same thing if each object is independent. It does the same calculations.

Some alternative options off the top of my head:

  • shader driven Brownian motion on a single mesh where each quad or vertex is controlled by texture values. This is what people refer to as “gpu particles” sometimes and will let you do millions, not just 400. Might or might not use compute. Might or might not use geometry shaders. All depends.

  • a single 400 bone skinned mesh. The imported model is just 1 model but each molecule is bound to one bone. The Animator is set to 1 bone influence for speed (max is 4 but for this you use 1).

  • Particle system. This is quite practical with the noise module and you can get callbacks for particles or modify them in code if you choose.

Just random thoughts as you’ve not really provided much info to go on.

1 Like

Hi Hippocoder:

Thanks for your response. It sounds like I would not gain anything by importing the FBX file without animation and then trying to animate the molecules in Unity3D. I am fairly new to Unity3D so I don’t know much about gpu particles or particle systems, but it sounds like something I should explore.

You say I didn’t provide much much information. I don’t know if it is allowed on this forum, but would it be possible to upload a short, low resolution video created with 3DS Max, showing what the desired end result looks like?

Thanks,
TheBotanist

Definitely explore the particle system first. You are probably trying to swat a fly with a nuke here :slight_smile: The particle system isn’t something that’s just for effects in Unity, they can collide, and become objects with behaviour just like you’re describing.