I created a fake light bloom effect if facing a particular direction:
I tried doing all of what I have above with an photoDome but couldn’t make it glow so I used a sphere mesh with a sky texture.
How can I make the sphere have infinite distance like a photoDome? (ideally, without needing to keep moving the sphere) I don’t want the player to be able to walk to the edge.
Or how can I do the same thing with an actual photoDome/skybox and make it glow?
I’m trying to do something like this:
If you have any other ideas how to improve it please let me know.
You can set the sphere position to be equal to the camera position: that way, it will “follow” the camera wherever it goes:
Small caveat: glTF files are left handed, so you need to negate the x coordinate of the camera before setting it to the sphere.
Thanks! I need a giant sphere because there may be far away objects that need to be within the scene.
How would I handle clipping? For example, if my camera.maxZ = 100, but I need the sphere beyond that.
I tried setting a larger bounding box but it didn’t work:
sphere.setBoundingInfo(new BABYLON.BoundingInfo(new BABYLON.Vector3(-1000, -1000, -1000), new BABYLON.Vector3(1000, 1000, 1000)));
Here’s a solution in case anyone is trying to do the same thing.
I put the sphere on renderingGroupId = 0 and everything else on renderingGroupId = 1.
Then the sphere can be any size smaller than clipping distance. Other meshes can extend beyond the sphere and still be visible: