Archived post by SniperJake945

“`c //put this shit in a prim wrangle yo int h = primhedge(0, @primnum); int temp = h; int start_pt = hedge_srcpoint(0, h); int new_pts[]; float depth = ch(“depth”); float inset = 1 – ch(“inset”); do{ int pt_a = hedge_srcpoint(0, h); int pt_b = hedge_dstpoint(0, h); vector p_a = point(0, “P”, pt_a); vector p_b = point(0, “P”, pt_b); //inset p_a = (((p_a – @P) * inset) + @P); p_b = (((p_b – @P) * inset) + @P); p_a = p_a + v@N * depth; p_b = p_b + v@N * depth; int npt_a; if(h == temp){ //only runs on our first iteration npt_a = addpoint(0, p_a); append(new_pts, npt_a); }else{ //our current starting point is our previous destination point npt_a = new_pts[len(new_pts) – 1]; }
//add in our destination point, if we’re not back at the start int npt_b; if(start_pt != pt_b){ npt_b = addpoint(0, p_b); append(new_pts, npt_b); }else{ npt_b = new_pts[0]; } //add side walls addprim(0, “poly”, npt_b, npt_a, pt_a, pt_b);
h = hedge_next(0, h); }while(h != temp); addprim(0, “poly”, new_pts); “`
this is polyextrude with the `divide into` toggle set to individual components. if you want to do the connected components stuff, its a lot more effort, but i believe in you. believe in yourself <:meowpensivepray:814858736497590302> also this requires prim normals, so make sure u add those with a normal sop

Archived post by SniperJake945

yeah they just go away

cuz like there will be no zero crossing most likely

if the inset is too small, and the resolution isnt high enough ull get artifacts though

so if u want realllly thin borders ud have to crank the resolution to like 1000 frequency on the sphere

lemme save this out one sec

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20211108/04/21/marching_squares_country_borders.hip