Cel-shaded material looks worse (jagged edges) in UE4 compared to Blender

I’ve got the same model and same cel-shaded logic in Blender and UE4, but UE4 seems to have distorted/less-precise normals which cause jagged edges:

The effect gets worse the more detailed the model is. This is an extreme example at 325k tris. I’ve tried experimenting with the different shading export options, but I haven’t found anything that made any difference.

Another thing to note is that there seem to be some imperfections in UE4 even without my model. Here’s a similar type of shading on the UE4 material preview sphere:

There’s a setting for high precision normals somewhere in the rendering settings, you can try enabling that and see if it helps.

That does sound like something that would cause this. I did a quick test of setting “GBuffer Format” to “High Precision Normals” but it didn’t seem to have any effect. I’ll try experimenting with it more later.

How are you exporting/importing the mesh? It could be a bug though, you can try reporting it.

Edit: I originally thought I had an experiment that showed that a mesh exported from UE4 to Blender would look better in Blender, but now it’s looking like they are actually the same. So it does appear to be some export/import when I go from Blender. I’ll try running through all the settings again and report back.

Also I’m interested in fixing the jagginess that appears to just be an inherent part of smoothed normals. It occurs due to the interpolation being slightly inconsistent between each tri, so at each tri edge there’s the potential for a sharp turn in the normals. I’ll probably make a new thread for that stuff though.

I tried a bunch of settings, and tried exporting as obj instead, but no luck. The shading matches perfectly when it’s a reasonable polycount, but gets distorted in UE4 when it’s a really high polycount. I don’t think it’s reasonable to use polycounts that high anyway, so this issue isn’t actually too important. Still kind of curious what’s going on, but I"m abandoning it for now. I’m going to look into more realistic ways to smooth out the cel-shading edges.

For anyone interested in the cel-shading edge problem in general, I’ve made a new thread for it https://forums.unrealengine.com/showthread.php?148946-Methods-for-smoothing-cel-shaded-edges&p=731025#post731025

I think you should still report it as a bug, attaching a low poly .fbx that works fine and a high poly .fbx that’s messed up. That way it could get fixed in the future. Or they might tell you of some hidden technique that makes it work somehow.

Posted a bug report, but it wouldn’t let me attach an fbx due to the file extension for some reason Normal smoothing issue at high polycounts - Rendering - Unreal Engine Forums

“Use High Precision Tangent Basis”
Enable this per mesh basis form static mesh editor.



High Precision Static Mesh Vertex Normal and Tangent Encoding 
- The single most important factor in achieving high quality reflections is how accurately the vertex normal and tangent can be represented. 
We added the option to encode normals and tangents as 16 bits per channel vectors. 
This allows developers make the trade off between higher quality and how much additional memory is used encoding vertex buffers.
This option, Use High Precision Tangent Basis, can be found in the Build Settings section of the Static Mesh editor.


Thanks Kalle, that fixed it.