Published by admin January 11th, 2006
in XSI.
The MoJoKe package provides three device drivers for Softimage XSI which enable you to use your joystick, mouse or keyboard to record movements and apply them to objects in 3D space.
Introduction
The drivers in this package deliver velocity data and no positional data as you might know it from the standard mouse driver shipped with XSI. Thus you take advantage of the higher accuracy of the devices (sampling rate is 100Hz for all devices) and are able to move objects in space without any restrictions. Since you can map all the input signals to parameters or even commands, you can use them for a variety of applications, e.g. to animate a head rig by a mouse and a joystick at the same time.
dual screen showing the driver property pages and a sample setup to animate the head and lower jaw
Joystick Driver
|
You can use your joystick, a wheel or complex flight stick to map its axes, hat switches, rudder/throttle controls, etc. to any parameters in XSI. The driver supports x, y, z channels for both position and rotation, up to three sliders and hat switches (value in degree, increasing clockwise) as well as up to eight buttons.
|
 |
Mouse Driver
|
Yes, there is a mouse driver supplied with XSI, but that one is very limited. It uses the screen resolution and the current screen position of the cursor to return a normalized position. The problem with that approach is that you are restricted by your physical screen resolution or rather bounded by your display. So you have to scale things up in the driver property page to achieve an appropriate distance in 3D space with one stroke. What is more, the quality of the data directly depends on your screen resolution and when you scales things up–you lose accuracy.
The driver introduced here, delivers velocity data instead of a screen position. So you are only restricted by the length of your mouse cable, but no longer by the screen size. Furthermore you take advantage of the mouse resolution which is much higher than the one of your screen. The driver features channels for x,y and z, so you can utilize your mouse wheel as well and of course up to eight buttons.
|
 |
Keyboard Driver
|
To complete this package, the keyboard driver allows you to trigger commands or to drive parameters by the keys of your pc keyboard. Be aware that you can only use the keys which are not reserved by the keyboard mapping of XSI, latter ones have higher priority and that means your action will not be propagated by the device driver.
|
 |
The “drawback” of using velocity data is, that you have to use some kind of proxy to drive the object you want to animate. To put it differently, when you do not move your mouse or your joystick is in the center position, the driver returns 0 for each channel, regardless of where you are in 3D space. This is why you have to map the data to positional data.
A simple solution is: Create e.g. a null, add the velocity data of the null to the objects position for instance, and drive the appropriate parameters of the null by the device driver’s channels.
To move a sphere around in x, apply the following expression:
sphere.kine.local.posx = sphere.kine.local.posx + driven_null.kine.local.posx
The problem is, when you repeat a recorded motion your sphere does not return to the starting point. This can be solved by adding a condition:
sphere.kine.local.posx = cond ( Fc == 1, 0, sphere.kine.local.posx + driven_null.kine.local.posx )
Now x is set to zero whenever the current frame is 1.
Enjoy playing around with the expressions and scalings in the driver property page to tweak your results.
You may eventually retrieve the animation curves by plotting the constrained parameters.
Download drivers for XSI 4.2, XSI 5 and XSI 5.11
Download drivers for XSI 6.01 or higher
requirements
Microsoft Windows XP
Microsoft DirectX 8 or higher
Softimage XSI 4.2 or higher
installation notes
In XSI go to File -> Add-on -> Install to install the plugin. After a restart of XSI, the drivers should show up in the Animate toolbar under Devices -> Manage Device Drivers. Make sure that you have installed DirectX 8 or higher before usage.