Reduce Blocky Lighting on Smooth Face?

I’ve imported a basic skeletal mesh into UE4, a subdivided cube, and I’ve noticed odd, gridlike artifacts in the surface. Adding in some of UE4’s primitives has informed me that this is normal behavior on a low-poly model, so is there a way to reduce or eliminate this effect without dramatically increasing poly count (the effect disappears if I subdivide the mesh once)? Baking a normal map from a high-resolution model doesn’t seem to have any effect.

Here’s the lit mesh:

Have you tried different shaders? It sort of looks like that shader has some stuff driven by the normal angle or something?

It is using a Fresnel effect to add a colored glow (which I intended to use for subtle additional team identification purposes); removing the Fresnel emission has no noticeable effet on the remainder of the surface. The material is otherwise a basic diffuse surface. Thanks for the idea though! I’ll fiddle around with the materials more and see if I can’t learn anything.

It should be noted that in a few quick tests, applying a subsurface or preintegrated skin surface mode exacerbates the grid effect.

Smooth shading of polygons is sort of a hack, it looks at each adjoining surface normal and tries to interpolate between them. I’m not surprised that the SSS shaders handle it more poorly since they derive a lot from the polygon data.

Do you have ambient occlusion in your scene? It lighting built?

Yes and yes, though the shot above is taken from the mesh preview, and the object in question is to be a movable actor, which I don’t believe are directly included in the lighting build (though they are affected by it).

I also realize that this is an unusual situation for the engine, as almost universally, models have a lot of texturing that would probably cover this effect, so it’s possible that making the shading look great on low-poly, untextured models may not have been a high priority or even possible. The only reason it’s an issue for me is that the characters in this game are meant to be marshmallows, without complex geometry or shading. It would be ideal if I could reduce the effect, but it’s not necessary; I just figured I’d ask and fix it if I could.

Hello ArcaneTheWoof,

So there are several factors that drive the resolution of shadows and lighting on models.

From the Pre UE4 :

1.) Model itself.
2.) Topology/Tessellation
3.) Smoothing
4.) Normals
5.) Light Maps
6.) UV Maps

In UE4

1.) Increase Light Resolution
2.) Enable Generate Mesh Distance Fields

I will link you to the documentation on our Wiki Page for you to study and then you can make a decision based around your project.

The first is a troubleshoot if you find yourself stuck.

The second is our official documentation on shadows,

Thanks,

Thanks for your time!

The majority of information on these pages focuses on static meshes; I’m working with a skeletal mesh that has not many of these options. Since the lighting isn’t being baked onto this model, things like light map resolution don’t seem like they would help reduce the artifacts.

It seems like a higher poly count and possibly a better normal map bake from a higher-res model are the only ways to improve the shading quality on a skeletal mesh. Would that be accurate? Or am I missing something?

EDIT: Just now I threw my marshmallow material on a built-in primitive sphere that has about the same level of topology as my mallow man and got significantly less grid-like artifacts. It seems there may also be a problem with Blender’s smoothing on export?

Blender’s smoothing on export?

Not sure UE4 would recognize smoothing from Blender. Probably have to subdivide.

That seems to be the likely cause. I’m going to try getting ahold of Maya somehow and see if it spits out better results, which would be a shame; if the problem can’t be solved because Blender just can’t spit out a proper model, then this project is kind of dead in the water.

What you have to remember is that upon smoothing in any modeling program Blender/Maya/Max is that UE4 will interpret that smoothing as tessellation.

If you look at your model inside of UE4 that you have smoothed you will notice that UE4 has tried to calculate the smoothing that you have incorporated inside of your modeling program.

Thanks,

It definitely is possible to get proper smoothing imported from Blender, though I can remember it being problematic till getting the settings figured out. Let me see if I can dig of a screen grab of my export settings.

Further information: I acquired Maya for some quick tests and found that Maya’s exporter produces meshes with the same problem, which tells me that it’s not Blender (which is encouraging). Looking at the documentation that provided below, I noticed that some of the images showed the same grid-like shadowing on sphere primitives.

The only thing I have left to try is to generate a high-quality normal map in xNormal (I’ll have to use a friend’s PC, xNormal doesn’t have a Mac version) and see if that works. If it doesn’t, I may have to decide that it isn’t possible to reduce this effect.

Check out my comment below; Maya spits out models with the same problems. It would seem that Blender’s 2.71+ FBX exporter isn’t as behind the times as it has been.

Do you see the same issue if you import it as a static mesh and not a skeletal mesh? What about with Ambient occlusion off? Just curious.

I haven’t actually tried it yet, I’ll give it a shot and get back to you.

Curious: how to you mean smoothing is interpreted as tesselation? I want to make sure that we’re using terminology to mean the same thing to avoid confusion, since I just noticed that Maya has a “smooth model” option that Blender refers to as subdivision; I’m concerned with shading on a deliberately low-poly model.

That would be awesome! Thanks

Hmm, I was under the impression that smooth shading simply effected how the surface normals are shaded, and was a completely separate thing from tessellation which actually modifies the underlying polygons at runtime.

This documentation will clarify tessellation.

https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/MaterialProperties/1_8/index.html

I know with smoothing groups when exporting from maya you need to turn on triangulate. This will tell the engine not to try and interpret the smoothing groups on its own but leave it up to the modeling software.