Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenXR Movement Demos #977

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

BastiaanOlij
Copy link
Contributor

This PR introduces two demo projects to show the two room scale movement options presented in the help pages found here:
https://docs.godotengine.org/en/stable/tutorials/xr/xr_room_scale.html

These demos have a few small improvements that should be applied to the help pages, and the help pages should reference these demos so people can try out the logic.

I plan to do a 3rd demo showing seated play but will submit that as a separate PR

@BastiaanOlij BastiaanOlij self-assigned this Oct 8, 2023
@BastiaanOlij BastiaanOlij force-pushed the openxr_movement_demos branch 2 times, most recently from 263226f to cdff829 Compare October 8, 2023 11:59
@DigitalN8m4r3
Copy link

had time to test both,
no issues so far and i like the blackout fade that u have added (should be standard! in the xr tools)

thanks for the hardwork there, lookin forward to the third one

@BastiaanOlij BastiaanOlij force-pushed the openxr_movement_demos branch from cdff829 to 5670518 Compare October 10, 2023 02:12
@goatchurchprime
Copy link

There are two projects with almost the same code. If the docs say that the Character body centric solution is inferior, maybe it shouldn't be included as it adds confusion. (I spent some time comparing between them to find out what was different between the two projects.)

Also, can the project name avoid having spaces? The Android exporter doesn't like it (for the package name), and it's just one more thing in the long list of (unavoidable) steps that stops the demo working on the Quest2 out of the box.

@DigitalN8m4r3
Copy link

There are two projects with almost the same code. If the docs say that the Character body centric solution is inferior, maybe it shouldn't be included as it adds confusion. (I spent some time comparing between them to find out what was different between the two projects.)

Also, can the project name avoid having spaces? The Android exporter doesn't like it (for the package name), and it's just one more thing in the long list of (unavoidable) steps that stops the demo working on the Quest2 out of the box.

going forward to keep backcompatibility it might be good to have both, after all not evry app/game needs a characterbody solution

@BastiaanOlij
Copy link
Contributor Author

There are two projects with almost the same code. If the docs say that the Character body centric solution is inferior, maybe it shouldn't be included as it adds confusion. (I spent some time comparing between them to find out what was different between the two projects.)

The Character Body one is actually the preferred approach.

The origin centric version is an older approach still used by XR Tools.

Both are however valid approaches, having demos to show both options so people can see how they work and decide for themselves which is the better approach for them I think is a valid thing to have.

Copy link

@Malcolmnixon Malcolmnixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both work very nicely.

@BastiaanOlij BastiaanOlij force-pushed the openxr_movement_demos branch from 5670518 to 49270c8 Compare November 3, 2023 09:06
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally in Godot 4.1.3 on Linux, both demos can start, but they exit after the warning dialog about not having an HMD connected displays. I don't have a VR HMD to test them in real world conditions.

Log:

ERROR: Condition "!texture_allocs_cache.has(p_id)" is true.
   at: texture_free_data (drivers/gles3/storage/utilities.h:111)
ERROR: Cubemap Arrays are not supported in the GL Compatibility backend.
   at: texture_2d_layered_initialize (drivers/gles3/storage/texture_storage.cpp:763)
ERROR: Attempting to use an uninitialized RID
   at: get_or_null (./core/templates/rid_owner.h:199)
ERROR: Condition "!t" is true.
   at: texture_free (drivers/gles3/storage/texture_storage.cpp:705)
Godot Engine v4.1.3.stable.official.f06b6836a - https://godotengine.org
Error [GENERAL |  | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to load a runtime
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
ERROR: OpenXR: Failed to enumerate number of extension properties
   at: load_supported_extensions (modules/openxr/openxr_api.cpp:175)
WARNING: OpenXR was requested but failed to start.
Please check if your HMD is connected.
When using Windows MR please note that WMR only has DirectX support, make sure SteamVR is your default OpenXR runtime.
Godot will start in normal mode.

     at: initialize_openxr_module (modules/openxr/register_types.cpp:125)

For consistency with other demos, demo folder names should be renamed to snake_case, e.g. openxr_character_centric_movement and openxr_origin_centric_movement.

@BastiaanOlij
Copy link
Contributor Author

I wonder what the cubemap error is about, seems like an internal issue.

The demo will indeed not work if you don't have an HMD, that kind of comes with the territory with a VR demo :) We really need to get you one.

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Calinou Calinou merged commit 4a4b46c into godotengine:master Nov 18, 2023
@BastiaanOlij BastiaanOlij deleted the openxr_movement_demos branch November 22, 2023 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants