- Unreal Engine 4 Shaders and Effects Cookbook
- Brais Brenlla Ramos John P. Doran
- 1101字
- 2021-06-24 14:12:12
How to do it...
Let's start this recipe by looking through the camera's view; that way, we'll be looking at the same image when we start applying the different effects. Select it, as usual, by clicking on the Perspective drop-down button located on the upper left corner of the main viewport. Choose Camera01 in order to jump to that specific actor. We should be looking at the following screenshot:

The first thing we are going to try is to use several effects to enhance the main focus of the shot; we want to highlight the central area of the image, where the props are located, and direct the attention of the user to said area. We can do so by playing with the vignetting effects:
- Select the camera in the Content Browser and look at the Details panel. If you scroll down to the Lens category, you can find within it a section named Image Effects. This is where we'll control the Vignetting that we want to apply. Tick the box and change the default value of 0.4 to something higher, such as 0.6:

Vignetting is a subtle effect which makes the areas around the center of the image darker than the central ones. It can help highlight the elements that are in the center of the screen if that's our intention, but you can also remove the effect if that's what you prefer.
Another setting that is sometimes interesting to use is grain. You might have encountered it in the past in different scenarios; it was originally an effect we could see happening in old movies because of the processing of the photographic film those were recorded in. Nowadays, it is used more as an artistic effect, especially in the video game industry. It can also help hide certain flaws within the rendered image, or introduce granularity in an otherwise flat surface.
- To use it, take a look at the Grain Intensity setting while still inside the Image Effects section. In there, tick the checkbox for the Grain Intensity setting and give it a value higher than the initial 0. 0.2 seems to work well to demonstrate the effect in a subtle way, but feel free to raise the value to be able to properly see it in action:

Something else you can also adjust is the amount by which the grain is jittering. By default, this value is set to 0, but increasing it will make the grain move more and more:

At this point, we've almost covered all of the available settings we could be influencing if we were dealing with a real life camera. We've seen the depth of field features, the aperture, the focal length, the grain and vignetting effects... something we haven't done yet though is tweak the exposure in a manual way. Let's do that now:
- Still in the Lens category of the Camera01 Details panel, expand the Camera and the Exposure tabs. Under Exposure / Metering Mode tick its adjacent checkbox and change the default value of Auto Exposure Histogram to Manual:

- We should now be looking at an almost completely black viewport. This is happening because Unreal is no longer taking care of the exposure for us; we are now driving this setting through the camera properties. That being the case, move up a section and look out for the ISO, Aperture and Shutter Speed parameters. Tick the checkboxes next to them:

At this stage, we have to start thinking as if we had a real camera in our hands. Thanks to Unreal's physically based approach to rendering, we can feel safe by treating those properties just like we would in real life. Since our scene is too dark at the moment, let's change that.
- Change the ISO to 3200.0 and the Shutter Speed to 1. That should make the scene visible again, even though a bit dark. Feel free to raise the ISO or lower the Shutter Speed to make it brighter. This is the final image we should be looking at, as shown in this screenshot:

Finally, I'd like to take a look at yet another effect that is wildly used nowadays: the Chromatic Aberration. Even though it is a very particular setting, it can have many different uses. It is sometimes used as a substitute for anti aliasing, but more often than not it is seen as a technique that can help with creating a psychedelic feel in our scenes, or just mimicking a real camera by introducing that effect.
- Focus now on the first parameter within the Lens category, aptly named Chromatic Aberration. Enable it by ticking the Intensity checkbox and giving it a value greater than the default 0. Feel free to crank it up to something that makes it clearly visible, but I'll go with 1 for a subtle effect. The following screenshot will have a value of 5 just to see it clearly:

- Finally, check the Start Offset box and give it a value of 0.4. What this does is remove the chromatic aberration effect from the center of the framebuffer, leaving it on the edges. It can be a good setting to tweak in order to add to the psychedelic feeling:

- Apache Spark 2 for Beginners
- Java編程指南:基礎(chǔ)知識(shí)、類庫應(yīng)用及案例設(shè)計(jì)
- C語言程序設(shè)計(jì)
- INSTANT Sencha Touch
- The DevOps 2.4 Toolkit
- C++面向?qū)ο蟪绦蛟O(shè)計(jì)習(xí)題解答與上機(jī)指導(dǎo)(第三版)
- Terraform:多云、混合云環(huán)境下實(shí)現(xiàn)基礎(chǔ)設(shè)施即代碼(第2版)
- Tableau 10 Bootcamp
- C++寶典
- 從零開始學(xué)C#
- 響應(yīng)式Web設(shè)計(jì):HTML5和CSS3實(shí)戰(zhàn)(第2版)
- Modern C++ Programming Cookbook
- OpenCV Android Programming By Example
- Mastering Leap Motion
- Scratch編程從入門到精通