Jump to content

phinnonymous

Members
  • Content count

    1
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phinnonymous

  • Rank
    Peon

Personal Information

  • Name
    Philipp Lambsdorff
  1. Delete points with opposite normals

    Hi, I am a beginner in Houdini trying to make a house generator in Houdini Apprentice. Everything is working fine, but for the roof I need outer Corners and inner corners. The outer corners work fine, but on the inner corners I have issues with getting the points with the correct normals. After getting all the inner points I first tried a fuse, but the normals I got out of that were completely wrong (Maybe I just don`t know how to work with this fuse node properly). As you can see it`s always 3 points at the same position with different normals while 2 of them are exactly opposite, so I tried something different. I created an attribute wrangle and put in this vex code. float xPos = @P.x; float zPos = @P.z; float xNorm = @N.x; float zNorm = @N.z; float comxPos; float comzPos; float comxNorm; float comzNorm; for(int i=0; i < @numpt; i++){ comxPos = vector(point(0,"P",i)).x; comzPos = vector(point(0,"P",i)).z; comxNorm = vector(point(0,"N",i)).x; comzNorm = vector(point(0,"N",i)).z; if(xPos == comxPos && zPos == comzPos){ if(xNorm + comxNorm ==0 && zNorm + comzNorm == 0){ setpointgroup(0,"OppositeNormals",@ptnum,1,"set"); } } } Then I use a blast to delete all points with opposite normals. As you can see in the pictures, the code works for a few points, but not all and I don't know why. I would really appreciate if someone could help me.
×