General Category > ASL Scripts
Controller scripts: animation by expressions
(1/1)
FWL:
Hello everyone,
I'm trying to learn/understand the 'animation by expressions' way of animating as described in the anim8or manual, but i don't fully understand how this works.
I copied the example script $color=(0.8,0.1,0.1)*(fract(time)<0.2); and the script in the ASL spec on the anim8or site: $scale = 1 + sin(time*PI*4)*0.5;
Both scripts work but I have trouble understanding how. If i understand the ASL spec right variables that start with a $ are user declared variables? If so how does anim8or know that the user declared variables has to be linked to light color resp. size of an object? Or are $color and $scale pre-defined variables within anim8or? And how could one translate this to for example the diffuse color of an object. For example if you want to make a character blush and make his face red during a scene?
Thanks in advance!
Steve:
User variables begin with a $, but also specific variables for animated properties. $color, $scale, etc. are predefined variables in the corresponding script type. When the script exits the value is used for that particular component. When you first create a script it is composed of a single asigment to the variable so you don't have to remember the name. For example, the default color controller script is:
$color = (0.0, 0.0, 0.0);
which is the color black.
FWL:
Ok, so if I understand correctly some parameters are accessible for animation through these predefined variables. Is there a list of these predefined variables? And the $color variable is specific for the light source isn't it? Or can this also be used for the diffuse color of an object?
Steve:
When you select "expression" for a controller, that adds a script for that specific property. Currently there are no scripts that control values of a material.
Navigation
[0] Message Index
Go to full version