Jump to content

Any examples for VR with barrel distortion?


ozRocker
 Share

Recommended Posts

Thanks for showing us that, JcP.

 

Any news, OzR? 

 

Just to bump things, OzRocker has brought us two issues that could use solutions.

 

1.  No billboard mode for webVRCams (found when trying to use a billboarded light gizmo mesh to keep the light Y-aimed in the same direction as the cam).

 

2.  No easy way to activate an adjustable-width gap between the right/left eye areas.  http://www.babylonjs-playground.com/#1JSXHW#10  In this demo, we can see that line 42 (metrics.lensSeparationDistance) has widened the VIEW inside-of the left/right "ocular areas", but it does not separate the two ocular areas with black space.  (open some nose-bridge space).  I haven't looked at the shader(s), yet.  I'm a little scared to.  :)

 

Regarding #1... here is a new demo, OzR.  http://www.babylonjs-playground.com/#1JSXHW#11 .  (I think the gizmo is sitting under the camera, here, but still 30% visible.)

 

I have turned-off billboard mode, and used a simple camera.rotation.y copy-to-gizmo in the render loop.  It seems to work just fine.  I think you will need to use this solution until we determine if billboard mode will ever be activated for webVRcams.

 

Regarding #2 - I'm still working on it.  I/we could use advice from everyone.  :)  (nooo, not advice like rocking back and forth on the toilet - sheesh, heh)

 

To remind, I believe OzR is seeking adjustable "black space" between the left and right viewing areas.

 

Thanks again for your input, JcP.  That got us some good leads.

Link to comment
Share on other sites

There is one other way in combination with changing the VRCameraMetrics.  Kind of radical. Fork Camera & change the size & location of the 2 viewports for the cameras of this rig uses.  This would do it for sure, but you would probably need to change the VRCameraMetrics to compensate for side effects.

 

BTW, I thought the renaming of this rig away from Oculus was because there was some standard way to handle this VR / AR devices.  Shouldn't you be getting the VRCameraMetrics from the dev manufacturer, Google?

Link to comment
Share on other sites

Wow, thanks JcP!  Well done.

http://www.babylonjs-playground.com/#1JSXHW#14

 

Lines 77-78 spread the viewports apart, and there we go.  Perfect!  (after adding a scene.clearColor)  :)  yay!

 

Sorry for all the learning debris in there.  Lap it up, folks, it's all nutritious stuff.  :)

 

Addenda:  Jeff... umm... I just glanced at things, but maybe when camera._vrEnabled = true... THEN it looks to the device for camera metrics.  Maybe I am currently working in a "preview" mode, and maybe that's why it is using local preset metrics.  But that is a pure GUESS on my part.

Link to comment
Share on other sites

Cool! Those were a couple of good challenges, OzR... I enjoyed the chase.

 

Hmm... http://www.babylonjs-playground.com/#1JSXHW#14 has gone broken, too (ff).  I see someone's toolbox open behind the Playground, so I think some mad scientist work is going-on.

 

Ozr, how is your height-to-width ratio (aspect ratio)? 

 

I noticed that the "shape" of the eyepieces seen on your rotating box... don't match the Babylon VR cam viewport-shape very well.  For example, when I made the gap for the nose area... I noticed that the edges adjacent to the nose area... were quite vertically-flat.  The pictures you have on your rotating box... show shapes that have a gentle curve on all sides.  *shrug*

 

Do you think you could ever put a "button panel" on some wall of your 4-way website... where VR users could make adjustments to camera metrics values, and maybe let the user adjust nose-bridge width via that wall-menu?

 

Maybe those 4 directions, should be 4 doors... and off we go exploring!  If you allowed 8 directions in each cylinder-room, then we're starting to get Zork-like.  Yeah!  8 doors... some marked normally, and some marked "Danger".  :o   Hundreds of 8-door rooms, all connected together by doors, all generated by OzRocker's new 8-door room generator!  Maybe 8 buttons around a compass flower up in the corner... for turning?  Wow!  Might need BIG buttons in that environment, though.

 

*shrug*  Just thinkin', feel free to ignore me.  :)

Link to comment
Share on other sites

oh yeh, I see what you mean.  The gap for the bridge ended up flattening out the barrel distortion on those edges.

 

Google cardboard V2 and all variations now has a conductive button so it would be cool to have a VR website that uses it.  I like your idea of rooms leading into other rooms.  That sounds like a good way to map out a website hierarchy.  Also means I could lazy-load each room (as a separate Babylon.js scene) if I wanted complex rooms.  The biggest obstacle in making 3D websites more commonplace is loading times.  When people see a progress bar they will bounce.  It would be cool if everything got loaded gradually, like wireframe meshes, low quality-texture, then high quality-texture so its instantly functional and the quality increases as its loading.

Link to comment
Share on other sites

 

The gap for the bridge ended up flattening out the barrel distortion on those edges.

Oh, you said that SO much easier than I.  hehe.  Yes, exactly!

 

Loading... yeah... that's trouble.  We have something laying around here... called incremental loading.  I don't know much about it, and even if you DID use it, it MIGHT add so much OVERALL load-time... that the user-pleasure gained short-term... would be lost again long-term.

 

Maybe the answer... is in the AssetsManager (the loading progress device).  Maybe we need a way to entertain the users during loading... a bit more than an orbiting progress meter.  One railroad simulator I have... does a slide show of still pics.  I've seen other games play a video during scene loads.  Sometimes slideshows with text captions that are hilarious.  Anything to entertain the users while the load is happening.

 

Putting-up a low-budget animated gif... like the famous blue balls gif... can keep users busy while big things load, too.

 

Maybe if you get really good-at it, people will visit your site simply to see your "Progress Meter Shows".  :)  A random "comic book story" (progress meter story) with every visit to www.punkoffice.com.

 

:)  or not.  :)  But, hmm.  Yeah, progress meter entertainment is a whole new area of pondering, huh?  Or not.  hah

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...