Announcement

Collapse
No announcement yet.

Let me tell you about morph targets, normals, and the .FBX file format...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Let me tell you about morph targets, normals, and the .FBX file format...

    The tl;dr? Normals on morph targets with .FBX files don't exist.

    Anywho, here hoes...
    See this? Took a lot longer to get looking good than one would expect.



    This is because the FBX file format doesn't keep the normal info for each morph target, so the more you morph an object the more ugly it looks. In reality, the morphs only contain one smoothing group. If your morph targets and base mesh are all smoothed and you're driving your normals off of a texture anyway, this isn't a problem.
    But, if you're working on hard surface stuff, it is. This is why.

    Here's an example of what we were being faced with. (Different mesh than before, same issue):



    To get a work around, we tried using the Alembic file format for exports as per this AnswerHub post, but that doesn't like n-gons very well and doesn't even support material IDs, which is a problem for us.

    We tried baking the normal info for each morph target in to the 2nd and 3rd UV channels of the base mesh as per this Unreal Engine Doc, but there wasn't enough vertex detail in our meshes for that to look anything other than hideous. It would be fine if we only had to add more mesh detail, but one: this seemed a bit over the top, and two: we had a lot of meshes that needed this change. Stuff that!

    We read some obscure AnswerHub post that referenced a Japanese UE4 forum thread about editing the editor source code that would force import all of the morph targets separately and bake the normals on to the base mesh on import, but that was too heinous an option to consider unless as a last resort.

    But, in the end, we figured it out!
    If the morph targets were just smoothing all of the faces together because there wasn't any smoothing info in them...
    Why not just smooth all of the faces that need smoothing, then physically separate the hard edges in to separate elements?
    BAM, Problem solved, and it's something than can be easily automated in to a script

    Thought that was worth sharing, hope it helps you if ever you run in to such an issue

    Visit my portfolio: jhgrace.com

    #2
    Hello [MENTION=854]Construc_[/MENTION]
    I found your thread by looking for a solution to my problem.
    It's just another illustration of what you speak about here

    In max :
    Click image for larger version

Name:	smoothingGroup_max.gif
Views:	1
Size:	99.7 KB
ID:	1131077

    Then, in UE4 :
    Click image for larger version

Name:	smoothingGroup_UE4.gif
Views:	1
Size:	153.1 KB
ID:	1131076

    That's annoying but in the case of my deer, I can use your workaround by putting the inside of the ears in another skelMesh but it's no more than a workaround... This problem can be really uncool in some situations.

    Anyway ! Thanks for posting this
    Sauvage's twitter - #freeNeoFur

    Comment


      #3
      You are most welcome! Glad it helped

      Visit my portfolio: jhgrace.com

      Comment

      Working...
      X