Jump to content

Easy way to get normal from prim to point?


LFX

Recommended Posts

Hey, this one keeps me questioned for a while now. Isn't there a convenient way to get normals from the surface to the points that stick on it, e.g. after a scatter SOP? And I mean not the average thing from point normals - that doesn't work on low poly geometry. Why does the AttributeTransfer SOP only copies from prim to prim? Today I found a solution which involves lines that I copy to the points in question, transfer the normals to their prims and further with a AttributePromote to the points. That's what I call a workaround.^^

Edited by LFX
Link to comment
Share on other sites

Well, if your point count is equal to your primitive count, you could just do inside PointSOP's Normal field:

prim("../myPrimSop", $PT, "N", 0)

prim("../myPrimSop", $PT, "N", 1)

prim("../myPrimSop", $PT, "N", 2)

and that'll get you the primitive normal onto your point.

AttribPromote can do as well, but it all depends on your situations.

HTH.

Link to comment
Share on other sites

Yeah... *cough* - bad example, with the scatter SOP.^^ Didn't know that it has it's own attrib transfer.

My scenario is with a curve, drawn on a polygon sphere.

Second picture is an attempt with unique points and AttribTransfer.

I forgot to clean the scene. The network in question is in the box geo network.

post-4403-128453901373_thumb.gif

post-4403-12845390176_thumb.gif

post-4403-128453905134_thumb.gif

normalToPoint.hipnc

Edited by LFX
Link to comment
Share on other sites

Funny, the your .hip file crashed Houdini immediately. But I see what you mean. It was the ray SOP which I used first, but sticking points to a surface is more convenient with primitive snapping. Anyway, this is a good reason to check out, how far I get with the ray SOP. Thanks!

Link to comment
Share on other sites

Funny, the your .hip file crashed Houdini immediately. But I see what you mean. It was the ray SOP which I used first, but sticking points to a surface is more convenient with primitive snapping. Anyway, this is a good reason to check out, how far I get with the ray SOP. Thanks!

strange! that seems to happen alot!

anyway, i didn´t mean to use the raysop instead of primitive snapping for drawing the curves. but its usefull if you want to import some attributes from the mesh, in your case the normals.

houdini 10 file is attached.

hth

petz

normalToPoint1.hipnc

Edited by petz
Link to comment
Share on other sites

  • 4 years later...

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...