mspace VEX function

Transforms the position specified into the “local” space of the metaball.

Context: image3d

  1. vector mspace(vector P)

Transforms the position specified into the “local” space of the metaball. This function is only valid inside the forpoints loop construct.

An example use of this function would be to compute noise based on a “rest” position… For example:

forpoints(P) {
    vector npos = mspace(P) - mattrib("rest", P);
    nval += noise(npos);
}