Skip to main content

Post Processing Solution

Summary

This sample demonstrates how to implement and control post-processing effects in Scene Composer using scripts. It enables toggling effects on and off at runtime and allows property adjustments through UI controls like toggle buttons and sliders.

 

Purpose

The goal of this sample is to showcase the simplicity and flexibility of applying post-processing featureeffects is simple to use and can be easily applied withvia scripts. ThisIt sampleprovides showsa practical example of how to useenable/disable multiple effects at runtime and combineanimate themtheir inproperties Sceneinteractively Composerusing andUI en-/disable them at runtime.elements.

Description

The most important nodes of the sample are cameras in the 3D and 2DFX scenes. These cameras have post-processing scripts attached. They are taken from the Construction Kit as Script Components. When the sample is started in the Player, the scripting system for the Player has to be enabled. Then, the buttons of the 2D scene allow to switch between 3D and 2D scenes and to enable or disable each effect. To approach this behavior, additional scripts have been added to the solution. In general it works in the way that the camera has a further script attached that stores its ID in a global table. Other scripts (attached to other nodes) access this table to be able to enable the post-processing scripts. The cubes also have scripts attached, that control the rotation of the cubes and their color or opacity. For a more detailed description of what the scripts do please refer to the comments in the scripts themselves.

drawing-7-1695261727.png

Example of post-processing a 2D scene

drawing-7-1695261791.png

Example of post-processing a 3D scene

The script system of the Player can be started by typing "start script" into the Player's command window or by enabling Player > Scripting System in the CGI Panel's menu bar.
To stop the script system type "stop script" or by enabling Player > Scripting System in the CGI Panel's menu bar or by disabling Player > Scripting System in the CGI Panel's menu bar.

drawing-5-1734081139.png
drawing-7-1734332559.png