Jump to content

Cannot open in VR


brianzinn
 Share

Recommended Posts

Hi,

I have been working on a "remix mesh mashup"; A Remix3d.com mashup that worked more how I would like completely in VR as follows:
1. Show model download progress (that moving "L" piece doesn't show progress).  Frustrating for big models on slow internet.
2. Wanted to be able to click the list of models (and search) from within VR to show right away in 3D - resized to a consistent dimension.
3. Wanted to be able to walk around the models with controller teleportation.  Remix3d has no direct way (you can download, open in Paint3D or open in Mixed Reality (PC camera)).

So, I managed to get a working version, but it fails when entering VR mode - looks like the GUI are not being correctly restored after the canvas is lost.  As a wild guess, I think array buffers pointing to old context.  I have a PG and my actual demo both failing in WinMR and GearVR:
https://www.babylonjs-playground.com/#0JMGVC#11
https://brianzinn.github.io/create-react-app-babylonjs/meshMashup

I would have posted as a bug, but I have a feeling I have done something wrong, as the PG was working up till near the latest version.  Can you see why this would not load in VR?

Thanks.

edit: I have tried alpha.15 and all beta versions.  differing results somewhat, but none are working.
edit2: WinMR Microsoft Edge 42.17134.1.0.  GearVr on Samsung Internet latest version.

Link to comment
Share on other sites

If it's helpful in narrowing down the issue, the earlier PGs do, in fact, load correctly in VR.  This would lead me to believe that AdvancedDynamicTexture is somewhere the culprit [don't quote me on that ;P], as if I recall correctly, it does work with 1 ADT.  Let me  know if I can help at all or do any testing.  Cheers.

Link to comment
Share on other sites

@brianzinn https://www.babylonjs-playground.com/#0JMGVC#11 works for me. When I tried https://brianzinn.github.io/create-react-app-babylonjs/meshMashup, it did not work and from looking at the console error it looks like it comes from this line in vrExperienceHelper 

(mesh.name.indexOf("gazeTracker") === -1

which is used when when doing something related to the ray casting. mesh's name is not nullable so perhaps one of the mesh initializations in your code does not provide a name (are you writing in js or ts as I would expect a warning/error in ts). If somehow this is a valid use case I could also rework the helper logic to treat it as nullable.

Also from playing around with the project (very cool by the way :) ) I noticed the gui keyboard depth doesn't always work as expected (occlusion not working properly), is this intended? Otherwise it might be a bug in how the gui is using the renderLayer.

Link to comment
Share on other sites

14 minutes ago, trevordev said:

are you writing in js or ts as I would expect a warning/error in ts

I am writing in neither, it's a declarative markup:

<VRExperience createDeviceOrientationCamera={false} teleportEnvironmentGround={true} enableInteractions={true} />

The markup is using code written in TypeScript that has no warnings.  I will investigate that further, as I don't recall having any warnings, but I may have done an update since.  Thanks for your help.

Link to comment
Share on other sites

@brianzinn if I run

BABYLON.Engine.LastCreatedScene.meshes.forEach((m)=>{m.name = ""})

in the console on https://brianzinn.github.io/create-react-app-babylonjs/meshMashup before entering vr it works for me.

 

Also to get rendering to work on the webpage while in vr, when creating the engine do it with preserve stencil buffer eg. 

var engine = new BABYLON.Engine(canvas, true, { stencil: true, disableWebGL2Support: false, preserveDrawingBuffer: true })

 

Link to comment
Share on other sites

@trevordev Thanks for troubleshooting the website.  I should not have brought that up as it was just a secondary place where it was failing!  Let's please just try to get the PG working and forget the website :) 

Here is what I see in the PG:
image.thumb.png.a4d0f7dae9e4f1a71800e8868c972db2.png

 

Here are the WEBGL Errors:
image.thumb.png.d1827e691d4cae86158621182453cd7d.png

 

I'm not getting stack traces or anything, just errors.  So, we are using the same version of Edge.  I have a less capable video card surely, but I have never had any issues before.  I have an NVidia GTX 1050, which is bottom for capabilities of WinMR.  Are you saying that the PG is working for you without any changes?

Edited by brianzinn
formatting
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...