Jump to content

What's the best way to generate perpendicular normals like this?


Recommended Posts

Hi,

Imagine 4 lines that are positioned to appear like a quad. I am trying to generate normals that look like the image below:

54v9vMf.png

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by magneto
Link to comment
Share on other sites

  • 6 years later...

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 by hombrezoo
better grammar, I guess.
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...