-
Notifications
You must be signed in to change notification settings - Fork 3
Using transition effects between scenes
In addition to sprite and background animations, Visual Renderer supports transition animations - special effects that are activated during change of scenes. At the moment, transition animation only affects background of the scene. This tutorial will explain how to use and create them.
All transition effects are UI materials. These materials are free from restrictions and can use whatever is applicable for material of User Interface Domain. VisualU provides material parameter node designated specifically for transition materials. ME_TransitionParameter2D
is a texture 2D parameter node that represents either first (currently rendered) texture or second (that will be rendered after transition) texture. Current representation can be altered by checking bIsSecondTransition
in the node details tab. Use the transition parameter node together with other parameters to create animation-driven transition material. Here is the example:
'Blending' is the scalar parameter that represents current state of animation: [0, 1]
Visual Renderer uses special widget animation named Transition
to represent the state of the transition between scenes. Animation can be configured in Visual Settings.
Scenario has structure called FBackground
for the background flipbook itself and the transition material. Scenario with transition material has the first, or starting background in the transition, while the next scenario doesn't need a transition material to be transitioned to.
Visual controller will request transitions automatically when two conditions are met: bPlayTransitions
is set to true, and scenario from which transition should start has valid transition material set. Note that bPlayTransitions
is set to false during fast move mode.
That's it! Code above is sufficient and doesn't require any cleanup or reset