Jump to content

How could I force point normals to facing to a correct direction?


Masoud

Recommended Posts

Hello;

Please take a look at image bellow (and attached hip file).

I would like to expand boundary of a flat geometry  (without adding any new points), so I tried to use Peak SOP. The problem is I can't align point normals to a right direction.

Normals.hip

Normals.jpg

Edited by Masoud
Link to comment
Share on other sites

Here  is  how  I  have  handled  that  in  the  past.  Use  a  tube  or  ring  around  the  exterior  and  transfer  the  normals  from  the  outer  object  to  the  inner  one.

Untitled-1.jpg

After  looking  at  the  image,  I  guess  that  is  not  right  either..?

ap_Normals.hiplc

Edited by Atom
Link to comment
Share on other sites

On 2/23/2019 at 4:58 PM, Atom said:

Here  is  how  I  have  handled  that  in  the  past.  Use  a  tube  or  ring  around  the  exterior  and  transfer  the  normals  from  the  outer  object  to  the  inner  one.

Untitled-1.jpg

After  looking  at  the  image,  I  guess  that  is  not  right  either..?

ap_Normals.hiplc

 

Hi "Atom"; normals are not correct.

Link to comment
Share on other sites

On 2/23/2019 at 5:09 PM, Atom said:

What  about  something  like  this?

Use  a  polyextrude  to  generate  vertex  normals,  then   use  a  wrangle  to  throw  away  the  newly  extruded  points?

Untitled-1.jpg

ap_Normals.hiplc

 

I don't want to change geometry topology (I would like to keep point numbers intact).

Link to comment
Share on other sites

This seemed like an interesting VEX challenge and I wanted to give it a go :)

 

Searched for a solution and found this https://stackoverflow.com/questions/14066933/direct-way-of-computing-clockwise-angle-between-2-vectors

Used that in a wrangle node to determine if a corner is convex or concave and added some other stuff and so far it seems to work.

For now, the solution works only for closed curves and treats them as 2D shapes on a XZ plane.

compute_normals.png

compute_normals.hiplc

Edited by berglte
  • Like 4
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...