Jump to content
ehsan parizi

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.

Share this post


Link to post
Share on other sites

Primitive normals are not actually an attribute. They are derived information that is calculated based upon the vertices that make up the primitive. As such, they cannot be modified.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

also the Facet Sop has an orient polygons toggle which can help if you have a mixture of correct and inverted faces.

That's exactly the case. there are just a few primitives facing backwards! I tried the Orient Polygons in the Fact Sop, but it didn't work out!

Share this post


Link to post
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)

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

here's another question, which is kinda relative :

Can we read the primitive's N to make an attribute based on it! I tried, but looks like it's either impossible, OR it's not called $NX,Y and Z!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

can´t you use just the prim-expression for that?

petz

I guess you can, sorry for overcomplicating things :)

so just do as petz said

Attrib Create primitive vector attribute

and values to

prim(opinputpath(".",0),$PR, "N", 0 )

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Use the "Normal" sop, set it to primitives and then you have your normals on primitives, and it can be seen in the spreadsheet.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×