Home Technical Talk

Questions about Face Weighted Normals in Production

Hey Polycounters,

I'm to give a presentation about face weighted normals and the so-called "medium-poly workflow". I've already gained a quite good understanding of the workflow thanks to Ready at Dawn's the Order Environment tech talks and all of the great threads here in Polycount. I see the possibilities of the workflow in environment art but sadly I haven't had a chance to use said workflow in an actual production.

So the actual question is how have you used fvns and what kind of problems did you face in production? I'm aware of the sub-pixel polygons and the requirement of custom tools, but I'm also open for all possible solutions that you came up for these issues. You can also post links to reading materials if you have any.

Thank you for your time.

Replies

  • ZacD
    Offline / Send Message
    ZacD ngon master
    I've heard it can be hard to make LODs for those meshes, but I haven't tried it myself. 
  • huffer
    Offline / Send Message
    huffer interpolator
    Used Angle and Area weighted normals in Maya 2014+, results are pretty good without any tinkering (compared to Unweighted anyway), but in some cases we still used some scripts to align the normals to look best, mostly on cases where you had a beveled edge with only 2 segments (like a thin polygon strip).

     Also used them in 3dsmax with the script that automatically set them aligned to faces on the model. One problem was when exporting from 3dsmax to Maya (package that client used) - if you import with Unlock Normals unchecked, the mesh inside Maya looks just like it did in Max, but all normals are locked, not just the ones that were adjusted inside 3dsmax. Then using the standard Unlock Normals from the menus turns all edges to hard edges and your work is lost. If you import the FBX with Unlock Normals on, then smoothing groups are preserved, but custom normals are not, so vertex normals are reset to Maya's Angle and Area weighted. So it's best to use them when the model is final, and in the final software package. 

    One example for LOD approach was from flat bevels (corner edge loop flanked by another two sets of loops at LOD0) to 2-edge bevel with face weighted normals to hard edges.
  • monster
    Offline / Send Message
    monster polycounter
    I've been using the FWN script I created here in production with great results. (Well our character artist has been using it.)
    Here is a post about my tool: http://polycount.com/discussion/comment/2230470/#Comment_2230470

    Couple of benefits.
    • Lower vertex counts. Keeping the entire model and one smoothing group keeps the game engine from breaking verts at hard edges.
    • Normal maps render much nicer with less gradients leads to better compression.

    We don't jump between Maya / Max so we haven't run into the problems @huffer talks about. But there are some limitations.
    • The tool I made, and none of the other FWN scripts for Max, support smoothing groups / hard edges. So if you have large polys next to each other at a steep angle you'll have the same problem with the default edge angle smoothing. To workaround you can either break the edges or add an extra bevel. Either case adds verts to the final output, but so do smoothing groups. In general, you are at a lower vertex count using FWN instead of smoothing groups.
    • My FWN tool does a Re-triangulate operation before calculating the normals. This gives a smoother shading result especially if your model has ngons or non planar quads. But if there is a specific edge you don't want turned you need to remember to connect the verts.
    • 3ds Max really wants to not use explicit normals. If you collapse the modifier and try to edit, the shading explodes. It's best to use the remove button on my tool, or delete the modifiers.
    As for LODs I haven't really had a problem. Unless you are creating a normal map per LOD model it won't be synced anyway.
  • monster
    Offline / Send Message
    monster polycounter
    As I was typing the previous reply I had an idea to get smoothing groups to work with FWN! :awesome:
    I updated the script and it seems to work well.

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    monster said:
    As I was typing the previous reply I had an idea to get smoothing groups to work with FWN! :awesome:
    I updated the script and it seems to work well.

    One of the best posts I've seen here. :) Brilliant!
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    We use it in production, but only on some certain things, because as others mentioned, LOD-s are hard to make especially if you don't pre-plan. So we rather go with support loops, because with that, making LOD is very easy, and use FWVN when LOD is not needed. Other than the lod creation issue, I don't see any problem with it.
  • demilich
    Offline / Send Message
    demilich polycounter lvl 8
    I've used in production on multiple titles. In my experience with face weighted normals the script I used to apply custom mesh normals allowed me to keep my smoothings groups. But by using face weighted normals you can also reduce the amount of smooth groups since face weighted normals reduces the amount of gradient shades on the lowpoly mesh and baked normal map. It also made LODs easier because by automating a script you can re-apply the script to every LOD you make to reapply the custom mesh normals.
    In 3ds max everytime you edit a mesh with custom mesh normals they break.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    I kindof see them as a blessing and a curse.

    On one hand, it is pretty damn great that Maya has the option (well, the 3 options actually) without the need for any third party script ; but on the other hand, the fact that it is enabled by default and without warning is a pretty terrible idea. Many users are not even aware of what's going on, and it definitely creates issues when working remotely/exchanging files outside of native  .ma

    However, in the controlled environment of a studio I would see no reason to not use them (either in Max/Blender with a script, or in Maya as a core feature) but only if and only if a very specific checklist of things to be aware of is clearly established by the leads.

    As for the topic of file formats holding them well, it seems like FBX is doing a good job, although unlike Maya it is probably not its default behavior, meaning that indeed things could end up being locked on re-import. I'd say proceed with caution, and make sure to prepare a test asset making potential issues VERY obvious.


  • Mirbobo
    Thank to all of you for your replies, this helps me quite a lot !

    @monster , do your character artists mainly use it to reduce the gradients of a normal maps or on characters that don't use normal maps at all? I've found less information on how it is used on characters overall. Also thank you for the script, I'll be testing it out later today.

    I'd also be interested to hear if anyone has used fvn on mobile titles? I don't really see any issues there, but if someone has first hand experience it would be greatly appreciated.

  • throttlekitty
    Offline / Send Message
    throttlekitty ngon master
    pior said:
    I kindof see them as a blessing and a curse.

    On one hand, it is pretty damn great that Maya has the option (well, the 3 options actually) without the need for any third party script ; but on the other hand, the fact that it is enabled by default and without warning is a pretty terrible idea. Many users are not even aware of what's going on, and it definitely creates issues when working remotely/exchanging files outside of native  .ma
    I just wanted to point out that which type you're using is set in the Maya preferences (or overridden by asset). It does mean the user needs to be aware of it still, but it doesn't need to be default.
  • monster
    Offline / Send Message
    monster polycounter
    We use it on everything since it's typically nicer to look at FWN models. You were wondering about mobile games, and I think FWN work best when you can't use a normal map. In the example below notice how I added polygons, but the result in engine is a lower vertex count. And lower vertex counts is all we really want on mobile games. :)



    The next step for calculating FWN for me is to adjust the face weighting for faces that are adjacent and planar. So instead of Face Weighted Normals you have Planar Weighted Normals. FWN has been working well enough for me, so I haven't really put the work into it. And there is a script floating around here that sets vertex normals to face normals which people use to spot clean their normals. It works well enough for now.
  • oglu
    Offline / Send Message
    oglu polycount lvl 666
    maybe its harder to create lods cause you have to plan how your lod will work...
    but they are much cleaner... in a weighted area you can delete nearly everything and the object(normalmap) will look the same...
  • riley_83
    Offline / Send Message
    riley_83 null
    Hey
    I was wondering if any of you guys had experience importing a mesh with weighted normals into Unreal? I get an error saying mesh has degenerate tangents, which I don't get if the normals havent been adjusted. Can't seem to find much about it on the tinterwebs.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Make sure import normals and tangents is selected on the static mesh import settings. 
  • Maddog4america
    Offline / Send Message
    Maddog4america polycounter lvl 5
    Making Lods on Fwn takes additional steps, and can be a little time consuming if you dont plan ahead.    I find the best results by collapsing bevels first, and re-weighting/ hardening the new edges as you go.   its all about managing the normals. Otherwise you will see the shading errors when the lods pop. 
  • marks
    Offline / Send Message
    marks greentooth
    Lessons learned from tearing my hair out for 2-3 years dealing with this on Alien : 
    • Authoring LODs can be a nightmare - we ended up authoring 100% of LODs by hand. Artists naturally hated this. We tried using automated solutions to generate the LOD - they did not work well (at all) with the kind of sparse geometry we were using.
    • We found that LOD popping was very noticeable on chamfered corners and edges.
    • You'll get a lot of value from educating the art team that just because "it's the same amount of verts" doesn't change the fact that you're drawing tons more triangles, and drawing triangles is expensive.
    • Custom tooling is almost a necessity. 
    Feel free to PM me if you have any specific questions.
  • MisterSande
    Offline / Send Message
    MisterSande polycounter lvl 8
    Love weighted normals myself ! In blender 2.8 there is a great modifier with different weighting options. When exporting select "face" weights and voila; left to right; flat shading, Soft shading(32deg), weighted normals.



    @marks , its a bummer there is no automated process to generate LOD's + generating new weighted normals. Maybe Blender 2.8 could come in handy in the future (?).
  • Maddog4america
    Offline / Send Message
    Maddog4america polycounter lvl 5
    HardSurface LODing is tricky business.   I would love a solution that sped up workflow on this. 
Sign In or Register to comment.