空間変数は、位置に応じて変化する値を定義できる強力な機能です。個別に開発されたオブジェクト間でシームレスな連携を実現するためには、空間変数の命名規則、データ型、内容、およびサンプリング方法に関する標準規格に従う必要があります。
本記事では、他のユーザーが独自の設定を作成する代わりに、既存の設定を再利用して他の作品との互換性を確保することを目的として、コミュニティから提案された複数の標準規格をまとめています。
命名規則
名前の衝突リスクを回避するため、命名規則として「接頭辞.変数名」形式を使用することが推奨されます。この形式では、共通の接頭辞によって関連する変数がグループ化されます。
パスカルケースを採用すれば、今後のすべての提案が既存の表記法と統一されます。
Sampling Mode
Standards should recommend a sampling mode where applicable.
Examples include:
- HighestPriority: Only the value with the highest priority is considered. This will lead to abrupt transitions between areas.
- Additive: All variables are added together. Variables with blend distance will avoid sharp transitions. It is not possible to create an area with an override. (priorities are ignored)
- WeightedAverage: All variables are averaged. Variables with blend distance will avoid sharp transitions. It is not possible to create an area with an override. (priorities are ignored)
- PrioritySortedBlend: This layers variables with higher priority on top of variables with lower priority. Variables with blend distance will avoid sharp transitions.
Default Value
標準仕様では、合理的でデフォルトとして適切な値を推奨する必要があります。
空間変数と同じ名前を持つ「ワールド」空間の動的変数を使用することで、デフォルト値を設定可能です。(例:空間変数「Gravity」のデフォルト値として、動的変数「World/Gravity」を設定)
This approach can also be used to extend existing standards for dynamic variables with location-based overrides.
Official Variables
以下の変数は、FrooxEngineでデフォルト値として使用される設定項目です:
Variable | Type | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|
Resonite.Audio.Filters | AudioDSP_Effect | ReferenceSpatialVariableCollector を使用してサンプルを取得 | 特定のエリア内で有効になっているリバーブなどの音響効果 | Frooxius, 2025 |
Simple Interactions
以下の変数は、オブジェクトに簡単に組み込めるように設計されています:
Variable | Type | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|
Heat | float | Additive
Default: 0 |
Positive: heat source
Negative: heat sink suggested values: A few meters from a fire: 1 Cooking: 10 Slightly cold: -1 Freezing: -10 |
LucasRo7, 2025 |
Fire | bool | MaxPriority
Default: false |
sets things on fire | LucasRo7, alizard, Panda, 2025 |
Water | bool | MaxPriority
Default: false |
puts out fire and makes things wet | LucasRo7, Panda, 2025 |
Electric | bool | MaxPriority
Default: false |
shocks things or people, may turn devices on | LucasRo7, 2025 |
Wind | float3 | Default: [0;0;0] | wind speed in m/s | LucasRo7, 2025 |
Physical Quantities
温度、圧力、その他の物理量は、場所によって大きく異なる場合があります。(例えば、火炎内部の温度と氷の塊の温度など)
理論上、このようなあらゆる特性を空間変数として扱うことが可能です。 この考え方に基づいて、以下の提案が作成されています。
その有用性は様々です。温度や重力のように、日常生活の中でより顕著に感じられるものもあれば、電場のようにあまり意識されないものもあります。
Mature
以下の提案については、作成者自身が「さらなる変更は不要」と判断したか、あるいは既にこれらの提案を採用した項目が存在しています。
Variable | Type | Unit | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|---|
Temperature
|
Temperature | (included in type) | Mode: PrioritySortedBlend
Default:
|
air/water/object temperature
Simple games and interactive objects can use the following conditions:
A typical flame is around 1300K / 1027°C at its core and easily fulfills the requirements to start a fire! Realistic objects could use "real" temperatures but still be compatible with simplified objects:
|
TheAutopilot, 2025 |
Gravity
|
float3 | m/s² | Mode: PrioritySortedBlend
Default:
|
global acceleration due to gravity
|
TheAutopilot, 2025 |
In Progress
以下の基準は各提案者によって提示されたものですが、さらなる検討や実際の運用における採用が必要となる可能性があります。
Variable | Type | Unit | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|---|
Physics.Pressure | float | Pa | Default: 101325 Pa | pressure
Typical pressures for reference:
|
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.ElectricField | float3 | V/m | Default: [0;0;0] V/m
Mode: Additive |
vector of the global electric field at the sampled position | Papaltine, 2025 |
Physics.MagneticField | float3 | T (Tesla) | Default: [0;0;0] T
Mode: Additive |
vector of the global magnetic field at the sampled position
|
Papaltine, 2025 |
Physics.ElectricPotential | float | V | Default: 0 V | electric potential
|
TheAutopilot, 2025 |
FeetColliders | Slot list | NA | Default: Blank list | slots that avatar feet should either raycast only, or blacklist these from being raycast. | 989onan, 2025 |
FeetCollidersMode | ListFilterMode | NA | Default: BlackList | Whether feet raycast mode should be black or whitelist. | 989onan, 2025 |
Retracted
以下の提案は、提案者自身によって撤回されました(つまり、別の提案を支持するためです)。
Variable | Type | Unit | Sampling Recommendation | Interpretation | Proposed by/when |
---|---|---|---|---|---|
|
(retracted in favor of "Wind" by LucasRo7) |
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.Indoors | bool | Default: false
Blending: MaxPriority |
describes whether a location is indoors | TheAutopilot, 2025 |
Location.Underwater | bool | Default: false
Blending: MaxPriority |
describes whether a location is underwater | TheAutopilot,
2025 |