Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mupp on February 13, 2020, 08:12:19 PM

Title: Using Post-process profile
Post by: Mupp on February 13, 2020, 08:12:19 PM
I'm wondering how I can modify my PP profile. I've checked out the package on Eco but most of my effects are custom made and I wonder how I can access them.

I'm looking for a way to turn them on/off and change their values.
Title: Re: Using Post-process profile
Post by: jeanfabre on February 14, 2020, 05:56:26 AM
Hi,

 What do you mean by Custom Made?

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on February 14, 2020, 08:41:41 AM
What is unclear? The PP profile can have have more than Unitys default shaders. Many 3rd party assets and also my own are used through it.
Title: Re: Using Post-process profile
Post by: jeanfabre on February 17, 2020, 01:52:37 AM
Hi,

 I did not know that Unity post processing profiles could be custom :) all the custom ones I used where using their own boiler plate components to create the effects.

Do you have a link to an asset that use the PP profile so that I can see how it integrates? thanks.

Can you explain how you created your own? It seems that you can only achieve that via c# coding right? if that's the case, then I think you have enough skills to create the custom action to control these scripts, right?

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on February 17, 2020, 04:56:46 PM
Sorry, I was a bit confused that I thought I wrote something wrong. I'm using this. http://staggart.xyz/unity/sc-post-effects/scpe-docs/?section=sc-post-effects

For my own shaders I use Amplify Shaders which auto generates a script for me. It can look like this.
Code: [Select]
// Amplify Shader Editor - Visual Shader Editing Tool
// Copyright (c) Amplify Creations, Lda <info@amplify.pt>
#if UNITY_POST_PROCESSING_STACK_V2
using System;
using UnityEngine;
using UnityEngine.Rendering.PostProcessing;

[Serializable]
[PostProcess( typeof( ColourAdjustPPSRenderer ), PostProcessEvent.AfterStack, "Colour Adjust", true )]
public sealed class ColourAdjustPP : PostProcessEffectSettings
{
[Tooltip("Brightness")]
[Range(-1f, 1)]
public FloatParameter Brightness = new FloatParameter { value = 0f };
[Tooltip("Contrast")]
[Range(-1f, 1)]
public FloatParameter Contrast = new FloatParameter { value = 0f };
[Tooltip("Saturation")]
[Range(-1f, 1)]
public FloatParameter Saturation = new FloatParameter { value = 0f };
[Space(5)]
[Header("Tint")]
[Tooltip("H")]
[Range(0f, 1)]
public FloatParameter H = new FloatParameter { value = 0.5f };
[Tooltip("S")]
[Range(0f, 1)]
public FloatParameter S = new FloatParameter { value = 1f };
[Tooltip("V")]
[Range(0f, 1)]
public FloatParameter V = new FloatParameter { value = 0f };
}

public sealed class ColourAdjustPPSRenderer : PostProcessEffectRenderer<ColourAdjustPP>
{
public override void Render( PostProcessRenderContext context )
{
var sheet = context.propertySheets.Get( Shader.Find( "Colour Adjust" ) );
sheet.properties.SetFloat( "Brightness", settings.Brightness );
sheet.properties.SetFloat( "Contrast", settings.Contrast );
sheet.properties.SetFloat( "Saturation", settings.Saturation );
sheet.properties.SetFloat( "H", settings.H );
sheet.properties.SetFloat( "S", settings.S );
sheet.properties.SetFloat( "V", settings.V );
context.command.BlitFullscreenTriangle( context.source, context.destination, sheet, 0 );
}
}
#endif

Now, I don't expect a custom action for everything, that would be insane and it wouldn't work for my own stuff.
Using Get/Set properties does not work but maybe a custom action that can get/set the shaders variables in the profile?
Maybe something like the Conditional Expression action, there you have to write the variables and logic yourself would work?
Title: Re: Using Post-process profile
Post by: Mupp on February 23, 2020, 09:40:30 PM
bump
Title: Re: Using Post-process profile
Post by: jeanfabre on February 24, 2020, 03:25:40 AM
Hi,

 I am in touch with the amplify author, I have allocated time for this this week, I'll see what can be done and if I can do a generic system or not.

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on February 24, 2020, 09:24:09 AM
Alright, looking forward to it.
Title: Re: Using Post-process profile
Post by: Mupp on March 18, 2020, 08:03:06 PM
How's this coming along?
Title: Re: Using Post-process profile
Post by: jeanfabre on March 19, 2020, 03:16:00 AM
Hi,

 It's getting there :) I have the listing of effects ( including from packages, which was a pain to get...), list of actions already existing, the next big thing is to create the code to analyse the effect and generate the according setter and getter action, but I have some base to do that, so it's a matter of putting it together.


(https://i.imgur.com/cRCMQGQ.png)

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on March 19, 2020, 09:13:23 AM
Yo, that looks sweet.  ;D
Title: Re: Using Post-process profile
Post by: Mupp on April 21, 2020, 08:42:14 PM
Not to nag but how's this coming along?
Title: Re: Using Post-process profile
Post by: jeanfabre on April 22, 2020, 02:13:54 AM
Hi,

 not much progress unfortunatly, things got ectic, I hope I can allocate more time on this early next month.

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: thezigner2 on April 23, 2020, 11:58:24 PM
Hi,
is this going to allow to use URP or HDRP post-processing with Play Maker?
Or is it already possible?
Title: Re: Using Post-process profile
Post by: jeanfabre on April 28, 2020, 02:22:24 AM
Hi,

 I am not sure, I haven't used HDRP, but I think URP is the default that we have currently right?

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Broken Stylus on April 28, 2020, 06:11:23 PM
Wow, this integration looks very interesting.
Title: Re: Using Post-process profile
Post by: Mupp on May 19, 2020, 08:24:41 PM
Please tell me there is progress.  :'(
Title: Re: Using Post-process profile
Post by: jeanfabre on May 20, 2020, 10:13:10 AM
Hi,

 I wish... sorry about that... it's on my todo, I don't take any other big tasks until I get that done.

Bye,

Jean
Title: Re: Using Post-process profile
Post by: Mupp on July 01, 2020, 08:33:03 PM
It's been 4 months now, surly this is done now? I really need it.
Title: Re: Using Post-process profile
Post by: jeanfabre on July 02, 2020, 01:57:35 AM
Hi,

 nop, sorry, I am being short of available time to properly get that done at the moment unfortunatly.

 maybe if you have some specific values you want to control, I can get that action done while the generic system is being built.

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on July 02, 2020, 09:04:35 AM
No, there are too many things for that. When can I expect this done? I use a lot of changing post effects and it's kinda hard to make new graphics when you can't see the final result.

What makes this difficult to implement? Doesn't Unity provide good ways to modify the profile?
Title: Re: Using Post-process profile
Post by: jeanfabre on July 03, 2020, 01:51:42 AM
Hi,

 it's not trivial indeed, you have to reflect on the code itself and deduce what the action will need and write c# using strings that you then save as a file, but the delay is also because I am having trouble with time allocation to begin with...

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on July 27, 2020, 07:24:19 PM
Monthlybumptime.
Title: Re: Using Post-process profile
Post by: jeanfabre on July 28, 2020, 01:39:47 AM
Hi,

 it's on the todo, thanks for the reminder, I haven't forgot though :)

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on September 14, 2020, 05:01:55 PM
Time to inquire about this again.
Title: Re: Using Post-process profile
Post by: jeanfabre on September 30, 2020, 01:33:32 AM
Hi,

 yeah, total nightmare of a backlog... sorry about that, I am not sure how to make it happen given the overload...

Bye,

 Jean
Title: Re: Using Post-process profile
Post by: Mupp on October 02, 2020, 02:29:31 PM
Outsource it, or let the intern do it?

Seriously, isn't this, the postprocess function, a core feature that is used by everyone?  I mean, I can't be the only Playmaker user that use more than Unitys default effects. Isn't Amplify for example, a very popular asset? How does everyone else handle this?
I'm actually curious.
Title: Re: Using Post-process profile
Post by: Broken Stylus on November 17, 2020, 06:40:15 AM
Looks like you need some treasury to recruit someone. I'm wondering if you could perhaps open up the heart of Playmaker to some extent, moderate surely, to let coders add stuff?
Title: Re: Using Post-process profile
Post by: djaydino on November 17, 2020, 08:19:02 AM
Hi.
I don't think you need to 'open up the heart of Playmaker' for this.

But maybe Jean could share the source code of this.

It looks a bit like the default action builder but probably a lot more complex to get stuff and then set in a script.

Due to this pandemic i know that Jean (and many other coders) has a lot of high priority work going on, and that's the main reason its taking this long.