Did a post recently about nice normals for inflating and deflating mesh inside #Houdini. @PaleoPixels gave the suggestion to do it with vex and so I did... All I can say is, what a great learning experience. You can find the code in the description, enjoy :) @sidefx@sidefxlabs
//Get point position and set neighbour directions
vector pos1 = point(0,"P",@ptnum+1);
vector pos2 = point(0,"P",@ptnum-1);
vector dir1 = normalize(pos1-@p);
vector dir2 = normalize(pos2-@p);
//Apply angles to normal based on cross-product direction
vector cproc = cross(dir1,dir2);
float up = cproc.y;
if(up > 0){
v@N = ang2;
}else{
v@N = ang1;
}
• • •
Missing some Tweet in this thread? You can try to
force a refresh