|
| 1 | +# OpenXR Render models demo |
| 2 | + |
| 3 | +This is a demo showing OpenXR's render models implementation. |
| 4 | + |
| 5 | +Language: GDScript |
| 6 | + |
| 7 | +Renderer: Compatibility |
| 8 | + |
| 9 | +> [!NOTE] |
| 10 | +> |
| 11 | +> This demo requires Godot 4.5 or later |
| 12 | +
|
| 13 | +## Screenshots |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +## How does it work? |
| 18 | + |
| 19 | +OpenXR allows us to run our application without having knowledge of the hardware being used, |
| 20 | +or that we as developers have access too at the time of developing our application. |
| 21 | + |
| 22 | +As a result we don't have direct information telling us what hardware is being used, |
| 23 | +however there are situations where we want to visually show this hardware. |
| 24 | + |
| 25 | +This specifically applies to the controllers used by the user, as showing the correct hardware |
| 26 | +improves the user's sense of immersion. |
| 27 | + |
| 28 | +The render model API allows us to enumerate the devices currently in use and then query |
| 29 | +information such as its 3D asset, its position and orientation in space, and the position |
| 30 | +and orientation of individual components of the asset. |
| 31 | + |
| 32 | +Godot's implementation hides most of the complexity of this through the OpenXRRenderModelManager |
| 33 | +node as a child of the XROrigin3D node. You can add just this node by itself and let it show |
| 34 | +all render models that are currently active, or like we do in this demo, you can add nodes |
| 35 | +in the tree of each controller to show render models related to that controller. |
| 36 | + |
| 37 | +## Action map |
| 38 | + |
| 39 | +This demo project has a barebones action map as we're only dealing with positioning. |
| 40 | + |
| 41 | +## Running on PCVR |
| 42 | + |
| 43 | +This project can be run as normal for PCVR. Ensure that an OpenXR runtime has been installed. |
| 44 | + |
| 45 | +## Running on standalone VR |
| 46 | + |
| 47 | +You must install the Android build templates and OpenXR loader plugin and configure an export template for your device. |
| 48 | +Please follow [the instructions for deploying on Android in the manual](https://docs.godotengine.org/en/stable/tutorials/xr/deploying_to_android.html). |
| 49 | + |
| 50 | + |
0 commit comments