Skip to content

mspace

Context(s)image3d

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);
}