Skip to content

Vehicle IK: Interactive elements

Jakub Lukasik edited this page May 26, 2020 · 29 revisions

This page describes how interactive elements can be set up in models so that they can be used by Outerra engine. Multiple properties can be configured for proper action binding, for more info about action binding read "bin/defaults/iomap/readme.txt" located in outerra directory.

Bone properties

The control elements (control bones) are defined by setting custom attributes to a bone inside your 3D editor. The parameters used by Outerra are following:

"ot_controlbone_type" <string>
"ot_controlbone_action" <string>
"ot_controlbone_animation" <string>

How to set properties

Blender

  1. Select the bone you want to edit
  2. Select object rollout
  3. Add each property you want and set its value or use blender blugin https://github.com/Outerra/anteworld/tree/master/blender/2.80/ot_control_bones

3DS max

  1. Select the bone you want to be defining
  2. Open: Animation -> Parameter Editor...
  3. Add each property you want
  4. Close the Parameter Editor
  5. The properties are now editable from the rollout

Maya

TODO


Description

ot_controlbone_type

format: type;[handles] example: "lever;door_handle_out,door_handle_in"

type: one of following

button    //< pressed by an index finger
slider    //< held by thumb and index
knob      //< held by thumb, index and middle finger
lever     //< held by whole hand
shaft     //< held by whole hand

handles : comma separated list of bone names used as hanles for this element

if defined: any bone defined in list can be interacted for handling current element
if not defined: current bone is used as handle

ot_controlbone_action

format: action_name;[max velocity];[acceleration];[centering];[min value];[max value];[step count];[channel count] example: car/lights/main;5;1000;0;0;1;;

action_name:

action path from iomap definition

max velocity :

if defined: maximum velocity of value change
if not defined: default 1.0 is used

acceleration :

if defined: acceleration of value change
if not defined: default 1000.0 is used

centering :

if defined: speed of value returning to 0.0
if not defined: default 0.0 is used (do not return to center)

min value :

if defined: minimum value
if not defined: default -1.0 is used

max value :

if defined: maximum value
if not defined: default 1.0 is used

step count :

if defined: value granularity, number of steps between min/max
if not defined: default 1 is used

channel count :

if defined: number of extra channels supported by the handler
if not defined: default 0 is used

ot_controlbone_animation

format: type;[min];[max] example: "rX;-15;15"

type: one of following

rX      //< rotation around bone's X axis
rY      //< rotation around bone's Y axis
rZ      //< rotation around bone's Z axis
tX      //< translation in bone's X axis
tY      //< translation in bone's Y axis
tZ      //< translation in bone's Z axis

min : amount of transformation when action value is at it's minimum

if defined:
        if type is rotation: value represents angle rotation in degrees
        if type is translation: value represents movement in centimeters
if not defined: default value by table below is used

max : amount of transformation when action value is at it's maximum

if defined:
        if type is rotation: value represents angle rotation in degrees
        if type is translation: value represents movement in centimeters
if not defined: default value by table below is used

Hand poses by control type

button

Bone representing button should have the Y axis in direction of button movement and Z axis in "up" direction (where fingernail should be oriented).

Example:

slider

Bone representing slider should have the Y axis in direction towards slider and Z axis in "up" direction (where fingernail should be oriented).

Example:

knob

Bone representing knob should have the Y axis in direction as axis of knob rotation and Z axis "up" direction (where index and middle fingernail should be oriented).

Example:

lever

Bone representing lever should have the X axis in opposite direction as lever and Z axis in direction where palm should be located (Y axis then determine where fingers will be).

Note: usually lever control also defines "control_handles" property, as position where hand holds lever is different as point of rotation / translation.

Example:

shaft

Bone representing shaft should have the Z axis pointing out of them. Hand will "grab" the X axis.

Note: usually lever control also defines "control_handles" property, as position where hand holds lever is different as point of rotation / translation.

Example:


Control animation

Defaults

If "ot_controlbone_animation" is not defined, defaults by "ot_controlbone_type" are used.

          |     type      |    min    |    max    
--------------------------------------------------
button    |  translate Y  |      0    |     1     
slider    |  translate X  |     -1    |     1     
knob      |  rotate Y     |    -90    |    90     
lever     |  rotate Z     |    -15    |    15     
shaft     |  rotate X     |    -15    |    15     

Test

Clone this wiki locally