Painterly Style Normal Map

Hello Guys, i am a beginner about materials or shaders in unreal engine and i trying to recreate this paint look effect made in blender to unreal. the reference video for making the effect in blender is this: https://youtu.be/s8N00rjil_4



Did you use an isosphere in blender? I’m guessing the difference is due to mapping.
You probably have the uv map set to only fit the iso but in unreal you have a regular sphere.

Try exporting an isosphere from blender to unreal with it’s mapping and see if it works correctly.

Two potential issues I can see with this method, but both are easily fixable.
One: Unreal Engine uses an inverted Y normal / green channel compared to blender. In the texture settings in Unreal, there is a checkbox to invert the green channel of you did not account for this on export.
Two: That is a world or object space normal map. Unreal expects a tangent space normal map. There are three ways to fix this.
A: Disable “Tangent Space Normals” in the UE material.
B: Use a transform vector node to convert the normal map from world/local space to tangent space in real time.
C: Bake the normals into tangent space before exporting. This is probably the ideal solution, since generally tangent space normals are more flexible and this will prevent needing to constantly spend shader instructions transforming the vectors in real time.

1 Like

I use a regular sphere and unwrap like this to make easier to paint in photoshop.

About the ISOsphere i import to unreal with the same mapping and didn’t work.

Imgur

I bet it’s the tangent space vs world space issue BananableOffense brought up.

Ok, I tried all the options and it still look like this.

Imgur
Imgur
Imgur
Imgur

For option (C), if I’m wrong, I would have to bake the normals of a high poly object into a low poly to get the details and paint.

i tried all the things and didn’t work.

Also, double check the format if the saved image. Tangent space normal maps are 0 to 1 R16G16 images, which the engine automatically remaps to -1 to 1 RGB by deriving the 3rd component mathematically.

An world/object space normal map may be incorrectly interpreted as an sRGB image texture. You may need to disable sRGB, change the compression type to normal map, or chose another appropriate type (although most other settings will require you to manually remap the output to the correct range).

You do not need to bake from a high poly to low poly. You can bake from same poly to same poly, although it is not common to do so. But it will need to be baked using mesh data, as the conversation requires tangent data.

Alternatively, you could apply a transformation matrix in the blender shader graph using math before saving the image. I don’t think they have a pre-built node for this like, but the formula for a transformation matrix is easily discoverable.

Ok, today I did a different method, instead of doing the process in Blender, I did it in Substancer Painter, the texture after painting looked like this.

I discovered that with a cel-shader in unreal it is more visible to see the effect of light on the object but the result is this:


It looks like it’s getting close, but I still have this glitch square shadows.

The squares are probably biasing shadows if I had to guess. Try using more geo on the spheres or tweaking the shadow bias settings on the lights.

1 Like

Indeed, that jagged shading looks like shadow acne and/or the shadow terminator problem. Altering the normals will make meshes more prone to these artifacts, and they will require greater biasing.

1 Like

i think i resolve the black squares problem, in project settings my shadows are set in (Virtual shadows maps)

Imgur

when i change to (Shadow maps) i still get little glitchs.

Imgur

But when I uncheck (Dynamic Shadows) from the object, the glitch disappears. I tried messing with the BIAS before this, but it didn’t change anything.

Imgur

the interest thing is i take off the transform node in the material and i think the results are similar.

Imgur
Imgur

The effect dont look good compare with cel-shading but i think is ok.

Imgur

Increase the geometry make worse and i mess with the BIAS and change nothing but i already post maybe a solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.