-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
[4.x] Add ARCore support #77559
[4.x] Add ARCore support #77559
Conversation
06d3dca
to
0614bd8
Compare
Looking good so far, I wonder if the ARCore mode will still be needed now that we can append the needed manifest items through the ARCode AAR, but the camera server changes are definately needed. |
d6ee0b1
to
2361fb6
Compare
Thanks for picking up this effort! I only skimmed the code, but for the most part the changes seem fairly straight-forward! The only thing I don't understand is: what is the "ARCore" XR mode for?
Your branch appears to have vanished! |
Thanks for taking a look David!
I am still new at the codebase but as far as I understand it myself Godot doesn't know which XR functionality you want to use (you can use OpenXR on Android as well for VR purposes) on export so that is why you have to tell Godot yourself by setting it in the export settings.
Should be there again. I seem to have accidentally deleted it on the server-side. Had my local git backup luckily 🍀 Maybe you can also give your input here @dsnopek: In 3.x there was |
4d7ef13
to
ce264b7
Compare
Discussed at the GDExtension meeting: as far as we understand it, the methods and data that would be exposed would only be useful for GDExtension, and so it probably doesn't make sense to expose via ClassDB, where GDScript would have access to it. Instead, it might make more sense to add new functions to the GDExtension interface. |
6bccfc9
to
05c768f
Compare
I think it would be helpful to take a step back and clarify what we actually need in order to get ARCore working on Godot 4.x.
As @BastiaanOlij mentioned, most of the changes (asides from the camera related ones), and discussed functionality can instead be accessed through Godot Android plugin. |
I think the main issue @paddy-exe is currently running into is not having access to the JavaVM. Those were exposed to GDNative through that class. I don't think that is the way it should be done now, but the correct way of accessing this information is unclear. I vaguely remember we did this somehow in early ports of the OpenXR plugin but I can't find any info on that anymore. |
@m4gr3d I am totally fine with doing it either way. I discussed a possibility to create a base class with @dsnopek and create an inheriting class for GDExtension access. I am totally fine with doing it either way. I discussed a possibility to create a base class with @dsnopek and create an inheriting class for GDExtension access. As Bastiaan already mentioned I have no clear understanding how to do this now with the current system. |
I'm not sure how the base class fits in anymore, after what we discussed at the GDExtension meeting. I had understood the base class idea to be a way to more cleanly expose If you need help getting that going, feel free to ping me on RocketChat :-) |
Ah alright. Yeah the audio during the meeting wasn't great for me due to connection issues. I guess it would be quite hard to do this via the low level
I will revert the last commit and try to get into the Android ARCore plugin and expose the functions there like @m4gr3d suggested and if that fails will come back to your offer. Thanks! |
9adc1e6
to
fd58ad1
Compare
Alright, reverted back to original commit and supplied the updated |
fd58ad1
to
1d1d7bb
Compare
017551f
to
fe7a6e4
Compare
This commit implements the needed methods for the ARCoreInterface class such as * `get_activity()` * `get_surface()` * `is_activity_resumed()` * `get_display_rotation()` -> will be added in ongoing upstream PR: godotengine/godot#77559
fe7a6e4
to
1b4b8be
Compare
1b4b8be
to
bae0b90
Compare
Is there any further progress for the ARCore plugin? It looks like you were making headway and only pending a plugin finalize from the 4.x refactoring. |
I am still interested in getting this going. I was finalising my thesis and had no time until now. I will try to dedicate some time to this next year hopefully👍🏻 |
Looking at this during our ARCore meeting, this will likely be able to be closed, camera feed logic is being implemented in #95187, display rotation can now be accessed directly in the plugin and no longer needs changes in Godot, but we're unsure about the ARCore mode. @m4gr3d do you know if the ARCode xr-mode would still be needed or that what Luca does here is enough? |
Is anything in this PR still needed anymore? Or, is it superseded by #96705? |
I don't think so. Will close the PR then |
This is an updated version for ARCore support of #47455 but for 4.x.
This is a WIP and feedback is very much appreciated
Procedure for building:
Generally follow this build instruction: https://github.com/GodotVR/godot_arcore
My 4.x branch of godot_arcore: https://github.com/paddy-exe/godot_arcore/tree/4.x
NDK version: 21.4.7075529
Android Studio Electric Eel (latest archived version)
Build the updated engine
Build the Plugin
cd ../.. git clone --branch 4.x git@github.com:paddy-exe/godot_arcore.git
cd godot_arcore git submodule update --init --recursive
cd .. cp godot/bin/extension_api.json godot/bin/gdextension_interface.h godot_arcore/plugin/libs/godot-cpp/gdextension/
cd godot_arcore python ./generate.py