lm Expression Map Documentation<-- back to weightmap tools

Give Life to your Weightmaps

Description

Evaluate an expression in LUA for each weightmap value, with up to 30 weightmaps connected.

How to apply

To create a new Weightmap and apply the lmExpressionMapOp on it, either select a X3DObject, a Primitive or a Cluster. To apply the operator on an existing weightmap, select the weightmap.
Then choose "lm Expression Map" from the lmWeightMapTools menu.

Exemple of use

In this exemple, the expression map is connected to a proximity map, and the result is the sum of the proximity map (w0) multiplied by 3 (v0), a random value (r) multiplied by 2 (a) and the position x (x) multiplied by 0.149 (b).
The result range is changed to map the target [-1:1]. The negative values appears red (see the Tips section to learn how to get that color).

ExpressionMap

lmExpressionMap Operator Parameters

Quick Expression Reference

You can find a full documentation of the LUA language on www.lua.org.
Classic operations are + - * /
Raise to power is ^
Available maths functions are:
       math.abs     math.acos    math.asin    math.atan    math.atan2
       math.ceil    math.cos     math.deg     math.exp     math.floor
       math.log     math.log10   math.max     math.min     math.mod
       math.pow     math.rad     math.sin     math.sqrt    math.tan
       math.frexp   math.ldexp   math.random  math.randomseed
Available variables are:
       w: original weightmap value
       a, b: parameters animatable in XSI
       r: random value
       x, y, z: local position of the underlying geometry
       for each connected weightmap of index i:
             wi: connected weightmap value
             vi: parameter animatable in XSI