Myjestic Posted May 11, 2016 Share Posted May 11, 2016 Hi all, is there a simple method fading in and out the whole scenery except using fog? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted May 11, 2016 Share Posted May 11, 2016 Hi, you can use mesh..visibility = value; to fade meshes. value ranges from 0 to 1, e.g. 0.5 is 50% faded. PG: http://www.babylonjs-playground.com/#DE1FX#1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 11, 2016 Share Posted May 11, 2016 Hiya @Myjestic... hi aWeirdo. How about using a plane to block the camera view, and then using that same method on it? *shrug* As it goes invisible, entire scene becomes visible. I think a Babylon Layer can do it too, with a texture and varying transparency. gryff 1 Quote Link to comment Share on other sites More sharing options...
davrous Posted May 12, 2016 Share Posted May 12, 2016 Have a look to what we've done with the Sponza démo: http://www.babylonjs.com/demos/sponza We're fading to back in/out using a Post-processing effect. This is the best and performant way to do it. David aWeirdo, NasimiAsl, sjain38 and 1 other 4 Quote Link to comment Share on other sites More sharing options...
cartman Posted May 15, 2016 Share Posted May 15, 2016 @davrous can you elaborate a little on this Post processing effect? I looked at https://doc.babylonjs.com/tutorials/How_to_use_PostProcesses, but it seems complicated for beginners like me. How would the function look like, via a Playground demo? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 15, 2016 Share Posted May 15, 2016 Hey! here is an example: http://www.babylonjs-playground.com/#2FGYE8#0 Wingnut, aWeirdo, dbawel and 1 other 4 Quote Link to comment Share on other sites More sharing options...
dbawel Posted May 15, 2016 Share Posted May 15, 2016 I love the pixel shader @Deltakosh shows in the playground. However, if you don't want to use a post process, then of course changing the light intensity will do the job - providing you aren't using any self illuminating properties such as an emmisive texture. Also @davrous - love the music, and was hoping it was all MIDI. But even as an MP3, it's preety cool. If you gentlemen have time, do you mind adding a VR camera to the scene in the Oculus format? I know this would be helpful to allot of users such as me who are developing for an array of devices including the Gear VR. I'm always interested in looking at how you two would personally impliment this into your scene - especially if you identify the user's OS as Anroid and a resolution of 2550 in the horizontal X - which is how I identify the Gear VR since both the S6 and S7 are uniquely Android with a 2550X res. DB davrous and Nabroski 2 Quote Link to comment Share on other sites More sharing options...
Myjestic Posted August 5, 2016 Author Share Posted August 5, 2016 Hi, Deltakoshs example works perfect, but there is one more question. How can I make the fade indepentend from actual FPS. I want to fadein or out in 5 seconds? Quote Link to comment Share on other sites More sharing options...
adam Posted August 5, 2016 Share Posted August 5, 2016 http://www.babylonjs-playground.com/#2FGYE8#2 Myjestic, jerome and Temechon 3 Quote Link to comment Share on other sites More sharing options...
Myjestic Posted August 5, 2016 Author Share Posted August 5, 2016 Great adam. Thank you! Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 5, 2016 Share Posted August 5, 2016 just in case someone need something simple i leave it herehttp://www.babylonjs-playground.com/#UOZRH#1http://www.babylonjs-playground.com/#UOZRH#2 fixed:http://www.babylonjs-playground.com/#UOZRH#4 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.