Replies: 3 comments 2 replies
-
Thanks @p4puniya for this discussion. Hi @codeanticode , me and @p4puniya have been discussing and going through the cardboard sdk from almost a month. Gaurav as of now have gone through the cardboard sdk codebase and trying to import the sdk into processing, adding a jni bridge for it. Thanks, |
Beta Was this translation helpful? Give feedback.
-
Updates on Current progress.
Currently, I'm trying to add the JNI bridge but facing some issues about how I should go about it. Usually, the JNI targets the MainActivity, and these activities use the native functions. But processing works very differently. The Java files such as VRActivity.java, VRGraphics.java etc are solely responsible for constructing the VR app in sketch. Though @ranaaditya is helping me figure things out and work accordingly, I would really appreciate the participation of @codeanticode and other community members in this discussion, since this project is fairly complex and could use the expertise of fellow community members. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Brief about current progress:I want to brief everyone about the approach we have considered and worked towards until now, as well as the problems/challenges faced in each approach. Task at hand: Migrate the GVR libraries to cardboard sdk.Approach 1:Change the templates of the final VR sketch to include Cmake, Cardboard NDK, and change VRActivity template to directly call the functions and build the VR app.
Work Done:
Approach 2:We brainstormed on how to integrate the previous approach with the current Processing VR. After much research and discussions, we came up with a solution, that we can set up the Cardboard SDK , then create a JNI bridge between the Java files (Such as VRActivity, VRSurface etc. here ). And integrate the cardboard NDK with Processing Android. We started to implement this approach but were faced with many challenges:
Work Done:
Approach 3:
This approach has already resulted in close to 1000 additions in the code base which are mostly self implemented. ( here ) Another 4 ( Not implemented yet):
I do hope that this clears up everything I've worked on until now, but feel free to ask any doubts or anything that comes to your mind. |
Beta Was this translation helpful? Give feedback.
-
Introduction
Hi everyone,
This is an open discussion for implementation of *Migrating the VR libraries from GVR to Cardboard SDK in processing-android as part of GSoC'23(extended timeline).
Lets start with Cardboard SDK - You can use the Cardboard SDK to turn a smartphone into a VR platform. A smartphone can display 3D scenes with stereoscopic rendering, track and react to head movements, and interact with apps by detecting when the user presses the viewer button.
What's the need to switch to Cardboard SDK?
Since 2019, Google stopped supporting the Google VR and deprecated it. Instead, it shifted it's focus towards native libraries which was already in use: Cardboard SDK. Due to this, Processing's VR library became redundant. Thus, by migrating to Cardboard SDK, we can make the VR library functional again.
After a thorough discussion with @ranaaditya , we created a rough idea on how we can achieve this:
This will be an exciting project for me and everyone is welcomed for active participation in this discussion!
References
Adding JNI to an existing Android App
Link Gradle to your Native Library
Adding C/C++ code to our project
What are your thoughts on this @codeanticode, @ranaaditya ?
Thanks,
Gaurav
GSoC Contributor: Gaurav Puniya
Beta Was this translation helpful? Give feedback.
All reactions