Download

Control PostProcessVolume material with HUD widget button- need help!

Hi,

I made a postprocess effect (the effect creates outlines on all objects in the scene) using a material (PM_Outline_Inst) and I want to be able to switch that effect on /off with a HUD button, ingame.The material instance has a scalar parameter called Radius, and my idea is to use that parameter to controll the effect,

I am using three blueprints for this, Touch_button blueprint, HUD blueprint and MainLevel (the Levelblueprint). The button appears when in playmode, I can click on the button, but nothing happens to the effect. Anybody have some solution for this?

Best
Magnus

It’s just this simple 500 step approach:

Hi,
thank you for fast solution!
I did not understand one thing though, The Set Scalar Parameter Value, If I add that node, instead of Target, it has Collection. How do I get it to have “target” instead?

Cheers
M

I solved it, and it works! The only thing that would be nice, is if I could turn the effect on and off with the HUD button. As of now, it starts with the effect on and when I click, the effect disappears.
How would I move on, if I want to be able to turn it on/ off?

Thanks
M

To turn it on and off, just change the weight between 1 and 0.

Excellent, thanks!

I added a flipflop and just copied your node solution, with different weight values, works fine!. Problem is though, the effect is on from start.
Do you have any ideas how I would do if I would like to have the effect disabled when hitting Play and then be able to switch it on/off with the hud button?

/M

I managed to solve it. If anyone else is interested, here is the bp.


/Magnus