In my current project, the user has the ability to move from one predefined position to another with the use of navigation buttons.
Once the button is clicked, the whole screen fades to black, the camera gets moved to the new position and the screen fades back in.
Right now I am doing this using a DIV overlay and CSS transitions. Unfortunately, that doesn’t work when using VR. My best idea for an alternative would be using a custom post process, but I wanted to see if there is a simpler solution that I’m missing.
Unfortunately changing clearColor and light doesn’t work for me, since I have meshes with an emissive color and then things get kinda weird: https://www.babylonjs-playground.com/#1AP18W#19
Since my project is pretty big already, I didn’t want to add GUI as well, but that’s a really clever idea!
I ended up adding the pixelFade to my post processes with a minor change:
In the end, it’s always a quad with an alpha texture drawn on top of your scene. There’s is no “better” way, since it will always cost a full screen overdraw.
If you are using PBR, then animating the property scene.pbrIntensity, I think that is the name, every mesh will darken evenly. You would also need to do the same for any lights. I have not been using lights with PBR so far.
In the end, it’s always a quad with an alpha texture drawn on top of your scene. There’s is no “better” way, since it will always cost a full screen overdraw. 9AppsVidMate