Monday, May 11, 2015

WIP: Aphrael Texturing 1

Greetings and salutations! Today I want to show what I have so far in regards to texturing Aphrael so far. It is coming out okay but a lot of work still needs to be done in order for the model to look good. Here is what I have so far:

Full body test in Unreal Engine 4.

Face test in Unreal Engine 4.
I mainly only have diffuse maps going at the moment except for the hair, but I will get into that in a little bit. So far the colors are reading correctly so now I have to make the appropriate specular and normal maps to bring out the textures of the materials. The UV sets are all working correctly thus this will allow me to use tiling normals to drive the actual normals through RGB masks. I also need to make a subsurface map for the Aphrael's skin even though the current vector set up I have is doing pretty well by itself. You can see it in the fingers here:

Some subsurface scattering in Unreal Engine 4.
The main problem I am having right now is the hair. The hair looks pretty bad and I will more than likely re-do it. While trying to render hair in UE4, I discovered a major flaw with the engine: it has translucency sorting errors! WTF!? Most modern engines don't have this problem at this point but for some reason UE4 has sorting problems when dealing with translucent objects. I will show you what I mean with a render using a base translucency shader:


Sorting errors in UE4.
Looks horrible doesn't it? If you still don't understand what is going on, let me a explain a bit. When rendering out translucent objects, not having the right algorithm in the software can cause the renderer to be confused on which translucent object to render in front and which one to render in back. The result of this causes a sorting error because the engine doesn't know which objects to render in which order. Hence the mess above. I discovered this problem in Maya and mental ray and I despaired to encounter this in UE4. Sorting errors are very difficult to fix. Lucky for me, after a bit of research, I found a work around called dithering.

Usually when one thinks of dithering, they think of a shading technique in 2D space such as the choppy shading in animated GIFs. However, in this case, the principle behind this is applied in 3D space to create the illusion of soft edges when using UE4's opacity mask. Why the opacity mask? Normally it renders hard edges from the alpha channel because it can only read 0 and 1 and not everything in between like the translucency channel can. However, using dithering and then a blurring node in the opacity mask can help smooth out the edges and hence no need to worry about a sorting error since the opacity mask doesn't use translucency. So what does that mean for the hair? Well now I don't have the translucency mess that I had before. Take a look:

Using blurred dithering for in the Opacity Mask channel.
Now that I understand what is going on with the render, I can attempt to fix the issue when I re-model the hair. Hopefully when I post about Aphrael again, the hair will be much improved. We'll see!

No comments:

Post a Comment