reeson Posted January 22, 2019 Share Posted January 22, 2019 Hi, can someone help me with cleaning up the geo. The thing is, after dividing the geo, I get some reverse/clipping on primitives. Also when I try to render to disk with ROP Alembic, I get a yellow warning about collision. Also when I import the .abc file into Octane, the geo has some artifacts. Here's my hip file. Cheers! geo_clean.hip Quote Link to comment Share on other sites More sharing options...
Anne Sofie Posted January 24, 2019 Share Posted January 24, 2019 try using a fuse SOP Quote Link to comment Share on other sites More sharing options...
reeson Posted January 25, 2019 Author Share Posted January 25, 2019 Doesn't help. I still get this weird artifacts. Here's the pic. Quote Link to comment Share on other sites More sharing options...
Atom Posted January 25, 2019 Share Posted January 25, 2019 (edited) Yeah, none of the standard cleanup nodes will work for your case. You'll have to write code to detect the overlapping primitives, use the measure sop to determine their area and follow up with a removeprim function to remove the overlapping primitive with the smaller area. Edited January 25, 2019 by Atom Quote Link to comment Share on other sites More sharing options...
reeson Posted January 25, 2019 Author Share Posted January 25, 2019 47 minutes ago, Atom said: Yeah, none of the standard cleanup nodes will work for your case. You'll have to write code to detect the overlapping primitives, use the measure sop to determine their area and follow up with a removeprim function to remove the overlapping primitive with the smaller area. Oh boy, I have some basic coding skills, but this way out of my league. Quote Link to comment Share on other sites More sharing options...
Atom Posted January 25, 2019 Share Posted January 25, 2019 (edited) Here is some basic code that I got to work, I placed both for loop nodes in single pass mode. So only one section of the ring is processed. I haven't figured out to successfully integrate this code to loop over all the primitives in the full object, however. This GIF shows what happens when I toggle the correction code on an off. It's a two step process, one step detects the overlap and marks the offending primitives, then the second wrangle node removes the marked primitives. int is_x_same = 0; int is_y_same = 0; int is_z_same = 0; // Get all primitives int primitives[] = expandprimgroup(0, "*"); //foreach (int currentPrim; primitives){ int currentPrim =11; vector cur_bbox = getbbox_size(0, itoa(currentPrim)); float cur_area = prim(0,"area",currentPrim); //foreach (int testPrim; primitives){ int testPrim =3; if(currentPrim!=testPrim){ is_x_same = 0; is_y_same = 0; is_z_same = 0; vector test_bbox = getbbox_size(0, itoa(currentPrim)); float test_area = prim(0,"area",currentPrim); if (cur_bbox.x==test_bbox.x) {is_x_same = 1;} if (cur_bbox.y==test_bbox.y) {is_y_same = 1;} if (cur_bbox.z==test_bbox.z) {is_z_same = 1;} int i = is_x_same+is_y_same+is_z_same; if (i>1) { // This primitive shares a parallel plane with the current prim. if(cur_area>test_area) { setprimattrib(0,"should_remove",testPrim,1,"set"); } else { setprimattrib(0,"should_remove",currentPrim,1,"set"); } // We have found a match so stop looping over test primitives. //break; } } else { // Skip testing against self. } //} //} ap_geo_clean_v3.hiplc Edited January 25, 2019 by Atom 1 Quote Link to comment Share on other sites More sharing options...
reeson Posted January 25, 2019 Author Share Posted January 25, 2019 (edited) Much appreciated! Or I can just convert to VDB and then back to polygons. Edited January 25, 2019 by reeson Quote Link to comment Share on other sites More sharing options...
Atom Posted January 25, 2019 Share Posted January 25, 2019 If you don't mind losing your crisp edge and increasing your poly count, yes. That will work. Quote Link to comment Share on other sites More sharing options...
reeson Posted January 25, 2019 Author Share Posted January 25, 2019 Yeah...there is a trade off. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.