Jump to content

Primitive Normals?


Recommended Posts

Hi all,

I have 2 questions :

1. Why can't we see face (primitive) normals as an attribute on the details view?

2. How can I change that normal? I know how to manipulate my point normals, but I don't know how to do the same thing with primitive normals? I thought maybe primitive sop can do it, but apparently I was wrong!

I appreciate your help in advance.

Link to comment
Share on other sites

Sure there is, you just have to fix the geometry, not the normals. How are they screwed up? If they are facign the wrong direction the Reverse sop will flip the vertex order around, also the Facet Sop has an orient polygons toggle which can help if you have a mixture of correct and inverted faces.

Link to comment
Share on other sites

Orient Polygons works if the primitives with mixed normals are connected together

it will make sure that normal orientation is continuous over all polygons in each connected geometry piece

and it takes first polygon of each piece as a direction reference

so if they seem to be connected and it's not working you may try to use Fuse SOP before

or if there are whole connected pieces that have inverted normals you may consider Assemble SOP to create groups from connected pieces and Reverse SOP on groups you want to invert

but if you already have point N attribute you may also check Post-Compute Normals on the same Facet SOP to update them

if you have vertex N atttribute you may need to delete it (attribute SOP delete parm) and create new one with Vertex SOP after orienting polygons (instead of using Post-Compute Normals which would create point N)

Link to comment
Share on other sites

Thank you guys.

Well, it was actually just a few bad primitives, the problem was actually not the normals, it was the topology, it was a bit messy model, but very simple, so I just fixed those primitives by some point editing points. But I learned some new stuff anyway.

Thanks again :)

  • Confused 1
Link to comment
Share on other sites

as it's been told ptimitive normal is not an attribute so it cannot be accessed by $N*

but if you have you custom primitive N attribute it can, but that will not be used as normal for shading

to base something on primitive normal you can do following

Initial Geometry

  |

Facet SOP (unique points, post compute N)

  |

Attribute Create (primitive N float3, value: $NX, $NY, $NZ)

this will use average of point N from Facet SOP to set primitive N and since all points are unique, that N should be equal to primitive normal

then just Attribute Copy your primitive N attribute to your Initial Geometry and you can use it for whatever you want

or just use above Attribute Create and Copy to create other attribute based on $N* directly

Edited by anim
Link to comment
Share on other sites

  • 6 years later...

Hi guys,

I see that you already discussed that topic but unfortunately I am still struggling to overcome my problem. There is only one primitive which is faceing wrong direction. Its primitive with number 1800 which was created with sweep node (I attached file). I'm very new to houdini so I was wondering if it is possible to overcome without using VEX and creating new attribute ( maybe I made some mistakes before while creating curve). Is there any way to change its orientation to (0,-1,0) ?

procedural_tube_uv.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...