Home Technical Talk

I don't understand how to face weight normals. Can someone help?

polycounter lvl 8
Offline / Send Message
CodeferBlue polycounter lvl 8
So I've tried this in different software and I end up getting the same results more or less, so it has to be that I'm doing something wrong and I don't understand how face weighting works.

This is my mesh:

I've bevelled all hard edges. Now when I go to face weight the vertex normals of the mesh, be it using Modo's face weighting tools or even Blenders face weighting modifier, I get less than ideal results in certain areas:


What am I doing wrong? Depending on the material I throw on to the object in UE4 it may look okay but if I throw any metal on there, that weird shading will be visible. When I'm face weighting I set smoothing to 100. There's a few tutorials showing how to face weight a mesh in different software but non of them really address strange shading like this. Is it that face weighting doesn't work on round/curved surfaces?

Replies

  • rollin
    Offline / Send Message
    rollin polycounter
    Isn't this what you would expect? If you want something to be smooth then face weighting is probably not what you would want to do. So in this case of the intersection you would not face weight in loop direction but only towards the walls.. Or with the cylinder towards the caps but not along the round surface

    You want to use it to improve the shading of certain edges not a magic bullet you throw against everything. 
  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    How would I go about doing that? In my experience when I face weight certain faces, it tends to look weird. Not only this but I've only ever seen it done this way in which face weighted normals is applied to the entire object and not individual components so I'm new to this
  • gnoop
    Offline / Send Message
    gnoop sublime tool
    Should be perfectly fine by my records.   But I don't use Unreal .   

      I suggest to visualize vertex normals and check if they are ok.     Also check you don't have doubled vertexes accidentally and your weighted normal modifier is  the last operation.    If you triangulate for export after weighting normals it may totally mess it .

    ps. Actually just checked and triangulate modifier with "keep normals" checked in looks perfectly ok after weighted normals modifier  . Giving perfectly fine highlight spot   on cylindrical forms in Eevee
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Yep, basically you would weight only cetrain faces or certain areas. The rule is to have the normals of the FLAT faces perpendicular to their face.
  • PolyHertz
    Offline / Send Message
    PolyHertz polycount lvl 666
    Any system that modifies normals across a whole mesh automatically based on face size (ie. 'weight') is a hack, meant for getting quick results without worrying too much about the details / quality. To get good results you need to directly specify the faces yourself.

    In Blender select the faces you want the normals to be weighted towards (ie. the faces that are NOT the bevels) then go to:
    Mesh > Normals > Set From Faces
  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    Thanks for the help guys! I understand now. This is the cleanest result I've ever gotten with face weighting:

    Something I've noticed which is when there are a lot of dense faces in a curve, I get this:

    Is it possible to get a cleaner result in places like this? Either way its a very small nit picky thing that nobody will notice and I'm happy with the results. My only gripe now is that I wish I could face weight properly in Maya. I have to use something external like blender or modo which means I have to learn the basics of that software. I've tried using some scripts for Maya but they never give me clean results, even if I specify which faces I want the normals to be weighted to. Anybody here have any experience with face weighting in Maya that could point me in the right direction?

    Edit:
    Example, AMT Normal Tools is a script that should be able to do this. So I select the faces I want:

    Then when I hit the 'Weight Face Normals' button this is the result I get:

    The tool even says I can select multiple faces and face weight them but I still get a mess.
  • PolyHertz
    Offline / Send Message
    PolyHertz polycount lvl 666
    Not 100% sure on Maya, but I believe you need to unlock the normals first (Mesh Display > Unlock Normals).
  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    Thanks PolyHertz. I've given it a go but I still get strange shading:


    Tried it a few times to make sure I'm doing it exactly as you've written but I get the same result. I tried it on another object too and although the results are okay I still see weird shading here and there. Going to give this same object a try in Blender

    Edit:
    Getting the same result in Blender so I assume something is wrong with the geo? I know the geo isn't ideal and its full of ngons but I thought face weighting wouldn't find that an issue?
  • PolyHertz
    Offline / Send Message
    PolyHertz polycount lvl 666
    Yea, ngons along the side of bent bevels produced bad results. Generally you'd want to change the shape a bit so that the bend starts just above the inner shapes corners, and having a cut where the bend starts so the ngon remained flat. But if you didn't want to do that you'd probably have to make quite a few more cuts from the inner to outer bevel (and make sure they're level with the bend).
  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    I see. So curved ngons will produce bad results because that one big non-quad face isn't enough information to shade the curved geometry. 
    PolyHertz said:
    But if you didn't want to do that you'd probably have to make quite a few more cuts from the inner to outer bevel (and make sure they're level with the bend).
    about what you said at the end, I'm not entirely sure what you mean. Any chance you could throw me a sketch of where the loops would go? I'm learning a lot here and it would be super helpful to visualise this. Thanks.
  • rollin
    Offline / Send Message
    rollin polycounter
    I see. So curved ngons will produce bad results because that one big non-quad face isn't enough information to shade the curved geometry. 

    I would say: too much information - too many differing normal directions.
    You could manually edit the normals to get a better result but it makes more sense to properly model this. All the tips for proper sub-d modeling apply here
  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    So how would I go about properly modelling this object? Aside from what PolyHertz said, which makes sense because the ngon parts would be flat, eliminating the problem entirely. But if I wanted it all curved, what would I do? Would I quad everything up? If so, that would take a very long time for some objects depending on how much I boolean them. I've seen that some people boolean stuff and don't quad everything up and use face weighted normals. I'm wondering how they make that work..
  • PolyHertz
    Offline / Send Message
    PolyHertz polycount lvl 666
    Any chance you could throw me a sketch of where the loops would go? I'm learning a lot here and it would be super helpful to visualise this. Thanks.
    Sure. Basically you just need evenly distributed loops along the bend.
    Here's an example based on the shape you posted above :



  • CodeferBlue
    Offline / Send Message
    CodeferBlue polycounter lvl 8
    Cheers. This info is really useful and I'm going to practice this on different types of curved geo based on the example you've given me. Currently in the middle of a university deadline so I'll have to put it on pause but this should help me out massively when I get back into it! I'm trying to crack down on trimsheets, tileable materials and the FWVN technique. This is what I'm putting all of my learning efforts into:

Sign In or Register to comment.