How can I change the brightness with a slider?

Hi, I’m working on the settings menu of my game and I can’t find documentation or any info on how to change the brightness with a slider. I have also seen some games have a gamma option and I would like to add it too. Can anyone help?

Also someone told me to try this Auto Settings in Code Plugins - UE Marketplace but I don’t know how it works so… Yeah haha

Bind a slider widget to a float variable ( that variable could be in a lot of places, but possibilities are game instance, save game, blueprint, player etc ).

Have a post process in the level ( it could be placed, spawned or part of a BP ).

When the slider is moved, it changes the brightness value in the post process.

I can give you a code example if you want, but like I say, many different ways of doing it :slight_smile:

Hey! Sorry for the late late reply but yeah, an example could come in handy. Also, the gamma would work the same way right?

Put a post process volume in your level, set it to infinite extent.

Make a new widget BP. Put a slider in it. Down the bottom of the slider details, click the big green ‘on value changed’ button and put this code in:

Run the game. It actually works back to front, but you get the idea :wink:

297418-brightness.gif

I can’t find the “get actor of class” node, only the “get all actors of class” node appears… Also: I don’t know how to set the post processing volume to infinite extent haha

Click on the PP volume, in the details panel:

297462-inf.jpg

Stop typing ‘getall…’, try typing ‘getactorof…’:

297463-getactor.jpg

I can’t find the infinite extent thing, and I believe that is because we are working on different versions of the editor, since I’ve found the “unbound” option, which I think does the same thing?

297471-unbound.png

And the same thing goes for the “Get Actor Of Class”, because it doesn’t appear, even if I uncheck the “context sensitive” box

I’m working on 4.17, which version are you on?

Sorry, unbound, that’s it.

For the actor thing, don’t pull off a pin, just click on the background and look for it.

Ok, then do this:

297474-get.jpg

I still can’t find it :frowning:

That sort of made it, now I don’t get the pins of the “make post process settings”

1 Like

Getting there ( I don’t know how much you know / don’t ).

click on the post process node, in the details you have to tick the things you want to have on the node… :slight_smile:

It still doesn’t work for some reason? And this is what the slider looks like:

Can i see your ‘on value changed’ code now?

( Is that two sliders?.. )

It is only one! I don’t know whats going on either… Gimme a minute, I’ll post my code

Here you go

Yeah, you connected it up wrong… :-/

Take a look at my piccy at the beginning…

Did you get there?.. :slight_smile:

Okay I fixed the connections but it looks the same and does nothing… Shouldn’t I bind something to the value of the slider?