Help with Smoothing and fbx import issues.

Hello,

I’m facing a smoothing or normals issue after import for my skeletal mesh in UE4, I am getting strange dark patches as well as some visible faceted areas on the mesh. I’ve looked up everywhere for answers and tried everything i could think of plus some of the suggestions in these threads, such as exporting fbx with tangents and normals, and changing/testing import/export settings. I am using 3ds max to export. The mesh is clean and looks fine in max, I checked the normals they are also fine and are facing the proper direction, there are no intersecting geometry issues either. I imported the fbx file into max again to double check and it also looks fine, it’s just when i import it into Unreal things seem to mess up.

For the sake of comparison i imported a static version into unreal and it seems to be ok.

Extra note: the mesh is animated it is blinking.

Hope someone could help out with suggestions!

!

images below:

119513-smoothing_issue_01.jpg

Hi ,

have you tried to triangulate the mesh in max before you export it?
I remind that we had some problems with the triangulation and animation in our project.
What FBX exporter are you using? I think the 2014 exporter is the most stable one.
In the screenshot you are computing your normals when you import it, have you set it to import normals?

I have never imported skeletal meshes but I hope I can help you somehow :wink:

Greetings

Evil_Fischi

Hi Evil_Fischi,

for taking the time to help out!

  • Yes this is FBX 2014 I also tried 2016 and 2013 all with the same result.

  • I also tried the compute normals and imported normals as well as tangents plus exporting tangent and normals from max. That didn’t do anything.

  • I am checking fbx to triangulate the mesh for me during export from max, i also tried unchecking it, all the same result.

I didn’t try triangulating the mesh in max in the modifier stack if that’s what you mean, i’m afraid that may cause some skinning trouble specially when the skinning is already setup for the most part I can give it a try and hope the weights don’t mess up.

It is a very strange issue. Will keep you posted.

Yes I meant triangulate it in max with the modifier. I think sometimes the triangulation algorythm of max and unreal are different. I can try to ask my other team members how they solved this problem but it’s a long time ago we had this issue.

Have you tried to reproduce this problem with an other mesh?
Maybe your mesh is somehow corrupted…

Does your mesh have explicit normals in 3dsMax? Have you tried adding a “Edit Normals” modifier, select all and hitting reset and in case set smoothing groups? Just some ideas… Btw. the FBX SDK Version is 2016 so you should use that version if possible.

Ok ! I had to go in and manually edit those normals one at a time :slight_smile: . I never imagined I had to do this one day.

Well, Glad I could give you a hint. Usually I just select all and hit the reset button. This always clears those explicit normals and then create smoothing groups as I wish :slight_smile:

Very sorry guys I assumed prematurely, the problem still exists, my initial test was a fluke that tricked me into thinking it worked when i noticed i had exported a different mesh without the animation. The issue is still clearly a normals one.

Everything is ok in max and the FBX file when imported back into the 3d app all the smoothing and normals directions are fine but something in the import in UE is still going wrong as you can see from the normals directions.

Here’s an update with new images and the .ZIP file, Will also try to create a forum post for it.

!

link text

119702-normals_unreal02.jpg

The ZIP file

link text

Here’s the Forum post in case.

again and happy holidays : ).

FBX and normals Import going very wrong! - World Creation - Epic Developer Community Forums!

The asset you are providing is not the one from the screenshots? Also it is very very small and you cant even get close to it without getting culled from near camera frustum plane. Also, I cant see any normal problems with your test asset.

Hello LeFxGuy,

for having a look at it again, sorry I can’t make available the actual original mesh(head) but it is the mesh in the images above. The problem is similar with this model as it is small part of the head eye area cut out. It is to demonstrate the issue. The size is correct as it is a part of the character’s eyelid, by default Unreal will not track in and will cull it, you just need to zoom in on it by changing the cam FOV in the viewport to something lower.

You say you can’t see any normals issue in Unreal when you load it up? Please make sure you are checking it while animated as it will unfold the lid area, you should see the dark patches in that specific area where the problem is happening. If you still can’t spot the problem can you share the import settings you are using?

in advance!

119717-normalsgif.gif

The dark parts visible here, no shadow areas the sun is directly facing the mesh, just to illustrate.

could you send the max file, it’s annoying to only have the fbx file. Cant import the animation into max. Also, maybe just change the smoothing groups/triangulation of your mesh at that part. It’s tiny anyway. :smiley:

Oh sure, here it is.link text

Will add that using a morph target to do the same animation deformation on the same mesh instead of a rig will not cause these problems and will work fine, but that’s besides the point if that helps in any way.

Well it seems like the engine does not correctly recalculate the normals. And i can confirm that I got this problem, too. I did not check for any option inside Unreal to fix that behaviour but my Idea for you is to just reverse the animation so that you do not import the opened but closed eye lid so that you make sure the normals are correct in the closed position because when opened, you can’t see those parts of the mesh anyway :slight_smile:
Of course, this is just a workaround.

Merci LeFxGuy for confirming the issue.
Well it is an awkward workaround, it also breaks our workflow and setup and forces us to amend things further. We are very much surprised it hasn’t been a big deal.
Meanwhile here’s a another related problem with those Normals. It works great in Unity out of the box on import, meanwhile Unreal is simply unable to import it or even compute it correctly. I tested it on all versions since 4.11, at this point i am convinced it must be either a bug or a limitation.

Can we have an up vote for this? I don’t know if the Epic staff would be aware of this post after the holidays?

Edit: to better spot the Facets Directional light must have detailed shadows, in this case the Num of dynamic shadow cascades are bumped up from the default 3 to 6.

.

Here are the files and a comparison image.

Hi ,

I was able to get more desirable normals following these steps:

  • Open the test asset and move the timeline such that the eyelid is in a closed position (make sure the lids are fully extended and exposed, no wrinkles)
  • Next apply the edit normals modifier at the top of the stack and select all of the lid normals and Unify them
  • After the normals have been unified select all of the normals and make them explicit.
  • Move the modifier under the skin modifier and then export the test asset
  • Make sure that you select “Import normals and tangents” when importing the fbx

After following these steps I didn’t see any issues with the normals. The reason this may be occurring is that the overlapping skin in the eyelid will generate wonky normals by averaging the face normal for each polygon. This is fixed when you reapply the edit normals modifier in a pose that doesn’t have folded skin.

To ensure that the normals stay in their edited state and don’t get averaged you make them explicit. This is a special case for the eyelids and may not give good results for other parts of your mesh. If you want a more detailed explanation of the different normal types that get exported from max checkout this page: Edit Normals Modifier

Be sure to read the “Types of Normals” section. The computed normals don’t accurately handle certain situations and this is one of those cases. It is unlikely this will be addressed anytime soon so workarounds like this are recommended.

121518-giphy2.gif

Let me know if this helps!

[EDIT] Update Gif to have more favorable lighting.

Ed

Thank you, this solved this issue for me!

I believe it’s one of those cases because I lost count at how many times I did this exact procedure with edit normals or perhaps I thought I did (must be the twilight zone). What’s important is that it is working so far.
I guess we have to use this workaround for folded geometry in most places. As for the faceted faces, I was receiving a few hints from one of your teammates in the forum posts, he mentioned it was the light shadow maps and cascades that are causing this and not the normals (even though visually they look like normals issue). I did go back and forth on that and still experimenting. The bottom line is that i can’t seem to get detailed lighting and shadows without having these facets appearing and it becomes a whole balance game of in between compromises. Which brought me back to assuming that the normals of the geometry were getting messed up during import, but we are told it is shadow maps and lights nature in game engines. At least that’s what we are slowly discovering. Sorry coming from FX/film background some of these issues are still alien to us. But again for your support and any future hints regarding this subject matter and workflow are appreciated.

Faceting can occur due to your light settings for sure. On your directional light make sure to play with these settings (I will also list values that may work but that depends on your project/situation and you may need to play with the settings). Keep in mind the sliders have limits but you can manually type in numbers outside these ranges.

Light Section

  • Shadow Bias = .3
  • Shadow Filter Sharpen = 0 OR -0.1

Cascaded shadow maps section

  • Num Dynamic Shadow Cascades = 4
  • Distribution exponent = .8

I think the most important is the Distribution exponent and shadow bias settings. With certain settings you can get faceting on any asset. This is one of the characters made by epic and I can still get faceting on his head with certain light settings.

EXTRA NOTE
If you have lighting that looks good for the character but bad every where else you can make the character exist on a separate lighting channel with a light tailored for the character.

If you need the main light to still cast a shadow but not effect the character a sneaky workaround is to duplicate the skeletal mesh for the character and in the extended rendering settings uncheck “Render in Main Pass” That will make it invisible but still cast a shadow.

Good Luck! I hope everything works out.