playMaker

Author Topic: URP Post Processing actions out of date/not working?  (Read 38428 times)

BenWesorick

  • Playmaker Newbie
  • *
  • Posts: 13
URP Post Processing actions out of date/not working?
« on: March 28, 2024, 10:02:52 PM »
I see post-processing actions for playmaker to adjust effects, but none of them seem to recognize my post-processing volumes. I'm currently using URP 2022.2.19. Are the current playmaker actions for adjusting post-processing out of date? Specifically, I'm trying to adjust the intensity of Chromatic Aberration and Lens Distortion in real-time.

Thanks!
« Last Edit: April 10, 2024, 09:22:43 PM by BenWesorick »

BenWesorick

  • Playmaker Newbie
  • *
  • Posts: 13
Re: URP Post Processing actions out of date/not working?
« Reply #1 on: April 10, 2024, 09:25:34 PM »
Bumping for visibility. Are others on here able to drag a Post Processing volume into the input field for actions such as Set Chromatic Aberration or Set Lens Distortion?

BenWesorick

  • Playmaker Newbie
  • *
  • Posts: 13
Re: URP Post Processing actions out of date/not working?
« Reply #2 on: June 27, 2025, 11:09:39 PM »
Bumping again. June of 2025, and I'm still wondering this as well. I tried importing the actions from Blackant Master Studio and got all sorts of bugs that cost me the last 4 hours while I tried to revert my project to a stable version.

Ardess95

  • Playmaker Newbie
  • *
  • Posts: 1
Re: URP Post Processing actions out of date/not working?
« Reply #3 on: July 04, 2025, 12:01:17 AM »
I see post-processing actions for playmaker to adjust effects, but none of them seem to recognize my post-processing volumes. I'm currently using URP 2022.2.19. Are the current playmaker actions for adjusting post-processing out of date? Specifically, I'm trying to adjust the intensity of Chromatic Aberration and Lens Distortion in real-time.

Thanks!
You're right to check—most of the existing PlayMaker post-processing actions were built for the legacy Post-Processing Stack v2 and are not fully compatible with URP's Volume system, especially in Unity 2022+.

In URP, Post-Processing is handled through the Volume framework, and many of the older actions don’t recognize or interact with the new system out of the box.

To control Chromatic Aberration or Lens Distortion in real-time, you’ll likely need to create custom PlayMaker actions or use a C# bridge script to manipulate the Volume components directly. Alternatively, some users have had success using Set Property or Invoke Method on the volume profile components, but it requires a bit of setup.
Let me know if you’d like a code snippet or example action—I’ve worked around this myself.
Hope this helps!

BenWesorick

  • Playmaker Newbie
  • *
  • Posts: 13
Re: URP Post Processing actions out of date/not working?
« Reply #4 on: July 17, 2025, 07:56:47 PM »
I've tried exposing volume profiles via the set property method a few times, but I can never seem to expose the post properties I'm trying to adjust. If you could post an example action whenever you have time, that would be amazing. Thanks!

BenWesorick

  • Playmaker Newbie
  • *
  • Posts: 13
Re: URP Post Processing actions out of date/not working?
« Reply #5 on: July 17, 2025, 09:09:14 PM »
It pains me to give anything related to AI props, but I asked chatGPT to write me actions to control post processing for Unity 6 and it actually gave me usable results.


ChromaticAberration
using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using HutongGames.PlayMaker;

[ActionCategory("PostProcessing")]
[HutongGames.PlayMaker.Tooltip("Sets the Chromatic Aberration intensity on a Global Volume.")]
public class SetChromaticAberration : FsmStateAction
{
    [RequiredField]
    [HutongGames.PlayMaker.Tooltip("The GameObject that has the Volume component.")]
    public FsmOwnerDefault volumeObject;

    [HutongGames.PlayMaker.Tooltip("The Chromatic Aberration intensity (0 to 1).")]
    [HasFloatSlider(0f, 1f)]
    public FsmFloat intensity;

    [HutongGames.PlayMaker.Tooltip("Set every frame?")]
    public bool everyFrame;

    private Volume volume;
    private ChromaticAberration chromaticAberration;

    public override void Reset()
    {
        volumeObject = null;
        intensity = 0f;
        everyFrame = false;
    }

    public override void OnEnter()
    {
        DoSetChromaticAberration();

        if (!everyFrame)
            Finish();
    }

    public override void OnUpdate()
    {
        DoSetChromaticAberration();
    }

    private void DoSetChromaticAberration()
    {
        GameObject go = Fsm.GetOwnerDefaultTarget(volumeObject);
        if (go == null)
            return;

        if (volume == null)
            volume = go.GetComponent<Volume>();

        if (volume == null || volume.profile == null)
            return;

        if (!volume.profile.TryGet(out chromaticAberration))
            return;

        chromaticAberration.intensity.value = intensity.Value;
    }
}

LensDistortion

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using HutongGames.PlayMaker;

[ActionCategory("PostProcessing")]
[HutongGames.PlayMaker.Tooltip("Sets the Lens Distortion intensity on a Global Volume.")]
public class SetLensDistortion : FsmStateAction
{
    [RequiredField]
    [HutongGames.PlayMaker.Tooltip("The GameObject that has the Volume component.")]
    public FsmOwnerDefault volumeObject;

    [HutongGames.PlayMaker.Tooltip("The Lens Distortion intensity (-1 to 1).")]
    [HasFloatSlider(-1f, 1f)]
    public FsmFloat intensity;

    [HutongGames.PlayMaker.Tooltip("Set every frame?")]
    public bool everyFrame;

    private Volume volume;
    private LensDistortion lensDistortion;

    public override void Reset()
    {
        volumeObject = null;
        intensity = 0f;
        everyFrame = false;
    }

    public override void OnEnter()
    {
        DoSetLensDistortion();

        if (!everyFrame)
            Finish();
    }

    public override void OnUpdate()
    {
        DoSetLensDistortion();
    }

    private void DoSetLensDistortion()
    {
        GameObject go = Fsm.GetOwnerDefaultTarget(volumeObject);
        if (go == null)
            return;

        if (volume == null)
            volume = go.GetComponent<Volume>();

        if (volume == null || volume.profile == null)
            return;

        if (!volume.profile.TryGet(out lensDistortion))
            return;

        lensDistortion.intensity.value = intensity.Value;
    }
}

Screen Space Lens Flare

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using HutongGames.PlayMaker;

[ActionCategory("PostProcessing")]
[HutongGames.PlayMaker.Tooltip("Sets the Screen Space Lens Flare intensity on a Global Volume.")]
public class SetScreenSpaceLensFlare : FsmStateAction
{
    [RequiredField]
    [HutongGames.PlayMaker.Tooltip("The GameObject that has the Volume component.")]
    public FsmOwnerDefault volumeObject;

    [HutongGames.PlayMaker.Tooltip("The Lens Flare intensity (0 to 1).")]
    [HasFloatSlider(0f, 1f)]
    public FsmFloat intensity;

    [HutongGames.PlayMaker.Tooltip("Set every frame?")]
    public bool everyFrame;

    private Volume volume;
    private ScreenSpaceLensFlare lensFlare;

    public override void Reset()
    {
        volumeObject = null;
        intensity = 0f;
        everyFrame = false;
    }

    public override void OnEnter()
    {
        DoSetLensFlare();

        if (!everyFrame)
            Finish();
    }

    public override void OnUpdate()
    {
        DoSetLensFlare();
    }

    private void DoSetLensFlare()
    {
        GameObject go = Fsm.GetOwnerDefaultTarget(volumeObject);
        if (go == null)
            return;

        if (volume == null)
            volume = go.GetComponent<Volume>();

        if (volume == null || volume.profile == null)
            return;

        if (!volume.profile.TryGet(out lensFlare))
            return;

        lensFlare.intensity.value = intensity.Value;
    }
}

DepthOfField

using UnityEngine;
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
using HutongGames.PlayMaker;

[ActionCategory("PostProcessing")]
[HutongGames.PlayMaker.Tooltip("Sets the Depth of Field settings on a Global Volume.")]
public class SetDepthOfField : FsmStateAction
{
    [RequiredField]
    [HutongGames.PlayMaker.Tooltip("The GameObject that has the Volume component.")]
    public FsmOwnerDefault volumeObject;

    [HutongGames.PlayMaker.Tooltip("Focus distance of the Depth of Field (e.g. 0.1 to 100).")]
    public FsmFloat focusDistance;

    [HutongGames.PlayMaker.Tooltip("Aperture (f-stop) value (lower = more blur). Typical: 1.4–16")]
    public FsmFloat aperture;

    [HutongGames.PlayMaker.Tooltip("Focal length in mm (e.g., 15–300mm).")]
    public FsmFloat focalLength;

    [HutongGames.PlayMaker.Tooltip("Set every frame?")]
    public bool everyFrame;

    private Volume volume;
    private DepthOfField dof;

    public override void Reset()
    {
        volumeObject = null;
        focusDistance = 10f;
        aperture = 5.6f;
        focalLength = 50f;
        everyFrame = false;
    }

    public override void OnEnter()
    {
        DoSetDOF();

        if (!everyFrame)
            Finish();
    }

    public override void OnUpdate()
    {
        DoSetDOF();
    }

    private void DoSetDOF()
    {
        GameObject go = Fsm.GetOwnerDefaultTarget(volumeObject);
        if (go == null)
            return;

        if (volume == null)
            volume = go.GetComponent<Volume>();

        if (volume == null || volume.profile == null)
            return;

        if (!volume.profile.TryGet(out dof))
            return;

        dof.focusDistance.value = focusDistance.Value;
        dof.aperture.value = aperture.Value;
        dof.focalLength.value = focalLength.Value;
    }
}

gamiafer53

  • Playmaker Newbie
  • *
  • Posts: 1
    • Geometry Dash Lite
Re: URP Post Processing actions out of date/not working?
« Reply #6 on: August 14, 2025, 05:27:35 AM »
I’ve run into the same issue with URP 2022 as well. The old Playmaker post-processing actions don’t seem to recognize the current URP Volume system anymore. From what I understand, most of those actions were written back when Unity used the Post-Processing Stack v2, not the newer URP integrated system.

What I ended up doing was writing a couple of custom actions that target the actual URP VolumeProfile components directly. It’s a bit more setup, but once you expose the properties (like Chromatic Aberration intensity or Lens Distortion) you can control them fine in Playmaker.