Detecting Normals

julvrjulvr Posts: 0
edited December 1969 in Carrara Discussion

I'm used to the Carrara inteface, and so I'm using it for doing 3d modelling for 3d printing. The problem I'm running into is that every so often the normals of my model aren't right -- I can have two adjoining faces, one with normal facing one way, and one facing the other. I'd like to check my models before I export them, as this would save some time. Is there any good way to detect which side of a polygon a normal lies on?

Thanks

John

Comments

  • 3DAGE3DAGE Posts: 3,311
    edited December 1969

    Hi John :)

    There's a set of options in the Interactive renderer settings (see pic)

    you can display the normals for the vertex or facets and adjust the size.

    The Normal direction depends on the way you create a polygon, ...Anti-clockwise, you're facing Up, or Inside, ....clockwise , you're facing down, or Outside. (see pic)

    if you have a couple of poly's which are facing the wrong way, the best solution is to delete them and rebuild those facets.

    Carrara has an option to reverse the normals, but it effects the entire object.

    Hope it helps :)

    create_normals.jpg
    681 x 567 - 69K
    show_normals.jpg
    618 x 789 - 89K
  • marius_ifmarius_if Posts: 48
    edited December 1969

    As Andy (3Dage) says,
    you can reverse normals for the entire mesh/object.
    I assume if you would select that object and, enter 'edit mode' you could manually select areas of that mesh.
    With that area selected, do 'reverse normals' command from menu, it should reverse only selected area normals.

    I hope it helps,..

  • de3ande3an Posts: 915
    edited November 2012

    marius_if said:
    I assume if you would select that object and, enter 'edit mode' you could manually select areas of that mesh.
    With that area selected, do 'reverse normals' command from menu, it should reverse only selected area normals.

    I'm afraid that assumption is incorrect.
    The "Reverse Polygons Normal" command always reverses all of the normals, regardless of the polygons selected.

    Post edited by de3an on
  • marius_ifmarius_if Posts: 48
    edited December 1969

    I must say I was wrong,
    Yes D3ean, you are right, I've tested and, indeed, all normals are affected just as you've said before.
    I do appologize for the inconvenience,
    selecting an area and doing reverse normals doesn't change normals for selected area but for the entire object as D3an has said.

  • de3ande3an Posts: 915
    edited December 1969

    I'm also noticing that it seems to be impossible to create an object with inconsistent normals using Carrara's vertex modeler. As soon as you weld one polygon to another, the normals flip automatically to keep then unified.

    Perhaps if a model with inconsistent normals was imported from another modeler (such as Hexagon) you could end up with this situation in Carrara. Otherwise, I've not found a way to forcibly flip a single normal in Carrara so that it doesn't conform to the rest. However, deleting and recreating an offending polygon, either clockwise or counterclockwise, should force it to conform to the rest of the normals.

  • stem_athomestem_athome Posts: 518
    edited December 1969

    Personally I think the "Reverse polygon normals" in Carrara is misleading, as it is actually performing a "Unify polygon normals" function.

    Maybe you would of noticed. If you import a model with non-uniform polygon normals, view the normals in the Assemble room, it does show the different normals directions. But if you then go into edit mode(in the assemble room) all the polygon normals are made unified. If you then simply exit edit mode, the normals are non-uniform again.

  • GFHELGFHEL Posts: 24
    edited December 1969

    Very interesting.

    Thanks John for bringing this up.
    Thanks 3DAGE for showing the connection between polygon drawing and resulting normals.
    Thanks marius, de3an, Steve for highlighting the reverse functionality.

    I remember when creating 3D models from 2D CAD drawings in 3D Studio MAX R3 some ten years ago, I had lots of trouble with mixed normals. The reason was that CAD engineers don't have to care which way round they draw a polygon. Even today in 3D, because CAD software always shows both sides of a facet. MAX had of course a "reverse normals" function, but it only worked on selected facets, and there was no unifying mode then.

    So I am glad to see that Carrara fixes flipped normals nearly automatically, and that "Reverse polygon normals" indeed unifys them.

  • edited December 1969

    Personally I think the "Reverse polygon normals" in Carrara is misleading, as it is actually performing a "Unify polygon normals" function.

    Ok so this thread is pretty old now, but since this is the only reference I have found about carrara's strange behaviour with normals, I thought I should write it down here anyway, just to help others find the answer I was searching.

    Steve, you were right, "reverse polygon normals" does not reverse them, but instead UNIFY THEM, however, it's not that simple!
    I was turning mad for 2 days about this because exporting my models into Unity engine showed broken normals.

    TO FIX BROKEN NORMALS ON IMPORTED OBJECTS:

    1- import as VERTEX PRIMITIVES
    2- select the imported object and change it's properties: "VIEW: BACKFACES -> HIDE" (in the properties panel up right)
    3- enter in edit mode from the assembly room (click on the little wrench UP LEFT on the screen )
    4- on "model" menu click on "REVERSE NORMALS" --- 2 TIMES ! ---
    5- come back to assembly mode by clicking on the little hand icon at up right.

    if your model still has broken normals, repeat the operation until it gets fixed. (I had to make this 2 times to fix my model)

    I hope this can help. :)

  • PGrePGre Posts: 95
    edited December 1969

    It is intended that all normals for a particular polymesh will face the same direction and the reverse polygon normals tool will indeed toggle them back and forth. I have found that after some complex operations that the normals for a polymesh may become inconsistent and like visionastral2 says, flipping them twice will usually fix the problem. This is because Carrara reprocesses the normals for all polygons in the polymesh to make them consistant and typically, after the first application, they end up facing inward toward the center of the object. The second time you are just flipping them all outward again.

    Face normals are perpendicular to the polygon face they represent and always resolve to triangles. They are calculated using the three vertices that make up the triangle. Draw a quad in the vertex modeler and turn on face normals in the interactive renderer and you will see two white-line normal indicators even though, technically you only drew one polygon.

    Try drawing two triangles on the same plane (not connected in any way) in the vertex modeler. Draw the first in a clockwise direction, and the second one counter-clockwise. You will see that the normals face in opposite directions. Carrara can be set to not draw triangles who's normals face away from the camera. Game engines use this technique (backface culling) to speed up rendering by not drawing triangles that would not normally be visible to the player.

    Vertex normals are calculated for smooth surfaces by averaging out the normals of all faces adjacent to the vertex. A creased edge will have vertex normals that are perpendicular to the faces along the creased edge. Try viewing the vertex normals for a sphere before and after creasing the edges. It will make sense visually.

    If your model looks weird rendered or on a shaded preview it could mean you have broken or inconsistent normals, so do check them. Broken or inconsistent normals can also mean deeper problems in the geometry of your mesh that you might not see in a wire-frame view or without moving individual vertices. I run into this with objects created/converted outside of Carrara and with complicated mesh operations.

    If you need to intentionally reverse normals on specific polygons within a single polymesh select the desired polygons and use the detach polygons menu option. Detach polygon does not create a new polymesh separate from the original vertex object (like a copy-paste operation would do). it just "unshares" the vertices and edges of the selected polygons so that you can perform operations on them without affecting the larger polymesh. You can then go ahead an flip the normals on your detached portion of the polymesh.

    Personally, I'd like to see a hot-key to toggle the normals display. I'ts a pain to have to pull up the interactive renderer dialog and you usually don't need to keep normals always displayed.

    Pgre

  • RoygeeRoygee Posts: 2,247
    edited December 1969

    Interesting explanation and spot on:)

    Fully agree about the difficulty in detecting flipped normals - when you have a dense mesh, it is really difficult to spot those little arrows.

    I made a feature request some time ago that they do something like Animator - front-facing normals are yellow when selected and back-facing blue, so you can tell at a glance - and flip individual normals.

    Just incidentally, you can have separate textures on each side - very handy for making inner lining in clothing without having to double-up.

Sign In or Register to comment.