Full screen fade-through-white

Any suggestions about how to implement a full screen fade-through-white transition? Ie, the player is looking at something, there is a brief fade through white, then they are in a new position/scene/level etc

I was thinking have a full screen quad that is coloured white, then lerp it’s alpha from 0->1->0 quickly. Is that an alright method?

The other question is, if I want to change what the player is looking at during the transition (duh, it’s a transition :stuck_out_tongue:) -how would I do this?

Would I have to fade alpha 0->1,
then use the del command to remove all the objects from the first scene,
then load the new objects into panda3D
then fade alpha 1->0?

That sounds really messy to me, does panda have another way to do this? Thanks for any suggestions.

I use a fullscreen quad, and fade it in +out using an interval. I put that interval in a sequence and add Func(replaceObjects) there, where replaceObjects is a function that does removeNode, lookAt, whatever.

Thanks pro-rsoft

You can also use this:

from direct.showbase.Transitions import Transitions

self.transition = Transitions(loader)
transition.setFadeColor(1,1,1)
transition.fadeIn(durationInseconds)
1 Like

Woah, thanks, I didn’t know that.

wow thanks vardis, yet another gleam of valuable knowledge for me to keep ready… :wink: