Projected Ground Skybox

Checking in on this one. Any progress on integration?

@sebavan is on vacation at the moment, but I’m pretty sure this is still on his radar. He will be back later in this month. Thanks for being patient. :slight_smile:

2 Likes

I’ve been playing around with this and got it working as in the example code above.

However, I’m hoping to get it working with Blockade Equirectangular images Sample here.
Which i create like so: const texture = new BABYLON.Texture(url)

The key line seems to be shaderMaterial.setTexture( "uEnvMap", environmentTexture ); Which takes in a BABYLON.CubeTexture.CreateFromPrefilteredData created from a .env file. And then the shader does some magic with it.

Any suggestions for how to get it working without the .env format? Or is that a shader re-work?


here it is working in my game environment:
there are a couple of other issues as well - like objects that are partially submerged in the ground (like the blue truck) are fully visible. Haven’t played with trying to fix that yet - although wonder if it’s possible given the projection?

Yup I am exactly working on this with blockade support as well :slight_smile:

About blockade, it is harder and requires some shader changes to support without converting to .env. I am still debating if we should support all the cases.

finally getting shadows in the same draw call.
image

It is getting closer from being pushed in

5 Likes

It sounds great @sebavan , the performance of the original one was ok for PC but really laggy on a smartphone (even on a mid-high end device).

1 Like

Looking forward to this!

Is there a branch I can track progress?

Nope but I hope to make the PR today

PR is up Add ground projection support by sebavan · Pull Request #14470 · BabylonJS/Babylon.js · GitHub

1 Like

Once merged, you ll be able to test on Babylon.js Playground and read the doc at Skyboxes | Babylon.js Documentation

4 Likes

Thanks @sebavan for getting it into core :smile:

2 Likes