Unity3D Water Bending with Physics

How would I make it so that you could water bend like in the last airbender? For an example, the user could click a point in water, drag straight up, and have a stream of water flow out following the point.

It would need to be realistic by using the physics engine: how would this be possible?

  • Would need to be able to create waves (when a stream falls back to the water, or as you move the water in the air).
  • Would need to actually move and bounce as if it were a rope held by a string while in the air.
  • Would need to be able to drop back into the water with gravity when released.

How would this work?

No game has accomplished this yet. Water in any large volume is incredibly hard to simulate on a drop-by-drop basis. Some PhysX demos show off "water", but it is in such small quantities that it wouldn't even be useful in a game. Computers today are simply not powerful enough.

As far as I know, this is not possible in real-time. You would most likely have to make pre-rendered models and animations to handle this.

You are ambitious, the effects you see in movies cost buckets of money, and are painfully rendered frame by frame at super high resolution. If you've ever just rendered a complicated scene in a 3d editor you would know it can take a long time. As mentioned above the computational power would be excessive.

However, you could implement not as realistic version by

  • Creating a particle system and parenting it to the hand bone of you character
  • Applying a world collider to particle system.
  • Apply a water material to your particle system
  • Make sure simulate in world-space is checked
  • Attach a sphere collider to the game object with the particle emitter

  • Use the realistic water found in the unity forums to do liquid interactions, or the cloth physics in unity 3 for waves caused by the collision. The cloth physics system can also have wind applied to it when you "bend" air.

  • When the wave is released, get the array of particles in your system and apply a downward force.
  • You can use the programatic particle rendering in the lightning ball example in the procedural example project to generate multiple points in you "flow".

It is too computationally expensive for current technology, especially anything volumetric like you describe.

Something simpler like a waves on a plane is possible, here is an exmaple I made years ago of controlling a flat surface like water: http://www.youtube.com/user/Petrozium#p/a/u/0/lf-DnAVxKE4 Edit:

As Eric pointed out, you could do something like this in Unity.