texturerama Posted August 13, 2020 Share Posted August 13, 2020 Hi, I'm a relatively new user so forgive me if this is a trivial problem I'm trying to sort my mesh according to regions of similar curvature. My aim is to be able to iterate over each region and remesh it smoothly— Ideally, in a way that would preserve boundary points and leave the mesh water-tight. Below is a link to the work of a Houdini artist whose procedure I'm trying to reproduce on my own meshes. Any help or a nudge in the right direction would be much appreciated. I've attached a very simple hip file illustrating what I'm trying to accomplish. Thanks so much! Measured Partitioning_test.hiplc Quote Link to comment Share on other sites More sharing options...
satoru Posted August 16, 2020 Share Posted August 16, 2020 I use a lot of VEX for that example. I recommend trying GroupSOP's "Min Edge Angle" first. sy_Measured Partitioning_test.hiplc 1 Quote Link to comment Share on other sites More sharing options...
texturerama Posted August 16, 2020 Author Share Posted August 16, 2020 Ahhhhaha wow! Thrilled to have your input! Didn't know about feeding seam groups to connectivity! Thank you! Quote Link to comment Share on other sites More sharing options...
vinyvince Posted August 19, 2020 Share Posted August 19, 2020 This is not a trivial problem as soon as you try on a decently complex model. Have some semi success using standard houdini hacking node, i need more time and see how i could group small cluster area, smooth the border of each , Im not far but in other hand but to be honest i also feel a math Vex approach will be the better . Ideally we want to reduce the curvature into a classified sparse collection of seen smooth curves which can cut and minimize the surface into a path of simple developable surface while preserving the main feature of the original shape. By considering the neighbour points , algorithm like gradient descent will help to minimizing the energy and avoid the square angle. Will love to see more feedback from this please.. ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas Quote Link to comment Share on other sites More sharing options...
animatrix Posted August 19, 2020 Share Posted August 19, 2020 Hi, You can also select edges using the angle between the faces sharing it: float getAngleBetweenVectors ( vector v0; vector v1 ) { vector v0n = normalize ( v0 ); vector v1n = normalize ( v1 ); return atan2 ( length ( cross ( v0n, v1n ) ), dot ( v0n, v1n ) ); } int pts [ ] = neighbours ( 0, @ptnum ); foreach ( int pt; pts ) { if ( @ptnum < pt ) continue; int prs [ ] = { }; int firsthedge = pointhedge ( 0, @ptnum, pt ); int count = hedge_equivcount ( 0, firsthedge ); if ( count == 2 ) { int hedge = firsthedge; do { int pr = hedge_prim ( 0, hedge ); if ( pr != -1 && find ( prs, pr ) < 0 ) append ( prs, pr ); hedge = hedge_nextequiv ( 0, hedge ); } while ( hedge != firsthedge ); vector n0 = primuv ( 0, "N", prs [ 0 ], 0.5 ); vector n1 = primuv ( 0, "N", prs [ 1 ], 0.5 ); float angle = getAngleBetweenVectors ( n0, n1 ); if ( angle >= radians ( ch("minangle") ) ) setedgegroup ( 0, chs("vex_selectiongroup"), @ptnum, pt, 1 ); } } 3 Quote Link to comment Share on other sites More sharing options...
vinyvince Posted August 19, 2020 Share Posted August 19, 2020 Is it a different implementation that what SideFx group min edge does excepted off course faster? Still it doesn't solve the main problem as i describe before. Try to organise, cut and clean polish area of a more complex asset like a statue or let say our pig head is where the challenge is I could get this on the Pig head ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas Quote Link to comment Share on other sites More sharing options...
animatrix Posted August 20, 2020 Share Posted August 20, 2020 The implementation should be similar more or less, but you might want to add maxangle also for completeness. I just wanted to show another way to select edges by angles in VEX. Quote Link to comment Share on other sites More sharing options...
vinyvince Posted August 22, 2020 Share Posted August 22, 2020 Slightly off topic from this post but may i ask something? I struggle to pass some attribute i define in a custom VEX Wrangle to drive some value of others SOP node like thicken or whatever. I could only make it works with Label using something like ch("../attribwrangle5/Depthval") How could i export/write the value of an attribute in an extra-label created? function like printf only write value to console, right? Obviously im missing something here it has to be more simple , isn it ? It s actually drives me crazy... Please tell me how you manage this yourself, Cheers Quote Link to comment Share on other sites More sharing options...
Noobini Posted August 22, 2020 Share Posted August 22, 2020 huh ? just works for me... Quote Link to comment Share on other sites More sharing options...
vinyvince Posted August 23, 2020 Share Posted August 23, 2020 Humm... i guess my eyes are and brain are a little too foggy at the end of this week... ? Here a portion of my setup, on the leaf itself, thicken node... Any idea to pass a custom attribute here my @thicken to the Labs_thicken local variable depth value? Thanks you ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas planleaftree_wip_vinc.hipnc Quote Link to comment Share on other sites More sharing options...
Librarian Posted August 23, 2020 Share Posted August 23, 2020 You and those nodes . I use only this Vop to take any angel and convert to any Group ..but its just me. Group.hiplc Quote Link to comment Share on other sites More sharing options...
Noobini Posted August 23, 2020 Share Posted August 23, 2020 10 hours ago, vinyvince said: Humm... i guess my eyes are and brain are a little too foggy at the end of this week... ? Here a portion of my setup, on the leaf itself, thicken node... Any idea to pass a custom attribute here my @thicken to the Labs_thicken local variable depth value? Thanks you ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas planleaftree_wip_vinc.hipnc mmmm i don't think it does 'local' thickness. It's still just one thickness coz under the hood, the asset extrudes as connected components and not individual components...to use local thickness, it would have to be in Local Control, zscale (or whatever custom attrib) Soooo....time for DIY: it's not that hard. vu_PetalThickness.hiplc Quote Link to comment Share on other sites More sharing options...
vinyvince Posted August 24, 2020 Share Posted August 24, 2020 Yes, you right its make sense that it use connected pieces, thanks Vusta. In fact i don t know why I didn t thought about writting a couple of lines of VEX to extrude these passing my custom attribute and normal , it's really easy I guess i still haven t broken enough with all these years of software with premade node with content locked Thanks 9 hours ago, Noobini said: mmmm i don't think it does 'local' thickness. It's still just one thickness coz under the hood, the asset extrudes as connected components and not individual components...to use local thickness, it would have to be in Local Control, zscale (or whatever custom attrib) Soooo....time for DIY: it's not that hard. vu_PetalThickness.hiplc 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.