Spatial variable standards: Difference between revisions

From Resonite Wiki
add official variable
added a few variable categories and recommendations
Line 2: Line 2:


This article collects several community-proposed standards made with the goal that other users - instead of creating their own - reuse them for compatibility with other creations.
This article collects several community-proposed standards made with the goal that other users - instead of creating their own - reuse them for compatibility with other creations.
== Recommendations ==
To avoid the risk of naming conflicts it is recommended to follow the naming standard "Prefix.Variable" where a shared prefix groups related variables together.
Using CamelCase would make all future proposals consistent to the existing ones.
== Official Variables ==
The following variables are defaults used by FrooxEngine:
{| class="wikitable"
|+
!Variable
!Type
!Interpretation
!Sampling Recommendation
!Notes
!Proposed by/when
|-
|Resonite.Audio.Filters
|AudioDSP_Effect
|audio effects like reverb that are in effect in an area
|Sample via the [[Component:ReferenceSpatialVariableCollector|ReferenceSpatialVariableCollector]]
|Official by Resonite.
|Frooxius, 2025
|}


== Physical Quantities ==
== Physical Quantities ==
Line 15: Line 39:
!Proposed by/when
!Proposed by/when
|-
|-
|Temperature
|Physics.Temperature
|float
|float
|K
|K
|temperature
|temperature
|
|Default: 288.15 K (= 15°C)
|
|0K = -273.15°C
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
|Pressure
|Physics.Pressure
|float
|float
|Pa
|Pa
|pressure
|pressure
|
|Default: 101325 Pa
|
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
|Gravity
|Physics.Gravity
|float3
|float3
|m/s²
|m/s²
|global acceleration due to gravity
|global acceleration due to gravity
|
|Default: [0;-9.81;0] m/s²
|
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
|Force
|Physics.Force
|float3
|float3
|N
|N
|global force applied to all objects within the field
|global force applied to all objects within the field
|
|Default: [0;0;0] N
|
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
|Density
|Physics.Density
|float
|float
|kg/m³
|kg/m³
|density of the gas/liquid/solid at the sampled position
|density of the gas/liquid/solid at the sampled position
|
|Default: 1.225 kg/m³ (air)
|
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
|Velocity
|Physics.Velocity
|float3
|float3
|m/s
|m/s
|global velocity of the gas or liquid at the sampled position
|global velocity of the gas or liquid at the sampled position
|
|Default: [0;0;0] m/s
|
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|}
== Logical Properties ==
{| class="wikitable"
!Variable
!Type
!Interpretation
!Sampling Recommendation
!Notes
!Proposed by/when
|-
|-
|Resonite.Audio.Filters
|
|AudioDSP_Effect
|
|Audio effects
|
|the audio effects like reverb that are in effect in an area
|
|Sample via the [[Component:ReferenceSpatialVariableCollector|ReferenceSpatialVariableCollector]]
|
|Official by Resonite.
|
|Frooxius, 2025
|}
|}

Revision as of 00:37, 10 May 2025

Spatial Variables are a powerful feature allowing you to define location-dependent values. To support seamless interaction between independently developed objects it is necessary to follow standards for naming, types, content and sampling of spatial variables.

This article collects several community-proposed standards made with the goal that other users - instead of creating their own - reuse them for compatibility with other creations.

Recommendations

To avoid the risk of naming conflicts it is recommended to follow the naming standard "Prefix.Variable" where a shared prefix groups related variables together.

Using CamelCase would make all future proposals consistent to the existing ones.

Official Variables

The following variables are defaults used by FrooxEngine:

Variable Type Interpretation Sampling Recommendation Notes Proposed by/when
Resonite.Audio.Filters AudioDSP_Effect audio effects like reverb that are in effect in an area Sample via the ReferenceSpatialVariableCollector Official by Resonite. Frooxius, 2025

Physical Quantities

Temperature, pressure and other values can vary greatly between different locations. (i.e. temperature within fire vs. temperature of an ice cube)

Variable Type Unit Interpretation Sampling Recommendation Notes Proposed by/when
Physics.Temperature float K temperature Default: 288.15 K (= 15°C) 0K = -273.15°C TheAutopilot, 2025
Physics.Pressure float Pa pressure Default: 101325 Pa TheAutopilot, 2025
Physics.Gravity float3 m/s² global acceleration due to gravity Default: [0;-9.81;0] m/s² TheAutopilot, 2025
Physics.Force float3 N global force applied to all objects within the field Default: [0;0;0] N TheAutopilot, 2025
Physics.Density float kg/m³ density of the gas/liquid/solid at the sampled position Default: 1.225 kg/m³ (air) TheAutopilot, 2025
Physics.Velocity float3 m/s global velocity of the gas or liquid at the sampled position Default: [0;0;0] m/s TheAutopilot, 2025

Logical Properties

Variable Type Interpretation Sampling Recommendation Notes Proposed by/when