magneto Posted August 4, 2013 Share Posted August 4, 2013 Hi, Imagine 4 lines that are positioned to appear like a quad. I am trying to generate normals that look like the image below: Polyframe only generates tangents correctly, otherwise it's all 0,0,0. I tried using 1 line that's all connected, and then Polyframe generates half of the normals correctly, the other half is set to world Y. So not sure how to do this procedurally. Any ideas? Thanks Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted August 5, 2013 Share Posted August 5, 2013 should_work_on_arbitrary_position.hip 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 5, 2013 Author Share Posted August 5, 2013 Thanks mantragora, that's novel idea I wonder if it can be done without scaling to 0 and then fusing to get the center? I think it might be possible using the AttribWrangle to create primitive attributes and then demote it to point attribs. Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted August 5, 2013 Share Posted August 5, 2013 should_work_on_arbitrary_position_2.hip 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 5, 2013 Author Share Posted August 5, 2013 (edited) Thanks mantragora, I did it with the AttribWrangle using this code: vector center = ch("center");@N = @P - center;[/CODE]by adding a center parameter to the node using the centroid expression. After that just demoted N to point normals. Pretty slick Edited August 5, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
yongbin Posted August 8, 2013 Share Posted August 8, 2013 (edited) how about this? N_from_connected_line.hipnc Edited August 8, 2013 by yongbin 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 8, 2013 Author Share Posted August 8, 2013 Thanks yongbin, that's also an interesting way to solve it Quote Link to comment Share on other sites More sharing options...
hombrezoo Posted September 27, 2019 Share Posted September 27, 2019 (edited) Hello guys, I may be a little late to the party, but here is my contribution as I was looking for this exact same thing I found an extra step to also get the normals pointing outwards from corners to point in its average direction as well. Hope it helps. P outwardNormals.hipnc Edited September 27, 2019 by hombrezoo better grammar, I guess. 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.