Spatial variable standards: Difference between revisions

From Resonite Wiki
m fix typo
removed empty Notes column, added ElectricPotential and a few ways to describe a location
Line 14: Line 14:
!Variable
!Variable
!Type
!Type
!Sampling Recommendation
!Interpretation
!Interpretation
!Sampling Recommendation
!Notes
!Proposed by/when
!Proposed by/when
|-
|-
|Resonite.Audio.Filters
|Resonite.Audio.Filters
|AudioDSP_Effect
|AudioDSP_Effect
|Sample via the [[Component:ReferenceSpatialVariableCollector|ReferenceSpatialVariableCollector]]
|audio effects like reverb that are in effect in an area
|audio effects like reverb that are in effect in an area
|Sample via the [[Component:ReferenceSpatialVariableCollector|ReferenceSpatialVariableCollector]]
|Official by Resonite.
|Frooxius, 2025
|Frooxius, 2025
|}
|}
Line 29: Line 27:
== Physical Quantities ==
== Physical Quantities ==
Temperature, pressure and other values can vary greatly between different locations. (i.e. temperature within fire vs. temperature of an ice cube)
Temperature, pressure and other values can vary greatly between different locations. (i.e. temperature within fire vs. temperature of an ice cube)
{| class="wikitable"
{| class="wikitable"
|+
|+
Line 34: Line 33:
!Type
!Type
!Unit
!Unit
!Sampling Recommendation
!Interpretation
!Interpretation
!Sampling Recommendation
!Notes
!Proposed by/when
!Proposed by/when
|-
|-
Line 42: Line 40:
|float
|float
|K
|K
|Default: 288.15 K (= 15°C)
|temperature (0K = -273.15°C, 273.15K = 0°C)
|temperature (0K = -273.15°C, 273.15K = 0°C)
Typical temperatures for reference:
Typical temperatures for reference:
Line 53: Line 52:
* Gasoline flame: 1299K (=1026°C)
* Gasoline flame: 1299K (=1026°C)
* Propane flame (air): 1473-1973K (=1200-1700°C)
* Propane flame (air): 1473-1973K (=1200-1700°C)
|Default: 288.15 K (= 15°C)
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
Line 60: Line 57:
|float
|float
|Pa
|Pa
|Default: 101325 Pa
|pressure
|pressure
Typical pressures for reference:
Typical pressures for reference:
Line 66: Line 64:
* exponential decrease by 50% per 5400m altitude
* exponential decrease by 50% per 5400m altitude
* every 1m under water: add 9810 Pa
* every 1m under water: add 9810 Pa
|Default: 101325 Pa
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
Line 73: Line 69:
|float3
|float3
|m/s²
|m/s²
|Default: [0;-9.81;0] m/s²
|global acceleration due to gravity
|global acceleration due to gravity
|Default: [0;-9.81;0] m/s²
|
|TheAutopilot, 2025
|TheAutopilot, 2025
|-
|-
Line 81: Line 76:
|float3
|float3
|N
|N
|Default: [0;0;0] 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
|-
|-
Line 89: Line 83:
|float
|float
|kg/m³
|kg/m³
|Default: 1.225 kg/m³ (air)
|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
|-
|-
Line 97: Line 90:
|float3
|float3
|m/s
|m/s
|Default: [0;0;0] 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
|-
|-
Line 105: Line 97:
|float3
|float3
|V/m
|V/m
|Default: [0;0;0] V/m
|vector of the global [[wikipedia:Electric_field|electric field]] at the sampled position
|vector of the global [[wikipedia:Electric_field|electric field]] at the sampled position
|Default: [0;0;0] V/m
|
|Papaltine, 2025
|Papaltine, 2025
|-
|-
Line 113: Line 104:
|float3
|float3
|T (Tesla)
|T (Tesla)
|Default: [0;0;0] T
|vector of the global [[wikipedia:Magnetic_field|magnetic field]] at the sampled position
|vector of the global [[wikipedia:Magnetic_field|magnetic field]] at the sampled position
|Default: [0;0;0] T
|
|Papaltine, 2025
|Papaltine, 2025
|-
|Physics.ElectricPotential
|float
|V
|Default: 0 V
|electric potential (allows measuring voltage between two points)
|TheAutopilot, 2025
|}
|}


== Logical Properties ==
== Location Descriptions ==
{| class="wikitable"
{| class="wikitable"
!Variable
!Variable
!Type
!Type
!Sampling Recommendation
!Interpretation
!Interpretation
!Sampling Recommendation
!Notes
!Proposed by/when
!Proposed by/when
|-
|-
|
|Location.Tags
|
|string
|
|Default: null
|
|space-separated list of tags describing location
|
(recommended order: most general to most specific)
|
Note: Simply checking [[ProtoFlux:Contains|Contains]] may lead to errors with partial matches!
|Redd, 2025
|-
|Location.Slot
|Slot
|Default: null/Root (depends on use-case)
|Slot representing the location a position is in
This can be used to interact with dynamic impulses and dynamic variables.
|TheAutopilot, 2025
|-
|Location.Indoor
|bool
|Default: false
|describes whether a location is indoors
|TheAutopilot, 2025
|}
|}

Revision as of 23:27, 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 PascalCase would make all future proposals consistent to the existing ones.

Official Variables

The following variables are defaults used by FrooxEngine:

Variable Type Sampling Recommendation Interpretation Proposed by/when
Resonite.Audio.Filters AudioDSP_Effect Sample via the ReferenceSpatialVariableCollector audio effects like reverb that are in effect in an area 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 Sampling Recommendation Interpretation Proposed by/when
Physics.Temperature float K Default: 288.15 K (= 15°C) temperature (0K = -273.15°C, 273.15K = 0°C)

Typical temperatures for reference:

  • Freezing water: 273.15K (=0°C)
  • Boiling water (sea level): 373.15K (=100°C)
  • Igniting wood: 553-613K (=280-340°C)
  • Igniting gasoline: 493-733K (=220-460°C)
  • Igniting propane: 743K (=470°C)
  • Wood flame (air): 1300K (=1027°C)
  • Gasoline flame: 1299K (=1026°C)
  • Propane flame (air): 1473-1973K (=1200-1700°C)
TheAutopilot, 2025
Physics.Pressure float Pa Default: 101325 Pa pressure

Typical pressures for reference:

  • sea level: 101325 Pa
  • exponential decrease by 50% per 5400m altitude
  • every 1m under water: add 9810 Pa
TheAutopilot, 2025
Physics.Gravity float3 m/s² Default: [0;-9.81;0] m/s² global acceleration due to gravity TheAutopilot, 2025
Physics.Force float3 N Default: [0;0;0] N global force applied to all objects within the field TheAutopilot, 2025
Physics.Density float kg/m³ Default: 1.225 kg/m³ (air) density of the gas/liquid/solid at the sampled position TheAutopilot, 2025
Physics.Velocity float3 m/s Default: [0;0;0] m/s global velocity of the gas or liquid at the sampled position TheAutopilot, 2025
Physics.ElectricField float3 V/m Default: [0;0;0] V/m vector of the global electric field at the sampled position Papaltine, 2025
Physics.MagneticField float3 T (Tesla) Default: [0;0;0] T vector of the global magnetic field at the sampled position Papaltine, 2025
Physics.ElectricPotential float V Default: 0 V electric potential (allows measuring voltage between two points) TheAutopilot, 2025

Location Descriptions

Variable Type Sampling Recommendation Interpretation Proposed by/when
Location.Tags string Default: null space-separated list of tags describing location

(recommended order: most general to most specific) Note: Simply checking Contains may lead to errors with partial matches!

Redd, 2025
Location.Slot Slot Default: null/Root (depends on use-case) Slot representing the location a position is in

This can be used to interact with dynamic impulses and dynamic variables.

TheAutopilot, 2025
Location.Indoor bool Default: false describes whether a location is indoors TheAutopilot, 2025