Collaborative Project: Week3

This week I suspended the modelling of the character because the next step is about the hair production of the character. In the previous discussion with Karl, we decided to use Xgen to make it in Maya. It takes some time to learn. We have discussed and determined the feasibility of this production plan, because ue4 supports the import of groom, so we mainly refer to this video for the follow-up hair production process:

This week I mainly researched and produced the rain effect in UE4. This is the video I mainly refer to:

(This is the first video in the tutorial series)

According to the content of the video, I summarized the idea of making the rain effect.

The first is the moisture effect of water, which can be achieved by reducing the surface roughness of the object. But this only produces a reflective effect. In fact, in real life, after an object is wetted by water, if the water absorption is strong, the surface colour will deepen, so a Porousness attribute needs to be considered. In addition, objects in the rain, especially light rain, will not all get wet, so you also need to consider adding a mask to control the location of the water wet.

The effect of objects being wetted by water in reality
The Material Function in ue4.

Material Functions are little snippets of Material graphs that can be saved in packages and reused across multiple Materials. Material Functions allow complex Material Graph networks to be saved out and quickly reused in other materials, while also allowing more complex networks to be abstracted into single nodes, making material creation easier for artists.

Best of all, edits to a single function are propagated throughout all networks which use it. So, if you need to make a fix or change to how a function works, you will not have to make further edits to the many materials which may be using that function.

In this material function, the lerp node is combined with the mask to control where the object is dry and where is wet. Linearly interpolates between A and B based on Alpha (100% of A when Alpha=0 and 100% of B when Alpha= 1) The main influence is roughness and specular. The base colour channel reduces the saturation and brightness through desaturation and combines the porousness property to control the colour depth of the wet position.

Next, you need to make water drops on the surface of the object. In light rain, some objects such as leaves and the surface of the table will accumulate some small drops of water.

It is not difficult to achieve the effect of water droplets. The effect of water droplets can be achieved by using a normal map and adjusting the roughness of the material.

But there are other problems. First, the water droplets should only exist on the top of the object, that is, the surface facing the z-axis (the upward axis in the UE is the z-axis). Drops of water in the vertical direction will slip off. In addition, the water droplets should have the effect of dynamically disappearing and reappearing, because the rain is constantly falling, and the water droplets will be constantly updated.

First of all, on the first question, in UE, you can make a z-axis mask by getting the world coordinates. In UE, RGB represents the XYZ axis. After knowing this, I only noticed the colour of the coordinate axis in UE. It corresponds exactly to RGB. The same is true in Maya, where the y-axis is the upward axis.

UE
Maya

Regarding the second question, the animation effect can be achieved through the time node. Basically, the time node is needed to achieve dynamic effects in the material. Here, by creating a speed property to control the speed of the animation, combined with the information in the blue channel of the texture, the dynamic effect of the water drop can be offset, so that it is more realistic.

After finishing the effect on the horizontal plane, you also need to consider the water flow effect on the vertical plane. There should be a water flow effect on the x, -x, y, and -y axes. In fact, the basic idea is similar to that of making water drops. First, a normal map is needed to achieve the convex effect of the water. The blue channel is given a different black and white colour or offsets in time, and then the world coordinates are used to make the mask, and finally use the time. node. Although the idea is similar, the work of each part has become more complicated, the first is the production of the mask.

The water flow mask not only considers the time offset, but also pays attention to the fact that there should be no water flow on the horizontal plane, so it is necessary to make an extra mask to delete the mask area on the z-axis.

In addition, the effect of puddles is also made in the tutorial video, but because this time I mainly play characters, the effect of puddles is not needed.

Afterwards, a complete rain effect material function can be obtained by integrating the material function.

You can nest and use the material functions previously done to achieve complex effects.

In the end, in the actual material application, only a final material function Rain_Final_FUNCTION needs to be added. By creating parameter attributes, you can modify them in the instanced material.

In the end, I can get a good rain effect.

Leave a Reply

Your email address will not be published. Required fields are marked *