Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Impostazioni OpenXR
OpenXR ha un proprio insieme di impostazioni che sono applicate all'avvio. Sebbene sia possibile che le estensioni di OpenXR implementate tramite le estensioni di Godot aggiungano ulteriori impostazioni, qui discuteremo solo delle impostazioni del core di Godot.
Impostazioni generali
Abilitato
Questa impostazione abilita il modulo OpenXR all'avvio di Godot. È necessaria quando si utilizza il backend Vulkan. Per altri backend è possibile abilitare OpenXR in qualsiasi momento chiamando initialize su OpenXRInterface.
È necessario abilitare questa opzione anche per accedere all'editor della mappa di azioni.
È possibile usare l'opzione della riga di comando --xr-mode on per forzarla abilitata.
Mappa di azioni predefinita
Specifica il percorso del file della mappa di azioni che OpenXR caricherà e comunicherà al runtime XR.
Fattore forma
Specifica se il tuo gioco è progettato per:
Dispositivi
Head Mounted(montato sulla testa) come Meta Quest, Valve Index o Magic Leap,Dispositivi
Handheld(portatili) come i telefoni.
Se il dispositivo su cui esegui il gioco non corrisponde alla selezione qui, OpenXR non riuscirà a inizializzarsi.
Configurazione di vista
Specifica la configurazione della vista per cui è progettato il tuo gioco:
Mono, il tuo gioco fornisce un'unica immagine in uscita. Ad esempio, AR basata su telefoni;Stereo, il tuo gioco fornisce un'immagine stereo in uscita. Ad esempio, dispositivi montati sulla testa.
Se il dispositivo su cui esegui il gioco non corrisponde alla selezione qui, OpenXR non riuscirà a inizializzarsi.
Nota
OpenXR offre ulteriori configurazioni della vista per dispositivi molto specifici che Godot non supporta ancora. Ad esempio, i visori Varjo hanno una configurazione a quattro viste che produce due insiemi di immagini stereo. Queste potrebbero essere supportate nel prossimo futuro.
Spazio di riferimento
In XR, tutti gli elementi, come la testa e le mani del giocatore, sono tracciati all'interno di un volume di tracciamento. Alla base di questo volume di tracciamento si trova il nostro punto di origine, che mappa il nostro spazio virtuale sullo spazio reale. Esistono tuttavia diversi scenari che collocano questo punto in posizioni diverse, a seconda del sistema XR utilizzato. In OpenXR, questi scenari sono ben definiti e selezionati impostando uno spazio di riferimento.
Locale
Lo spazio di riferimento locale posiziona il nostro punto di origine sulla testa del giocatore, come predefinito. Alcuni runtime XR lo faranno ogni volta che il gioco si avvia, altri faranno in modo che la posizione persista per più sessioni.
This reference space however does not prevent the user from walking away so you will need to detect if the user does so if you wish to prevent the user from leaving the vehicle they are controlling, which could potentially be game breaking.
This reference space is the best option for games like flight simulators or racing simulators where we want to place the XROrigin3D node where the player's head should be.
When the user enacts the recenter option on their headset, the method of which is different per XR runtime,
the XR runtime will move the XRCamera3D to the XROrigin3D node.
The OpenXRInterface will also emit the pose_recentered signal
so your game can react accordingly.
Nota
Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly.
Avvertimento
You should not call center_on_hmd when using this reference space.
Stage
The stage reference space is our default reference space and places our origin point at the center of our play space. For XR runtimes that allow you to draw out a guardian boundary this location and its orientation is often set by the user. Other XR runtimes may decide on the placement of this point by other means. It is however a stationary point in the real world.
This reference space is the best option for room scale games where the user is expected to walk around a larger space, or for games where there is a need to switch between game modes. See Room Scale for more information.
When the user enacts the recenter option on their headset, the method of which is different per XR runtime,
the XR runtime will not change the origin point.
The OpenXRInterface will emit the pose_recentered signal
and it is up to the game to react appropriately.
Not doing so will prevent your game from being accepted on various stores.
In Godot you can do this by calling the center_on_hmd function on the XRServer:
Calling
XRServer.center_on_hmd(XRServer.RESET_BUT_KEEP_TILT, false)will move the XRCamera3D node to the XROrigin3D node similar to theLocalreference space.Calling
XRServer.center_on_hmd(XRServer.RESET_BUT_KEEP_TILT, true)will move the XRCamera3D node above the XROrigin3D node keeping the player's height, similar to theLocal Floorreference space.
Nota
Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly.
Pavimento locale
The local floor reference space is similar to the local reference space as it positions the origin point where the player is. In this mode however the height of the player is kept. Same as with the local reference space, some XR runtimes will persist this location over sessions.
It is thus not guaranteed the player will be standing on the origin point, the only guarantee is that they were standing there when the user last recentered. The player is thus also free to walk away.
This reference space is the best option of games where the user is expected to stand in the same location or for AR type games where the user's interface elements are bound to the origin node and are quickly placed at the player's location on recenter.
When the user enacts the recenter option on their headset, the method of which is different per XR runtime,
the XR runtime will move the XRCamera3D above the XROrigin3D node
but keeping the player's height.
The OpenXRInterface will also emit the pose_recentered signal
so your game can react accordingly.
Avvertimento
Be careful using this mode in combination with virtual movement of the player.
The user recentering in this scenario can be unpredictable unless you counter the move when handling the recenter signal.
This can even be game breaking as the effect in this scenario would be the player teleporting to whatever abstract location
the origin point was placed at during virtual movement, including the ability for players teleporting into
locations that should be off limits.
It is better to use the Stage mode in this scenario and limit resetting to orientation only when a pose_recentered signal is received.
Nota
Any other XR tracked elements such as controllers or anchors will also be adjusted accordingly.
Avvertimento
You should not call center_on_hmd when using this reference space.
Modo di fusione di ambiente
The environment blend mode defines how our rendered output is blended into "the real world" provided this is supported by the headset.
Opaquemeans our output obscures the real world, we are in VR mode.Additivemeans our output is added to the real world, this is an AR mode where optics do not allow us to fully obscure the real world (e.g. Hololens),Alphameans our output is blended with the real world using the alpha output (viewport should have transparent background enabled), this is an AR mode where optics can fully obscure the real world (Magic Leap, all pass through devices, etc.).
If a mode is selected that is not supported by the headset, the first available mode will be selected.
Nota
Some OpenXR devices have separate systems for enabling/disabling passthrough. From Godot 4.3 onwards selecting the alpha blend mode will also perform these extra steps. This does require the latest vendor plugin to be installed.
Livello di foveazione
Sets the foveation level used when rendering provided this feature is supported by the hardware used. Foveation is a technique where the further away from the center of the viewport we render content, the lower resolution we render at. Most XR runtimes only support fixed foveation, but some will take eye tracking into account and use the focal point for this effect.
The higher the level, the better the performance gains, but also the more reduction in quality there is in the user's peripheral vision.
Nota
Compatibility renderer only,
for Mobile and Forward+ renderer, set the vrs_mode property on Viewport to VRS_XR.
Avvertimento
This feature is disabled if post effects are used such as glow, bloom, or DOF.
Foveation Dynamic
When enabled the foveation level will be adjusted automatically depending on current GPU load. It will be adjusted between low and the select foveation level in the previous setting. It is therefore best to combine this setting with foveation level set to high.
Nota
Solo per il renderer Compatibilità
Submit Depth Buffer
If enabled an OpenXR supplied depth buffer will be used while rendering which is submitted alongside the rendered image. The XR runtime can use this for improved reprojection.
Nota
Enabling this feature will disable stencil support during rendering. Not many XR runtimes make use of this, it is advised to leave this setting off unless it provides noticeable benefits for your use case.
Startup Alert
If enabled, this will result in an alert message presented to the user if OpenXR fails to start. We don't always receive feedback from the XR system as to why starting fails. If we do, we log this to the console. Common failure reasons are:
No OpenXR runtime is installed on the host system.
Microsoft's WMR OpenXR runtime is currently active, this only supports DirectX and will fail if OpenGL or Vulkan is used.
SteamVR is used but no headset is connected/turned on.
Disable this if you support a fallback mode in your game so it can be played in desktop mode when no VR headset is connected,
or if you're handling the failure condition yourself by checking OpenXRInterface.is_initialized().
Estensioni
This subsection allows you to enable to various optional OpenXR extensions. Keep in mind that the extensions will only work if the OpenXR runtime (SteamVR, Oculus, etc) the project is ran with supports them.
Utilità di debug
Enabling this will log debug messages from the XR runtime.
Tipi di messaggi di debug
Questo permette di scegliere quali messaggi di debug sono registrati.
Frame Synthesis
When enabled, provided it's supported by the XR runtime, lower resolution motion vector and depth buffers are rendered and provided to the XR runtime. The XR runtime can now inject reprojection frames and compensate for lower framerates.
It currently has the following limitations:
Does NOT work in the Forward+ renderer.
Funziona solo con il rendering stereoscopico.
Tracciamento delle mani
This enables the hand tracking extension when supported by the device used. This is on by default for legacy reasons. The hand tracking extension provides access to data that allows you to visualise the user's hands with correct finger positions. Depending on platform capabilities the hand tracking data can be inferred from controller inputs, come from data gloves, come from optical hand tracking sensors or any other applicable source.
If your game only supports controllers this should be turned off.
See the page on hand tracking for additional details.
Hand Tracking Unobstructed Data Source
Enabling this means hand tracking may use the exact position of fingers, usually what a headset camera sees.
Hand Tracking Controller Data Source
Enabling this means hand tracking may use the controller itself, and infer where fingers are based on controller input or sensors on the controller.
Profilo di interazione della mano
Enabling this extension allows the use of two new hand tracking poses. Pinch pose which is the location between the thumb and index finger pointing forward, and poke pose which is at the tip of the index finger.
This also allows 3 more gesture based inputs. Pinch, when the user pinches their thumb and index finger together. Aim activation, when the index finger is fully extended. And Grasps, when the user makes a fist.
When a hand interaction profile and controller interaction profile are supplied, the runtime will switch between profiles depending on if optical tracking is used or if the user is holding a controller.
If only a hand interaction profile is supplied any runtime should use hand interaction even if a controller is being held.
Spatial Entities
This extension and its settings are used to obtain and interact with information about the user's real world environment. You can find more detailed information on how it works on the spatial entities page.
Interazione con lo sguardo degli occhi
This enables the eye gaze interaction extension when supported by the device used. When enabled we will get feedback from eye tracking through a pose situated between the user's eyes orientated in the direction the user is looking. This will be a unified orientation.
In order to use this functionality you need to edit your action map and add a new pose action,
say eye_pose.
Now add a new interaction profile for the eye gaze interaction and map the eye_pose:
Don't forget to save!
Next add a new XRController3D node to your origin node
and set its tracker property to /user/eyes_ext
and set its pose property to eye_pose.
Now you can add things to this controller node such as a raycast, and control things with your eyes.
Modelli di rendering
This extension is used to query the XR runtime for 3D assets of the hardware being used, usually a controller, as well as the position of that hardware. You can find a detailed guide on how to use it here.
Modificatori di associazioni
These control whether or not binding modifiers can be used. Binding modifiers are used to apply thresholds or offset values. You can find information on how to use and set them up on the XR action map page here.
Soglia analogica
Allow analog threshold binding modifiers.
Associazione del d-pad
Allow D-pad binding modifiers.