- Home /
Procedural "dripping" mesh?
How do you procedurally create a mesh that appears to thickly drip (or elongate to appear to drip) from the point of impact on another object that it appears to "hang off"?
There might be other ways to create this effect, but I think the question boils down to: Basically, how do you smoothly elongate a "point" on a mesh in a certain direction?
does it have to be procedural or could you design it in a modeling program and import one (or more) dripping animations?
Answer by Jesse Anders · May 02, 2011 at 06:59 PM
It's a non-trivial question, but to answer the specific question of how to animate a single vertex of a mesh, you'll want to start here, and perhaps look at the 'procedural mesh' examples in the 'resources' section of the Unity site as well.
Once you've identified the vertex that you want to animate, updating its position can be done in more or less the same way you'd animate anything else. (For example, you could simply adjust the element of the vertex corresponding to the vertical direction according to a 'drip speed' and the current time step on each update.)
Note that this is unlikely to produce a particularly realistic effect, as animating a single vertex in this way is likely to produce a noticeable discontinuity in the mesh (rather than a smooth, continuous deformation).
Of course it's possible - it just may not be easy. Anyway, you could check the asset store or the script wiki to see if there are any existing solutions for this. Barring that, I'd probably start reading up on mesh deformation and perhaps search UA and the forums for relevant keywords (for problems of this sort, it's often the case that someone's tackled it before).