- Home /
Fading groups of objects to black
Hello,
I'm attempting to replicate the KO effect from Kirby 64, where every object besides the player object fades to black over the course of a second of so. Take a look here.
I could iterate through every object in the scene and adjust the colors on the materials, but this seems like a fragile approach. Would it be possible to use a shader instead? Perhaps a screen shader?
I appreciate your advice. Thank you!
One approach would be to set $$anonymous$$irby's render layer to the top, everything else to the bottom (might be able to have it set that anyway depending on your needs) and slip a black world space UI image between them and fade it in.
Answer by Ashokkumar-M · Jul 03, 2017 at 04:42 AM
You can achieve it by instantiating a black image/quad covering the whole screen, then layer it just behind the player but before all other objects and change its colour from transparent to black in its material/spriterenderer so that you will get the effect you wish to get. In this way you are going to fade only one object.Since it is going to be completely black you can use a tiny image of 64X64 size so it will be more efficient. @ayarger