UE5 study notes (3) - basic blueprint events related to light knowledge

First popularize two concepts of light:

Bloom (sometimes called brilliance or glow) is a computer graphics effect used in video games, presentations, and high dynamic range rendering (HDRR) to reproduce the imaging artifacts of real-world cameras. The effect produces streaks (or feathers) that extend from the edges of bright areas into the image, creating an illusion of intense light that prevents the camera or eye from capturing the scene.

​High
Dynamic Range Imaging (English: High Dynamic Range Imaging, referred to as HDRI or HDR), in computer graphics and cinematography, is used to achieve a larger exposure dynamic range (that is, a larger difference between light and dark) than ordinary digital image technology. ) of a set of techniques. The goal of high dynamic range imaging is to correctly represent the wide range of real-world brightness from direct sunlight to the darkest shadows.


By the way, check the relationship between these two effects.

First of all, these two effects are the effects produced by the light source, and the purpose is to simulate the feeling of the light source in real life in the digital scene. Simply put, it is to make the scene light made on the computer more realistic.

Then explain the two effects in a simple way.

Bloom, the effect created for a range of light, simulates the feeling that the light blurs the boundary and spreads outward. Similar to the picture below.

(Reposted from CSDN@Audio and Video Development Advanced)

HDR expands the light brightness from the original 0-1 range to 32 bits, making it appear more details after the light is dimmed. The popular saying is that the black is darker, and the light is brighter, and this brighter value can produce a more dazzling effect when used with bloom at the same time. Similar to the picture below.

(Transfer from Zhihu@八尺)


Comparison of three light sources:

Spotlight (SpotLight): issued from a point in a certain direction, can illuminate a cone-shaped area. It can be used to simulate the effect of a flashlight or desk lamp.

Point Light (PointLight): Send light from a point to the surrounding area to find an entire area. Simulate the effect of light bulbs or self-luminous objects.

Directional light source (DirectionaLight): There is no specific position of light, and the light is emitted in a specific direction. Simulates sun rays.


Light baking (light baking): Add light and shadow effects directly to the texture. The baking effect is determined by the calculation method of the light source setting, as shown in the figure below.

The baking operation is: Build》Build lighting only


How to add physical effects to objects

1. Double-click the object

2、Collision》Add box simplified collision


A large number of lighting effects and parameters are explained in the tutorials studied, but for the game, the priority of this content is not very high, so here I mark lighting as a topic to overcome difficulties, and I will not do an in-depth arrangement at present


Change the old project to the setting method of applying lumen:

1、Edit》ProjectSetting

2. Find Rendering in the sidebar

3. Find Global Illumination on the right, and then modify the Dynamic Global Illumination Method inside to Lumen

4. Modify the lumen settings of PostProcessVolume3 (post-processing box)

5. Edit "search allow static, turn off allow static lighting

6. After finishing these, the project will be restarted, and this time will take a long time. After turning it on again, you will find that the scene is scary bright. At this time, you must remember to search for light, and adjust the Mobility of all the lights to Movable, that is, instant calculation, and you are done!

The opening of nanite is also very simple, you can double-click the object in the folder, find nanite setting in the edit bar, turn on the switch, and you are done. Or right click on the object in the folder and change nanite to enable

But please be careful: do not open these settings casually! Because I got stuck after I opened it, and I don't know what went wrong. Students who want to try it can try it in a new project.


blueprint event

Since there will be a special arrangement behind the blueprint, here are a few very basic contents

Nodes involved in moving objects

1. Drag the control to the blueprint to generate nodes directly

2. Search for GetRelativeLocation after the object is dragged out of the connection to obtain the current location of the object. The behavior of the object dragging out the line is guessed to be similar to the form of object.property in the code.

3. Right-click the coordinate value, and the value can be converted between the three-dimensional value and three one-dimensional values.

4. Right-click to search and add the MoveComponentTo node. You can see that it is a node for moving by looking at the name. Connect the moving object and position, and string it to the main process, and then you can run the test.

5. Delay is a very commonly used function. You only need to add a node Delay to the main process. Don’t forget to write the time.

6. Open a default blueprint, there must be three default red nodes. The currently contacted node is Event BeginPlay, which is similar to the Start() method in unity, and can be used to start the main process

7. If you feel that it is boring from the beginning to the end, you can right-click to add CustomEvent and choose a good name. The usage here is similar to a function in the code, which can be quickly called elsewhere. When calling, search for the selected function name to join the main process.

8. Add a method in the blueprint, first click the plus sign in the functions on the left sidebar, and name the new method

After choosing a good name, you can give the input input and out input content in the details on the right. The input is equivalent to the parameters in the brackets in the code function, which is equivalent to passing in the content involved in the calculation. The output is equivalent to the return value in the code function, indicating what value will be obtained after using the method.

You can also modify the parameter name, type, array, etc. as needed, which is more intuitive.

After creating the method, you can directly drag it into the blueprint when using it.

9. If I want to set a value in a written blueprint as an open parameter, what should I do? First click the plus sign in the variable column (VARIABLES) on the left to add a new variable. According to the old rules, modify its name and type, and open your eyes so that you can see it from the outside, which is equivalent to making this value public.

Then drag this value into the blueprint, and select get value, so that you can use this variable in the blueprint. Finally, when you click on the blueprint outside, you will see the added variable in the default of the details, so that you can directly change the value in the blueprint. If you can't see it, remember to go back and check whether the visible eyes are open.

Guess you like

Origin blog.csdn.net/weixin_35106335/article/details/127000629