Results 1 to 5 of 5
  1. #1

    Blender equivalent of Maya's "set to face"?

    I have a model that looks fine in Blender, but as soon as I export it as an alembic and open it in another package (in this case Maya or Clarisse) I get some weird looking shading.

    I can get the same look in Blender if I turn on "Auto Smooth".

    So far the only way I can figure out how to fix it is to open all of my alembic exports from Blender in Maya and run "set to face". This fixes the issue such that I can open the object in Clarisse and get correct looking items.

    I have tried going into edit mode and running "set normals from faces" but it either does not work or it does something different than Maya's "set to face".

    Maya's "set to face" apparently does the following:

    "The edges surrounding the vertex face are hardened if it is possible to do so, and the normals unlocked"

    To be honest, I have no idea what that means. I just know it works.

    Here is what it looks like in Blender with "auto smooth" enabled.
    Click image for larger version. 

Name:	blender_normals.png 
Views:	5 
Size:	422.9 KB 
ID:	520963

    And here is what it looks like in Maya when I export it. Note, it looks like this when I export it as an alembic no matter if I have "auto smooth" enabled in Blender or not. "Auto Smooth" is just the only way I can see the same thing in Blender.

    Click image for larger version. 

Name:	maya_normals.png 
Views:	5 
Size:	67.0 KB 
ID:	520964

    And here is how it looks after I run "set to face" in Maya.

    Click image for larger version. 

Name:	maya_normals_fixed.png 
Views:	6 
Size:	23.2 KB 
ID:	520965

    Ideally I would not have to pass through Maya to export my model. Does anyone have any thoughts how something similar would be accomplished in Blender?

    Thanks!
    New to Blender and even newer to modeling. Trying to learn by doing: https://blenderartists.org/forum/sho...orcycle-so-far



  2. #2
    Im not super familiar with Maya but i do at least vaguely know blender. The issue is that everything has smooth light applied, which is not a bad thing as most/everything should use it. The problem comes though when you have smooth lighting between 2 sharp edges, because the program tries it hardest to 'smooth' that light to make it look like a curve, which of course it cant do so you triangles and other annoying glitches come up because of it.


    Again im not familiar with Maya, but i think the equivalent function here is the edge split modifier, which admittedly can be damm obtuse sometimes to figure out how to first get it to work manually.


    First up Default Mesh no modifier same issue
    Click image for larger version. 

Name:	srPdSHD.png 
Views:	4 
Size:	286.9 KB 
ID:	520966


    Then we add Edge split with a automatic angle
    Click image for larger version. 

Name:	naOLRGj.png 
Views:	6 
Size:	147.9 KB 
ID:	520967

    Which fixes the issue, with that modifier you can set it to work with a edge angle (so a edge with two faces angle greater then the angle listed will be split), or set it manually using 'sharp edges' which requires that you can into Edit mode of the object, go to the Shading/UV tab on the right side, and change the edges you want from 'Smooth' to 'Sharp'. Keeping in mind 'Smooth' doesn't effect geometry and literally just means 'will not be effected by Sharp edges on the edge split modifier'.



  3. #3
    Member Richard Culver's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    2,581
    Yeah "Set to Face" in Maya is basically no smoothing in Blender. Or "Flat." It is not the same as Edge Split -really. Auto Smooth would refer more to Maya's default smoothing routing which by default is set to find sharp corners. Forget how to set that manually in Maya as it has been a while.



  4. #4
    Hey there, thanks for the replies. Sorry, I was stuck on another project for a few days.

    I've been doing a bit of research as to what Maya is doing with its normals when I use "set to face". This may all be obvious to others, but I am learning it for the first time here.

    Apparently, vertices can have more than one normal (one per face that it is attached to). When I create a cube in Maya, each vertex gets three normals, and each of these normals points in the same direction as its face normal. This is also what is done when I run "set to face". It "unlocks" the vertex normals from each other (so they don't all point in the same direction) and then resets them to point in the same direction as their face normal (for the face they are attached to). If there are three attached faces, you get three normals. If you have 7 attached faces, you get 7 separate normals.

    If I create a cube in Maya, it automatically gets these separated normals. It looks like this:

    Name:  cubeFromMayaWithUnlockedVertexNormals.jpg
Views: 46
Size:  20.4 KB

    If I export this as an OBJ, and then open it in Blender I can see this by going into edit mode, and making sure that the Normals are on and showing: Display vertex-per-face normals as lines (purple lines in the following screen shot) AND Auto Smooth is turned on in the Data panel (they don't display if Auto Smooth is off, and the shading gets weird again - kind of polar opposite of geo created directly in Blender).

    Click image for larger version. 

Name:	cubeFromMayaInBlenderWithUnlockedVertexNormals.jpg 
Views:	3 
Size:	34.1 KB 
ID:	521121


    And if I edit the OBJ file, I can see that I have 8 vertex points and 24 vertex normal entries.

    If I export this cube (originally from Maya) from Blender as an OBJ and then open that file in a text editor, the vertex normals will have been collapsed into a single normal per vertex (but Maya seems to open it just fine and still show per-face-vertex normals - don't know why - Blender also is able to re-import this OBJ and still know that it has per-face-vertex normals. Which is confusing...).

    But if I then export this cube from Blender as an Alembic, I get some weird normals (as seen in Maya when I open it up):

    Name:  vertex_normals_messed_up_from_blender.jpg
Views: 46
Size:  16.8 KB


    When I open this same Alembic back up in Blender, it comes in with odd shading, no per-face-vertex normals, but just averaged vertex normals.

    If I create the cube in Maya (with its per-face-vertex normals) and save it as an alembic, and then import it into Blender, I still have the odd shading, and just a single, averaged vertex normal per vertex.

    If I export the cube from Blender as an alembic, but I turn off "Normals" and then open it up in Maya, I get averaged normals (like I would see in blender) but at least they are not broken like in the image above.


    So my theory is this: The Blender alembic exporter cannot handle per-face-vertex normals. If I have "Normals" turned on it just exports some very broken normals. If I leave them off, then Maya recalculates them as averaged normals (i.e. rebuilds them by averaging the normals of the adjoining faces). I still don't know how I would generate per-face-vertex normals in Blender, but I don't think that I would be able to export them as an Alembic anyway.

    So for now I will stick to using Maya as an intermediate.



    *I suppose the edge split modifier would work, but since it actually breaks the model up into individual, disconnected faces, it feels a little heavy handed. For a building it probably doesn't make a difference. But I don't like the idea of having models that have duplicate verts... we'll see.

    Thanks for the responses though!
    New to Blender and even newer to modeling. Trying to learn by doing: https://blenderartists.org/forum/sho...orcycle-so-far



  5. #5
    Member Richard Culver's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    2,581
    I also have used Maya on a lot of projects as well as Alembic in and out of both Maya and Blender. What I have done before when I had an issue with normals in Maya as you see above, the blackness, is to Unlock the normals in Maya. That sets it all back again.

    I find that you have to treat normals in a unique way between apps. Specifically in Blender and Maya. It is a "when in rome" kind of thing. Most issues I have been able solve by using commands in either app once the geo is there.

    In Maya those commands are as you know Average, Set to Face and so on. But Unlock Normals often has to be used to get any of those to work properly on an imported object.

    In Blender there is Auto Smooth. But also below that down in Geometry Data, click on clear Custom Split Normals Data. When importing meshes this can come with data. Clearing that unsticks it and then you can use the usual tools in Blender to make normals appear correct.

    See if any of these tips help in your experiments.

    And I don't think you need Edge Split modifier honestly. It is a bit of a brutal approach you don't need



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •