Hi Aidan,

first of them all:
>>"Cannot Read Object 'hsv=Realman Script(brg)', Class not installed (2139)
Error:r3root:557
This error occurs because I've replaced the standard GI Brightness control
shader
with the Realman GI Brightness Control. Please ignore this. It's not
important,
and for other files I'll build another startup file for my scenes.

The Script should work on every skeleton with "IK-targets".
To understand my idea behind it a little bit more:
Open from "Windows" the "Attribute" window
Drag and drop the desired object (the skeleton) in this window
A list should show you the avaible attributes of this object
All of this should be accessible via script and some other things
like user defined channels maybe, too ;-)

Now my poor script:
(Note you must set in Properties window "Script" -->"Command Language" to
"Javascript")

=== iktwo = Self.GetIKPosition(2);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(iktwo is a by me defined variable(container where I can store something
like data, chips or beer)
Self is the object itself (the skeleton in this case)
the points of the skeleton are in hirachical order:
0= beginning of the skeletons first joint
1= point between first and second joint
2= point between secong and third joint ....)
Get means Get data from whatever is described next
(in this case) IKPosition, but which IKPositon
(in this case) (2) the Postion of point 2
this value (x,y,z data values) is now stored in "iktwo"

now the question:

===if(iktwo.y > 0)
===    iktwo.y = iktwo.y;
===else
===    iktwo.y = 0;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If iktwo's y value is greater than 0 than let iktwo be iktwo
else ( iktwo's y value is equal or smaller than 0)
iktwo should be 0
(iktwo's x and z data are untouched)

now I'm using iktwo:

Self.SETPOINT(2 , iktwo);
// Script for Point (Joint) 2 ends

This should be the beginning of a small scripts in everyday use tutorial.
Have a LOOK at the realsoft/scripts/js folder
especially at the /real/objects folder , look at the end of the files
"this.Get....." and "this.Set...."

DO NOT TOUCH OR MODIFY THIS FILES it can result in a strange
behaviour or crashes of RS, but if nobody else in the room have a look.
It'll help you to understand the scripts.

> This is exciting [ to us into Character Animation ]. If this works in a
> general sense it will be fantastic. A tool in fact that should then be
> included by default in REALSOFT. Can scripting like this enhance more
> functionality in general for Character Animation in particular?

In my opinion yes, because you can override animators and fix points,
or you can fast and easy transfer psitions from one object to another.
Open "Samples"-->Constraint-->Set Color with Time
Play with this and then you've written your first own script :-)

Big thanks to Frank Dodd at this point for Building Blocks
and all other people who have written and shared their work.

Feel free to ask.

Hope it's helpy at all,
Matthias




Reply via email to