B4A Library Google VR

warwound

Expert
Licensed User
Longtime User
Is it possible to wrap the controller classes too ? (daydream controller)

Possible yes, but not something i have time to do.
I can make the library source code available if someone else has time to add the other classes.
 

hcm

Member
Licensed User
Longtime User
Hi, looks great! Would it be possible to set a camera view as VRPanoramaView background (using a transparent 360 degrees image) to use this in a simple augmented reality app?
 

hcm

Member
Licensed User
Longtime User
Hi warwound,
I tried your GoogleVR lib and it really works great. Thanks a lot for this.
Actually I would like to use it for a simple AR App, as the yaw/pitch heading is solved very well and graphics is fast.
I already tried a transparent png file with some non-transparent objects and placed it in front of a cam preview panel.
Unfortunately it didn't work, the VrPanoramaView stayed opaque even when declaring its background as transparent.

I found a posting which deals with the same subject and where this is proposed:

"Besides the backgroundColor, set opaque NO for all the sublayers of the carboardView.layer.
It works when vrModeEnabled is NO. I have no idea when vrModeEnabled is YES."


http://stackoverflow.com/questions/...-cardboard-view-scenes-background-to-show-cam


Is there a possibility to set the sublayers to transparent in your library?
Otherwise, could I pay you the work to include it, if it isn't too demanding?
 

warwound

Expert
Licensed User
Longtime User
Is there a possibility to set the sublayers to transparent in your library?

Hi.

Let's start with some basics - then i can better understand what you require.

  • VrPanoramaView and VrVideoView are both derived from VrWidgetView.
  • VrWidgetView is derived from the android FrameLayout.

So i'd guess you want to access one or more methods of the FrameLayout in order to set it's background as transparent.

The code snippet on the stanckoverflow page you linked to isn't java - looks like C++ for Apple devices to me - so isn't an awful lot of help working out which java methods of the FrameLayout need to be called.

Can you experiment using the JavaObject library using code such as this:

B4X:
Dim FrameLayout as JavaObject=MyVrPanoramaView '   here change MyVrPanoramaView to match your code

'   choose a java method to call and choose params to pass to that method
Dim MethodName as String="HERE PUT THE NAME OF THE METHOD YOU WANT TO CALL)
Dim Params() As Object=Array As Object(COMMA SEPARATED LIST OF PARAMS HERE)

FrameLayout.RunMethod(MethodName, Params)

Now a search for "android framelayout transparent" brings various results.
You can try to implement any suggestions found in the results using the JavaObject.
 
Reactions: hcm

hcm

Member
Licensed User
Longtime User
Thanks for the explanation and help! You are right, the example refers to iOS, but deals with the same concept/problem.

Hopefully the Javaobject Lib will allow me to find a solution. I managed to have a transparent VrPanoramaView
background so I can see the camera preview behind, but as soon as I load the .png panorama file its transparent
areas are all shown black, so possibibly transparency is not supported. But I will keep trying....
 

b4xscripter

Member
Licensed User
Longtime User
Dear Warwound,
Many thanks for this library!
May I ask you where can I find the working link to download this library and an example?
Thanks a lot!

Best regards
 

b4xscripter

Member
Licensed User
Longtime User
Thank you a lot, Warwound!
I'll try your library and I'll give you my feedback.

Best regards
 

mshafiee110

Active Member
Licensed User
Longtime User
in new version of this lib some errors has been resolved...
plaese update this lib...tnx
 

warwound

Expert
Licensed User
Longtime User
in new version of this lib some errors has been resolved...
plaese update this lib...tnx

What bugs have been fixed?

I'm busy for a while, working and then moving address next week, so don't have time to update the library yet.
 

Pedro Caldeira

Active Member
Licensed User
Longtime User
Great Work.
Is it possible, to have some kind of interactive ccontrols in the panoview ?
To create a VR application, like hovering buttons that select when looking at them, etc ?
 

hcm

Member
Licensed User
Longtime User
Hi Warwound, thanks again for this great lib!
I tested the head tracking method and found it very helpful for my applications. Do you think it would be possible to make a small GetHeadRotation (YawAndPitch() As Float) library without the VR image routines?
Best regards
 

ELCHARO

Member
Licensed User
Longtime User
Nice project!!

A question : if posible to see live videos, from mono sources, like dji api. In this case can fligth my drone with VR googles.

Thanks warwound.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…