Hi All,
Is there an example of how to set and show the brightness changes for the game in a main menu? I know you can use post processing but my menu is not presented over the exiting active game window. I know some games show brightness using an image and some use the post processing and I was wondering which would be the best approach if the menu is not in the active game.
thanks
Don
you have trouble passing the value to the game?
To set and show the brightness changes in a main menu, you can use a combination of UMG and Blueprint scripting. Here’s a brief example:
- Create a UMG widget with a slider to control the brightness.
- In Blueprint, create a variable to store the brightness value.
- Connect the slider’s “OnValueChanged” event to a Blueprint function that updates the brightness value.
- To get the brightness value, simply get the post process volume or camera, break the struct that holds said value you are looking for. In this cases brightness is most likely under the exposure category.
- Connect it to the OnValueChange event and use your newly constructed UI to change the value of the brightness.
You can also use an image to show the brightness changes, by having an image that gets its brightness adjusted according to the value in the slider. For changing brightness you can either use the exposure settings or use something like this plugin: Elias Wick - Adjustments in Materials - UE Marketplace
That works but I see that the sliders onvaluechanged function is only triggered when using the mouse to update the value. If I use a gamepad to adjust the value the onvaluechanged does not triggers so looks like a bug.
You will have to find a way to focus the widget and maybe setup controls for it. Here is a tutorial which may point you in the right direction: Unreal Engine 4 Tutorial - Gamepad UMG Control Pt. 1 - Show/Hide Menu - YouTube
That’s the thing the slider works and is moving and when I use the mouse the volume changes but not if I use the keyboard or gamepad. I try set the focus as well tonight and see how it goes