System Informations
1 - Generation
1.1 - Latent system
System needs time to generate a "fake screen" that can be shattered. You can use "Generate" function from actor component to start generate one, or use "Auto Generate" flag to ask system to generate automatically a “fake screen” as soon as possible (when there is not one already generated). |
1.2 - Getters
Getters used to know if there is a generated fake screen or if one is generating. |
2 - Dispatchers
You have access to multiple dispatchers helping you when the system does something.
On Generated: Fires when a fake screen has been generated.
On Start Generating: Fires when a fake screen start generating.
On Scene Captured: Fires when the scene (screen) has been captured (to be used on the fake screen).
On Shatterer Destroyed: Fires when the manager of the effect is destroyed.
3 - Mobile support
/!\ Mobile is supported but since it uses Scene Capture, you need to enable Vulkan support and make sure to tick the “Mobile” flag in Management/Generation.
You can check "Mobile" flag to activate mobile renderer (saves performances).
How to Use
1 - Generate
You have to generate the effect first before triggering it (taking a bit of time, more screen slices you want, more time it will take). Let’s see our options :
1.1 - Auto generate flag Activated by default, the system makes sure to generate the effect as soon as possible. You don’t have to manage it manually. |
1.2 - Generate function If you want to manually manage generation, you can disable Auto generate and call this function. Note : Function is aborted if there is already one generating, but will generate another if one is already generated. You can handle multiple generated ones at same time with help of “On Generated” dispatcher. |
2 - On Generated
Okay, the system takes his time to generate, but how can I know when it’s ready ? Answer is “On Generated” dispatcher that will trigger when the effect is generated. On top of that, this dispatcher returns a reference to the actor in charge of generating the effect, which could be useful.
3 - Shatter Screen
Here we go, the effect is ready, we finally can shatter our screen ! Yeahh
So to do that, you’ll need to call the “Shatter Screen” function which requires 2 data :
3.1 - Location
This is the position at which the effect will occur, in the case of the trailer, this is the position at which the “fight view camera” is positioned. |
3.2 - Rotation
This is the rotation at which the effect will occur, in the case of the trailer, it's the same rotation as the “fight view camera” one. |
4 - On Shatterer Destroyed
This dispatcher triggers when the actor in charge of generating the effect is destroyed (happens when the effect is over, if configured that way in the parameters). Returns a reference of it, may be useful, but take care, this reference is only valid at the tick this dispatcher has triggered, one tick later and the reference will be invalid. For the demo, I'm simply changing the target view to the “fight view camera”.
5 - On Scene Captured
This dispatcher is triggered when the effect starts. Returns a reference to the texture (render target texture) used to give the illusion that the screen is shattering. May be useful to have a reference to this texture for purpose.
6 - On Start Generating
This dispatcher is triggered when a new “fake screen” starts generating. Returns a reference to the previous one generated, if any. Else return is invalid.
Parameters
1 - Generation
1.1 - Auto Generate If "auto generate" is checked, a randomly shattered "fake screen" will be generated automatically. As soon as one "fake screen" is used, another one will start generating automatically. If "auto generate" is unchecked, you will need to call the "Generate" function to manually generate a "fake screen". |
1.2 - Screen Shatter Spawn Position Position at which the "fake screen" is generated (it is best to use a distant position where there is nothing that can interfere with the linetraces by channel). |
1.3 - Use Preset If "Use Preset" is checked, system uses predefined values based on the selected preset in the integer variable "Preset". If "Use Preset" is unchecked, system uses easily customizable values in the categories just below. |
1.4 - Preset Selection of multiple presets enabling quick utilization of the system. |
2 - Slice
2.1 - Number of Screen Slices The number of randomly generated slices on the "fake screen". |
2.2 - Can Miss Slice Trace Hits
If the value of "Screen Box Extent Multiplicator" is greater than 1, it is possible that some linetraces may not hit (explained in the image above with value of 1.25). When "Can Miss Slice Trace Hits" is checked, linetraces that do not hit will not be retried. Conversely, if "Can Miss Slice Trace Hits" is unchecked, linetraces that do not hit will be automatically retried. |
2.3 - Screen Box Extent Multiplicator Screen box extent multiplier (exemples above), which allows weighting the randomness to obtain slightly different results. The higher the value, the greater the chance of the trace failing. The value cannot be smaller than 1. |
3 - Screen Effects - Shine and Scale
3.1 - Enable Shine Effect
If "Enable Shine Effect" is checked, the shine effect will be applied immediately after the light cracks on all the pieces of the "fake screen" (example above). If "Enable Shine Effect" is unchecked, the shine effect will be ignored. |
3.2 - Use Same Facing Shine for All Pieces
If "Use Same Facing Shine For All Pieces" is checked, the shine effect will have the same orientation (based on your settings) on all parts of the "fake screen" (example above). If "Use Same Facing Shine For All Pieces" is unchecked, the shine effect will have a different rotation (based on your settings) on each part of the "fake screen". |
3.3 - Shine Appearing Duration Total duration of the shine effect appearance. The effect randomly appears on each part of the "fake screen," one by one, in a way that ensures the effect has appeared on all parts at the end of the process. |
3.4 - Shine Fade Out Duration Total duration of the shine effect disappearance. The shine effect fades out simultaneously on all parts of the "fake screen" during the process. |
3.5 - Reflection Angle Min & Max A random angle (0-1) will be chosen from these 2 values for each shine effect, for each (or all) pieces (depending on the state of "Use Same Facing Shine For All Pieces") of the "fake screen". |
3.6 - Initial Screen Pieces Scale The size of each piece of the "fake screen" when the effect is triggered. Typically, the appropriate value is 1 or very close to 1, but feel free to modify it. |
4 - Screen Effects - Cracks
4.1 - Enable Cracks Effect If "Enable Cracks Effect" is checked, the light cracks effect will be applied when the screen shatter effect is triggered. If "Enable Cracks Effect" is unchecked, the light cracks effect will be ignored. |
4.2 - Delay Before Launch Next Effect Duration of the light cracks effect or delay before the next effect triggers. |
5 - Screen Effects - Screen Destroy
5.1 - Enable Screen Destroy If "Enable Screen Destroy" is checked, the actor of the "fake screen" will be removed after a predefined delay. If "Enable Screen Destroy" is unchecked, the actor of the "fake screen" will remain indefinitely. Generally, it is better to remove it once the effect is finished (thus after a delay). |
5.2 - Enable Screen Fade Out Effect Delay after which the actor of the "fake screen" will be removed (the delay starts upon triggering the "explosion" of the "fake screen"). |
5.3 - Delay Before Destroy If "Enable Screen Fade Out Effect" is checked, the pieces of the "fake screen" will fade out after a predefined delay. The actor of the "fake screen" will be automatically destroyed after the fade out. If "Enable Screen Fade Out Effect" is unchecked, the actor of the "fake screen" will be removed instead. In both cases, "Enable Screen Destroy" must be checked for this to trigger. |
5.4 - Screen Pieces Fade Out Duration Total duration of the pieces of the "fake screen" disappearance. |
6 - Screen Effects - Background
6.1 - Show Background If "Show Background" is checked, a background of the chosen color will be displayed. |
6.2 - Background Color The color of the background. |
6.3 - Enable Background Fade Out Effect If "Enable Background Fade Out Effect" is checked, the background will fade out after a delay (the delay starts when the screen "explodes"). If "Enable Background Fade Out Effect" is unchecked, the background will remain visible until the actor of the "fake screen" is destroyed. |
6.4 - Delay Before Background Fade Out The delay before the background starts to fade out. |
6.5 - Background Fade Out Duration The total duration of the background fade out. |
7 - Physics - Custom Gravity
7.1 - Enable Custom Gravity If "Enable Custom Gravity" is checked, gravity will be applied to each piece of the "fake screen" based on the value entered in "Custom Gravity Force". If "Enable Custom Gravity" is unchecked, no gravity will be applied to the pieces of the "fake screen". |
7.2 - Custom Gravity Force The force applied to each piece of the "fake screen" (gravity). |
7.3 - Physical Gravity Force If "Physical Gravity Force" is checked, the force specified in "Custom Gravity Force" will not be considered. Instead, the applied force will be based on the physical properties of the pieces of the "fake screen". Most of the time, it is recommended to leave this option unchecked, but feel free to use it if desired. |
8 - Physics - Directional Impulses
8.1 - Use Point Directional Impulse If "Use Point Directional Impulse" is checked, the pieces of the "fake screen" will be projected with a random strength (based on the values specified in the "Directional Impulse Min and Max" variables) towards the center/bottom of the "fake screen," creating an explosion effect. You are free to modify the epicenter in the BP_ScreenShatterer. If "Use Point Directional Impulse" is unchecked, the pieces of the "fake screen" will be projected in a random direction and with a random strength (based on the values specified in the "Directional Impulse Min and Max" variables). |
8.2 - Directional Impulse Min & Max The minimum and maximum values used for the strength (and direction if "Use Point Directional Impulse" is unchecked) of the directional impulse. |
8.3 - Angular Impulse Min & Max The minimum and maximum values used for the strength of the angular impulse. |
9 - Physics - Damping
9.1 - Linear Damping Linear damping helps reduce the linear movements of the "fake screen" by applying a force that pulls in the opposite direction of the linear motion. |
9.2 - Angular Damping Angular damping helps reduce the angular movements of the "fake screen" by applying a force that pulls in the opposite direction of the angular motion. |
10 - Audio
10.1 - Screen Cracks Sound The sound played when the light cracks effect appears. |
10.2 - Screen Explosion Sound The sound played when the "fake screen" shatters. |