Skybox removed after loading model in v4.x but not in v5 alpha

That would be my guess also, but it was fine earlier… I’ve not been supplied a new 3D model for the project since Friday.

Will try a different model.

Not sure… Will ask the 3D designer to check the model… But threejs displays it without issue:
https://aftc.io/test2/

I stripped it down to just the camera and loading the model, same result…

I will ask the 3D designer to supply me with another test model (cube with text on it)

@Evgeni_Popov could you think of smthg changing about the z fighting here ? Babylon DEV

Your camera is setup wrong
image

You have z fighting cause the near plane is defined way to close to the camera and the range is huge.

You should try placing the near plane at 0.01 and far plane at 100 which should be enough for your scene.

1 Like

Ah ha!.. Damn… It’s always the smallest of things…

Thanks for your help on this guys :heart: :heart: :heart:

1 Like

I ran a quick test on android once adding:

let hdrTexture1 = new BABYLON.HDRCubeTexture("./assets/textures/venice_sunset_1k.hdr", this.scene, 512, false, true, false, true);
let currentSkybox = this.scene.createDefaultSkybox(hdrTexture1, true);

Result:
Android - Google Pixel 5 - White screen 3 to 5fps
iPhone - ??? - Works ok

I do not see why this would not work on android. Could you provide a repro in the playground ?

If it is related to the skybox, creating the skybox there should be enough to crash your device.

Also I would say using an env texture might be way faster: Using An HDR Environment For PBR | Babylon.js Documentation

I try to avoid using the playground as it ignores too much of what is around the setup and never quite behaves the same as when used in a project.

Code can be reviewed at:

If I comment out line 116, all is fine.

Test is at:
https://aftc.io/test/

Kills my Google Pixel 5 (chrome), works on desktops and iphones, tested on iPhone 12 Pro v14.2 safari on browserstack.

the thing is if every question was having a different project and setup, it would be impossible for the community to efficiently help, troubleshoot… We can not install and run locally one project per question.

In your case, try using a .env file instead for the texture?

Worked…

How do you generate env files?
or convert hdr to env?

2 Likes

Here’s the babylon playground tests for you…

HDR fails with unable to create uniform buffer

https://playground.babylonjs.com/#E0EDQH#14

direct urls for each test outside of playground links are in the playground source code.

This is so weird it would fail with this error. @Cedric do you have an android device you could look on ?

I tested it on my google pixel 5 and it errors, but my co-worker uses an iphone who tested on his and it works. I also tried a few devices on browserstack and its fine on iphones, not on android.

Same here on my Android device:
image

Ohhhhhh How can that happen :expressionless: @Cedric can you have a look into it ? please ping me if you want to do a quick remote debug :slight_smile:

Maybe @Evgeni_Popov would have an idea ?

I’m adding this bug on my bugs list. Might take a look tomorrow or Friday.

1 Like

Thanks a lot !!!