Home Unreal Engine

Limit the amount a value can change per frame/smooth blending

So, I'm trying to create this dynamic tonemapping postprocess. I calculate the brightness of the screen and then use it to brighten/darken the image if necessary.

The problem is, I can't come up with a way to make the transition smooth. I'd want the transition to be slow, not instant like it is now. Is there a way to limit the "brightness" value can change per frame or something similar?

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    IIRC, Foyok did such a thing, and he had access to the source code, since it's easier to manage a dynamic solution like that on the fly rather then through Kismet or Materials.

    BTW, what solution base are you looking for?
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Ace-Angel wrote: »
    IIRC, Foyok did such a thing, and he had access to the source code,
    Source code ? You mean unrealscript ?

    I didn't found a good way to compute the screen brightness without the need to hook the framebuffer unfortunately (via DLLBind). However, once you have this data, you just have to use it to control the tonemapper inside the UberPostsProcess node of your post process chain.

    Regarding the way to update this smoothly, I don't know yet a good way to do this. They are some papers on how the eyes work that could give you some examples. In my case, I was putting a minimum delay via Unrealscript before updating again the screen brightness. So if I change the brightness, I made a timer of 4/5 seconds before updating it again. Not perfect but it was okay for testing the process.
  • Santewi
    Options
    Offline / Send Message
    Alright, thanks Froyok.
Sign In or Register to comment.