CREATE YOUR WORLD
World Environment
Applying Post-Processing on ZEPETO World
7min
if you want to enhance your world with visual effects or improve its overall graphic quality, try using unity’s post processing feature by adding various effects, you can increase immersion and create a more polished experience getting started with post processing install the post processing package in unity, go to window > package manager set the packages option to unity registry , then search for and install the post processing package duplicate the zepetocamera prefab in the project folder, go to packages > zepeto character controller > runtime > resources > camera find the zepetocamera prefab, copy it, and paste it into the assets folder then rename the duplicated prefab to zepetocameracopy link zepetocameracopy in the hierarchy, select managers > zepetoplayers in the inspector, drag and drop the duplicated zepetocameracopy into the prefab field create a new layer in the inspector of zepetocameracopy, click layer > add layer to create a new layer then assign this new layer in the layer field 📘 note you can only use layer 3 and layer 6 or higher layer 0 to 2 and layer 4 to 5 are default unity layers and cannot be modified applying post processing there are two main ways to apply post processing global applies effects to the entire world local applies effects only when the player enters a specific area global application add post process layer and post process volume to zepetocameracopy in the inspector, click add component to add both post process layer and post process volume components in post process layer, set volume blending > layer to the new layer you created then in post process volume, check the is global option in the profile field, assign a post process profile that includes the effects you want if you don’t have a profile yet, click the new button next to the profile field to create one add effects to the post process profile if you created a new profile, select it and click the add effect button choose the effects you want and adjust their settings to create the desired look to edit a value, you must first check the box to the left of the field ✏️ tip effects can be modified even during play mode, and the changes will be saved after exiting play mode try adjusting the settings in the inspector while the scene is running to see the results in real time and fine tune your effects \<effect examples> local application add a post process layer to zepetocameracopy in the inspector of zepetocameracopy, add a post process layer click the this button to set the trigger, and assign the new layer to the layer field create a post process volume object in the hierarchy, click + > 3d object > post process volume to create a new volume object assign the new layer to the post process volume’s layer field then, uncheck the is global option add effects to the post process volume click add effect to add the effects you want adjust their settings to achieve the desired result place the post process volume position the post process volume in the area where you want the effects to activate \<local application example> controlling post process volume via script you can also control the post process volume using a script below is an example using a toggle to turn the effect on and off create a new gameobject in the hierarchy, click + > create empty to create a new gameobject then, rename the object to postprocessmanager create a new toggle ui in the hierarchy, click + > ui > toggle to create a new toggle element create a new script in the project window, click + > zepeto > typescript to create a new script rename the script to postprocessscript , open it, and paste in the code below import { zepetoscriptbehaviour } from 'zepeto script'; import { gameobject } from 'unityengine'; import { postprocessvolume } from 'unityengine rendering postprocessing'; import { toggle } from 'unityengine ui'; export default class postprocessscript extends zepetoscriptbehaviour { public onofftoggle toggle; public postprocessobj gameobject; private postprosessvolume postprocessvolume; start() { this postprosessvolume = this postprocessobj getcomponent\<postprocessvolume>(); this onofftoggle onvaluechanged addlistener(()=>{ this postprosessvolume profile settings foreach( // toggles all settings in the current profile settings on or off (setting)=>{ setting active = !setting active; } ); }); } } add the script to postprocessmanager select postprocessmanager in the hierarchy in the inspector, click add component > zepeto script , and drag the postprocessscript into the script field then, in the hierarchy, drag the toggle into the on off toggle field, and drag the post process volume into the post process obj field \<example> now, when you press the toggle in the area where the post process volume is placed, you’ll see the post processing effect activate or deactivate