-
Notifications
You must be signed in to change notification settings - Fork 5
Vehicle IK: Interactive elements
This page describes how interactive elements (also called "knobs" for short) can be configured in models so that they can be imported and 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.
Interactive elements (knobs) are defined by setting custom properties to the bone inside your 3D editor. The parameters read by Outerra are following:
"ot_knob_type" <string> //from list of predefined names
"ot_knob_handles" <string>
"ot_knob_action_name" <string>
"ot_knob_action_velocity" <float>
"ot_knob_action_acceleration" <float>
"ot_knob_action_centering" <float>
"ot_knob_action_min_value" <float>
"ot_knob_action_max_value" <float>
"ot_knob_action_positions" <integer>
"ot_knob_action_channel" <integer>
"ot_knob_anim_type" <string> //from list of predefined names
"ot_knob_anim_min" <float>
"ot_knob_anim_max" <float>
- Select armature object and use Edit mode
- Select the bone you want to edit
- Select bone properties in Property window
- Add custom property you want ("ot_knob_type" is mandatory) and set its value or better, use our blender plugin https://github.com/Outerra/anteworld/tree/master/blender/2.80/ot_knob_bones
- Select the bone you want to be defining
- Open: Animation -> Parameter Editor...
- Add each property you want
- Close the Parameter Editor
- The properties are now editable from the rollout
Type of hand pose that would be used for interaction with knob.
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
stick //< held by whole hand
Comma separated list of bone names used as handles 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
action path from iomap definition
or empty if knob is just visual and doesn't have any action
Note: When knob doesn't have defined action name, automatic name is assigned so that action can be referenced by script.
Format of automatic generated name is knob_action_[name of bone]
so for example for bone attribute with name (knob name) "left_wheel" it would be knob_action_left_wheel
.
if defined: maximum velocity of action value change
if not defined: default from table below is used
if defined: acceleration of action value change
if not defined: default from table below is used
if defined: speed of value returning to 0.0 action value
if not defined: default from table below is used
if defined: minimum action value
if not defined: default from table below is used
if defined: maximum action value
if not defined: default from table below is used
if defined: number of fixed positions between min and max values or 0 for continuous values
if positions == 1: object acts as button, after releasing, it returns to default position
if not defined: default from table below is used
if defined: channel number used by the knob
if not defined: default 0 is used
One of following:
rotateX //< rotation around bone's X axis
rotateY //< rotation around bone's Y axis
rotateZ //< rotation around bone's Z axis
translateX //< translation in bone's X axis
translateY //< translation in bone's Y axis
translateZ //< translation in bone's Z axis
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
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
Type | Velocity | Acceleration | Centering | Min value | Max value | Positions | Animation type | Anim min value | Anim max value |
---|---|---|---|---|---|---|---|---|---|
Button | Instant | Instant | Instant | 0 | 1 | 2 | translateY | 0 cm | 1 cm |
Slider | Instant | Instant | Instant | 0 | 1 | 2 | translateX | 0 cm | 1 cm |
Knob | Instant | Instant | Instant | 0 | 1 | 2 | rotateY | 0° | 90° |
Lever | Instant | Instant | Instant | 0 | 1 | 2 | rotateX | 0° | 45° |
Stick | Instant | Instant | Instant | 0 | 1 | 3 | rotateX | -15° | 15° |
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:
Bone representing slider should have the Y axis in direction towards slider and Z axis in "up" direction (where fingernail should be oriented).
Example:
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:
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 knob also defines "ot_knob_handles" property, as position where hand holds lever is different as point of rotation / translation.
Example:
Bone representing stick should have the Z axis pointing out of them. Hand will "grab" the X axis.
Note: usually stick knob also defines "ot_knob_handles" property, as position where hand holds stick is different as point of rotation / translation.
Example:
Test