Fluid-Cloth
Simulation
Jenee
Hughes
Grad
Graphics, Spring 2010
Dr. Zoe
Wood
Imagine wearing a waterfall
as a cape. Imagine that it moves
and swishes around like a cape, but that the water droplets are still falling
and behaving like water droplets should.
That's what this is. A
fluid-like particle system constrained to an invisible triangle-mesh cloth
simulation.
Why's it
special?
A normal cloth simulation
generates forces that manipulate vertices in a triangle mesh as if they were
particles fixed in uv space, in order to deform the polygon faces on the
mesh. In this case, the
particle-vertices don't move with respect to the cloth, only with respect to
the world.
RECAP:
Triangle
mesh, with polygon faces
Vertex
== Particle, fixed in uv
The
Specialness:
My fluid-cloth simulation
builds upon a normal cloth simulation by redefining the vertices as
"Nodes", which are fixed in uv space and influence the behavior of
particles swarming around the cloth. The particles are fixed in w, but not in u
and v. We don't draw the faces on
the triangle mesh, instead allowing the particles to fill in the area.
Recap:
INVISIBLE
TRIANGLE MESH, with particles that move around on it.
Vertex
== Node: fixed in uv, exerts forces on particles
Types of
Nodes:
An Emitter Node emits
particles into the simulation.
A Neutral Node does
nothing.
An Attractive Node pulls a
particle toward it, and ceases to have an effect on the particle once the particle
has passed over it in u or v.
A Repulsive Node pushes a
particle away from it, but ceases to have an effect on the particle once the
particle has passed over it in u or v.
An Evaporator node allows a
particle to rise off the cloth plane in w, and makes the particle begin to
decay.
A Boundry Node lets no
Particles pass it, by applying a force slightly greater than and opposite to
the sum of forces on the particle.
I didn't manage to get the
last two types of nodes working fully, but am planning on implementing them
this summer.
Particles
The particles can be used
to represent anything you'd use a particle system to represent: Fire, Water, Sand, Iron Shavings.
For the purposes of
illustration, think of the particles as iron shavings, and the Attractor and
Repulsor nodes as magnets of different polarity.
To break that down into
individual forces for one particle:
Test
Cases:
Emitter
Node surrounded by Neutral nodes:
The particles all continue
in whatever direction they were sent in originally by the emitter Node. The
emitted particles have some built-in variation of direction and magnitude.
Diagram:
Implementation:
Emitter
Node With One Attractor Node:
The particles all move
towards the attractor node in addition to whatever direction they were sent in
originally by the emitter Node. Once they pass the attractor node, it ceases to
have an effect on them. The forces
applied on the particles are attenuated by distance (i.e. a farther away
Attractor Node will have less effect than a closer one will).
Diagram:
Implementation:
Emitter
Node With One Repulsor Node:
The particles all want to
move away from the Repulsor node in addition to whatever direction they were
sent in originally by the emitter Node. If they pass the Repulsor node, it
ceases to have an effect on them.
The forces applied on the particles are attenuated by distance (i.e. a
farther-away Repulsor Node will have less effect than a closer one will).
Diagram:
Implementation:
Emitter
Node With A Combination of Node Types:
These are just some of my
favorite test cases. Though they don't look half as good when they're not animated,
these should give you an idea.