Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started 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.
-
Hi,
What do you mean by Custom Made?
Bye,
Jean
-
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.
-
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
-
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.// 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?
-
bump
-
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
-
Alright, looking forward to it.
-
How's this coming along?
-
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
-
Yo, that looks sweet. ;D
-
Not to nag but how's this coming along?
-
Hi,
not much progress unfortunatly, things got ectic, I hope I can allocate more time on this early next month.
Bye,
Jean
-
Hi,
is this going to allow to use URP or HDRP post-processing with Play Maker?
Or is it already possible?
-
Hi,
I am not sure, I haven't used HDRP, but I think URP is the default that we have currently right?
Bye,
Jean
-
Wow, this integration looks very interesting.
-
Please tell me there is progress. :'(
-
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
-
It's been 4 months now, surly this is done now? I really need it.
-
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
-
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?
-
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
-
Monthlybumptime.
-
Hi,
it's on the todo, thanks for the reminder, I haven't forgot though :)
Bye,
Jean
-
Time to inquire about this again.
-
Hi,
yeah, total nightmare of a backlog... sorry about that, I am not sure how to make it happen given the overload...
Bye,
Jean
-
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.
-
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?
-
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.