LFX Posted September 14, 2010 Share Posted September 14, 2010 (edited) 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 September 14, 2010 by LFX Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted September 14, 2010 Share Posted September 14, 2010 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. Quote Link to comment Share on other sites More sharing options...
edward Posted September 15, 2010 Share Posted September 15, 2010 Just use a Facet SOP to disconnect all your polygons and then post-compute point normals. primNormalsOnPoints.hipnc Quote Link to comment Share on other sites More sharing options...
LFX Posted September 15, 2010 Author Share Posted September 15, 2010 (edited) 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. normalToPoint.hipnc Edited September 15, 2010 by LFX Quote Link to comment Share on other sites More sharing options...
petz Posted September 15, 2010 Share Posted September 15, 2010 you can use a ray-sop for this. petz normalToPoint1.hipnc Quote Link to comment Share on other sites More sharing options...
LFX Posted September 15, 2010 Author Share Posted September 15, 2010 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! Quote Link to comment Share on other sites More sharing options...
petz Posted September 15, 2010 Share Posted September 15, 2010 (edited) 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 September 15, 2010 by petz Quote Link to comment Share on other sites More sharing options...
LFX Posted September 15, 2010 Author Share Posted September 15, 2010 Got it, don't bother! After switching to 'minimum distance', I only get the advantages. Problem solved - I'm happy. Quote Link to comment Share on other sites More sharing options...
edward Posted September 16, 2010 Share Posted September 16, 2010 Funny, the your .hip file crashed Houdini immediately. But I see what you mean. It didn't for me. There's a new H11.0 production build so updating might help. Quote Link to comment Share on other sites More sharing options...
WaldoB Posted February 22, 2015 Share Posted February 22, 2015 Create a AttribWrangle, set it to points and use this code: int vert = vertexpoint(@OpInput1, @ptnum); int prim = vertexprim(@OpInput1, vert); v@N = prim_normal(@OpInput1, prim, 0, 0); 1 Quote Link to comment Share on other sites More sharing options...
Rainroom Posted February 24, 2015 Share Posted February 24, 2015 You can also use xyzdist along with PrimAttribute inside a vopsop to get it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.