Skip to main content
Version: Skinetic SDK 1.5.0

SkineticSDK::Skinetic::EffectProperties

Haptic Structure to describe how effect instances reproduce a pattern with variations. More...

Public Functions

Name
init(self self, int priority =5, float volume =100.0, float speed =1.0, int repeat_count =1, float repeat_delay =0.0, float play_at_time =0.0, float max_duration =0, int effect_boost =0, bool override_boost =False, float height =0.0, float tilting =0.0, float heading =0.0, bool front_back_inversion =False, bool up_down_inversion =False, bool right_left_inversion =False, bool front_back_addition =False, bool up_down_addition =False, bool right_left_addition =False) override

Public Attributes

Name
priority
Level of priority [1; 10] (default - 5).
volume
Percentage of the base volume between [0; 250]% (default - 100): [0;100[% the pattern attenuated, 100% the pattern's base volume is preserved, ]100; 250]% the pattern is amplified.
speed
Time scale between [0.01; 100] (default - 1): [0.01; 1[ the pattern is slowed down, 1 the pattern timing is preserved, ]1; 100] the pattern is accelerated.
repeat_count
Number of repetition of the pattern (default - 1) if the max_duration is not reached.
repeat_delay
Pause in second between to repetition of the pattern (default - 0).
play_at_time
Time in the pattern at which the effect start to play (default - 0).
max_duration
Maximum duration of the effect (default - 0), it is automatically stopped if the duration is reached without any regards for the actual state of the repeat_count.
effect_boost
Boost intensity level percent [-100; 100] (default - 0) of the effect to use instead of the default pattern value if override_boost is set to true.
override_boost
By setting this boolean to true (default - false), the effect will use the effect_boost value instead of the default pattern value.
height
Normalized height [-1; 1] to translate the pattern by (default - 0).
tilting
Heading angle (in degree) to rotate the pattern by in the horizontal plan (default - 0).
heading
Tilting angle (in degree) to rotate the pattern by in the sagittal plan (default - 0).
front_back_inversion
Invert the direction of the pattern on the front-back axis (default - false).
up_down_inversion
Invert the direction of the pattern on the up-down axis (default - false).
right_left_inversion
Invert the direction of the pattern on the right-left axis (default - false).
front_back_addition
Perform a front-back addition of the pattern on the front-back axis (default - false).
up_down_addition
Perform an up-down addition of the pattern on the front-back axis (default - false).
right_left_addition
Perform a right-left addition of the pattern on the front-back axis (default - false).

Detailed Description

class SkineticSDK::Skinetic::EffectProperties;

Haptic Structure to describe how effect instances reproduce a pattern with variations.

The spatialization properties (height, heading and tilting) allows to apply the pattern on the haptic device at a different location by translating/rotating it or performing some inversion/addition. Notice that combining additions greatly increase the processing time of the transformation. If the pattern possesses too many shapes and keys, a perceptible delay might be induced.

The three transformations are applied in this order: tilting, vertical rotation, vertical translation. The default position of a pattern is the one obtained when these three parameters are set to zero. The actual use of these 3 parameters depends on the default position of the pattern and the targeted interaction: e.g.; for a piercing shot, a heading between [-180; 180]° can be combined with a tilting between [-90; 90] when using a shape-based pattern centered in the middle of the torso; for a environmental effect, a heading between [-90; 90]° (or [-180; 180]°) can be combined with a tilting between [-180; 180]° (resp. [-180; 0]°) when using a pattern with shapes centered on the top, etc. There are no actual bounds to the angles as not to restrict the usage. Notice that actuator-based patterns cannot be transformed in this version.

The global boost intensity is applied to every effect being rendered as to increase them evenly. However, some effects are by design stronger than others. Hence, they all have a default boost value in the .spn that is added to the global boost intensity, and which can be set to compensate the discrepancy of intensity across a set of patterns. Weaker effects can have a high default boost value while, already strong effects can have a negative default boost value as to prevent the global boost intensity set by the user to increase the perceived intensity too much. Note that the resulting boost value is clamp between 0 and 100. When an instance of an effect is being rendered, the default boost value of the pattern, the one set in the design process, is used. If the boolean overridePatternBoost is set to true, the passed value effectBoost is used instead of the default one.

Since all effects cannot be rendered simultaneously, the least priority ones are muted until the more priority ones are stopped of finished rendering. Muted effects are still running, but not rendered.

The priority order is obtain using the priority level: priority increase from 10 to 1. In case of equality, the number of required simultaneous samples is used to determine which effect has the highest priority effects using less simultaneous samples have a higher priority. Again, if the number of required simultaneous samples is the same, the most recent effect has a higher priority.

Public Functions Documentation

function init

__init__(
self self,
int priority =5,
float volume =100.0,
float speed =1.0,
int repeat_count =1,
float repeat_delay =0.0,
float play_at_time =0.0,
float max_duration =0,
int effect_boost =0,
bool override_boost =False,
float height =0.0,
float tilting =0.0,
float heading =0.0,
bool front_back_inversion =False,
bool up_down_inversion =False,
bool right_left_inversion =False,
bool front_back_addition =False,
bool up_down_addition =False,
bool right_left_addition =False
) override

Public Attributes Documentation

variable priority

priority;

Level of priority [1; 10] (default - 5).

In case too many effects are playing simultaneously, the effect with the lowest priority (10) will be muted.

variable volume

volume;

Percentage of the base volume between [0; 250]% (default - 100): [0;100[% the pattern attenuated, 100% the pattern's base volume is preserved, ]100; 250]% the pattern is amplified.

Too much amplification may lead to the clipping of the haptic effects, distorting them and producing audible artifacts

variable speed

speed;

Time scale between [0.01; 100] (default - 1): [0.01; 1[ the pattern is slowed down, 1 the pattern timing is preserved, ]1; 100] the pattern is accelerated.

The resulting speed between the haptic effect's and the samples' speed within the pattern cannot exceed these bounds. Slowing down or accelerating a sample too much may result in a haptically poor effect.

variable repeat_count

repeat_count;

Number of repetition of the pattern (default - 1) if the max_duration is not reached.

If set to 0, the pattern is repeat indefinitely until it is either stopped with stop_effect() or reach the maxDuration value.

variable repeat_delay

repeat_delay;

Pause in second between to repetition of the pattern (default - 0).

This value is not affected by the speed parameter.

variable play_at_time

play_at_time;

Time in the pattern at which the effect start to play (default - 0).

This value need to be lower than the max_duration. It also takes into account the repeat_count and the repeat_delay of the pattern.

variable max_duration

max_duration;

Maximum duration of the effect (default - 0), it is automatically stopped if the duration is reached without any regards for the actual state of the repeat_count.

A max_duration of 0 remove the duration limit, making the effect ables to play indefinitely.

variable effect_boost

effect_boost;

Boost intensity level percent [-100; 100] (default - 0) of the effect to use instead of the default pattern value if override_boost is set to true.

By using a negative value, can decrease or even nullify the global intensity boost set by the user.

variable override_boost

override_boost;

By setting this boolean to true (default - false), the effect will use the effect_boost value instead of the default pattern value.

variable height

height;

Normalized height [-1; 1] to translate the pattern by (default - 0).

A positive value translate the pattern upwards. Not applicable to actuator-based patterns.

variable tilting

tilting;

Heading angle (in degree) to rotate the pattern by in the horizontal plan (default - 0).

A positive value rotates the pattern to the left of the vest. Not applicable to actuator-based patterns.

variable heading

heading;

Tilting angle (in degree) to rotate the pattern by in the sagittal plan (default - 0).

A positive value rotates the pattern upwards from front to back. Not applicable to actuator-based patterns.

variable front_back_inversion

front_back_inversion;

Invert the direction of the pattern on the front-back axis (default - false).

Can be combined with other inversion or addition. Not applicable to actuator-based patterns.

variable up_down_inversion

up_down_inversion;

Invert the direction of the pattern on the up-down axis (default - false).

Can be combined with other inversion or addition. Not applicable to actuator-based patterns.

variable right_left_inversion

right_left_inversion;

Invert the direction of the pattern on the right-left axis (default - false).

Can be combined with other inversion or addition. Not applicable to actuator-based patterns.

variable front_back_addition

front_back_addition;

Perform a front-back addition of the pattern on the front-back axis (default - false).

Overrides the front_back_inversion. Can be combined with other inversion or addition. Not applicable to actuator-based patterns.

variable up_down_addition

up_down_addition;

Perform an up-down addition of the pattern on the front-back axis (default - false).

Overrides the up_down_inversion. Can be combined with other inversion or addition. Not applicable to actuator-based patterns.

variable right_left_addition

right_left_addition;

Perform a right-left addition of the pattern on the front-back axis (default - false).

Overrides the right_left_inversion. Can be combined with other inversion or addition. Not applicable to actuator-based patterns.


Updated on 2024-06-05 at 16:05:52 +0000