Spatial variable standards/ja

From Resonite Wiki
Revision as of 13:45, 24 August 2025 by Kazu (talk | contribs) (Created page with "本記事では、他のユーザーが独自の設定を作成する代わりに、既存の設定を再利用して他の作品との互換性を確保することを目的として、コミュニティから提案された複数の標準規格をまとめています。")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

空間変数は、位置に応じて変化する値を定義できる強力な機能です。個別に開発されたオブジェクト間でシームレスな連携を実現するためには、空間変数の命名規則、データ型、内容、およびサンプリング方法に関する標準規格に従う必要があります。

本記事では、他のユーザーが独自の設定を作成する代わりに、既存の設定を再利用して他の作品との互換性を確保することを目的として、コミュニティから提案された複数の標準規格をまとめています。

命名規則

名前の衝突リスクを回避するため、命名規則として「接頭辞.変数名」形式を使用することが推奨されます。この形式では、共通の接頭辞によって関連する変数がグループ化されます。

パスカルケースを採用すれば、今後のすべての提案が既存の表記法と統一されます。

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
2025年現在、空間変数は比較的新しい機能であるため、コミュニティが提案している多くの仕様はまだ開発途上の段階にあります。もし新たな標準規格が必要だと思われる場合は、ぜひこのページに追加してください!詳細な議論はDiscordまたはトークページで行えます。

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

(formerly: Physics.Temperature)

Temperature (included in type) Mode: PrioritySortedBlend

Default:

  1. dynamic variable World/Temperature
  2. 288.15K / 15°C
air/water/object temperature
  • makes things freeze, boil or ignite
  • can be measured with thermometers
  • may be required for baking/cooking

Simple games and interactive objects can use the following conditions:

  • Freezing water: sampled <= 273.15K / 0°C
  • Boiling water (sea level): sampled >= 373.15K / 100°C
  • Cooking food: sampled >= 353K / 80°C for X minutes (higher temperature -> faster)
  • Starting a fire: sampled >= 550K / 277°C

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:

  • Igniting wood: sampled >= 553-613K / 280-340°C
  • Igniting gasoline: sampled >= 493-733K / 220-460°C
  • Igniting propane: sampled >= 743K / 470°C
  • Wood flame (air): 1300K / 1027°C
  • Gasoline flame: 1299K / 1026°C
  • Propane flame (air): 1473-1973K / 1200-1700°C
TheAutopilot, 2025
Gravity

(formerly: Physics.Gravity)

float3 m/s² Mode: PrioritySortedBlend

Default:

  1. dynamic variable World/Gravity
  2. [0;-9.81;0] m/s²
global acceleration due to gravity
  • accelerate users or items
TheAutopilot, 2025

In Progress

以下の基準は各提案者によって提示されたものですが、さらなる検討や実際の運用における採用が必要となる可能性があります。

Variable Type Unit Sampling Recommendation Interpretation Proposed by/when
Physics.Pressure float Pa Default: 101325 Pa pressure
  • expand or compress hollow objects

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.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
  • detect if within vacuum (breathing)
  • compute wind force together with variable "Wind"
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
  • makes a compass point to another direction
Papaltine, 2025
Physics.ElectricPotential float V Default: 0 V electric potential
  • allows measuring voltage between two points
  • can be used to check if a user or item should be electrocuted
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
Physics.Velocity float3 m/s Default: [0;0;0] m/s global velocity of the gas or liquid at the sampled position
  • compute wind force together with density
TheAutopilot, 2025

(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