Dan Andersen Show full post »
pshipkov
The tensionMap node has 3 modes:
- distance
- in-between angle
- curvature

In this case we are using the "distance" mode, or with other words - the amount of deformation.
The "in-between angle" provides information about the direction of the deformatiod, or how the surface bends compared to the neutral frame of the mesh.
The "curvature" mode is similar to "in-between angle" but provides information about the amount of curvature, or how much the surface is bent. It does not require neutral frame. There is subtle but important difference between these two that comes handy in many cases.

Disance is measured between points. So no matter what mesh primitive we iterate on, at the end of the day we will fall back on the points. As long as the lookup is consistent and provides the desired results it is considered a good approach. In this case i used neighbour points (iterating on edges) because Maya's API provides convenient methods for that = less work for me.

Computation is in object/world space. I think the default option is set to object space. Need to check the tensionMap node to confirm that.

The math is actually very simple - sum the length of all connected edges to a given point and divide by the number of edges. That's it. If the result value is smaller than the neutral we have compression, otherwise stretching. Simple as this. You can get the direction of deformation in world/object space easily, but the trick in the provided example scene is to convert that direction in tangent space.

EDIT:
Scratch that.
Cannot remember how it was done anymore. So no point in missleading you.
Quote 0 0

Add a Website Forum to your website.