ela1995 Posted March 29, 2020 Share Posted March 29, 2020 Hi everybody, I'm quite new to Houdini so I have a problem here. I have a group of points on a geometry. Now I want to find the center point of it so I can 'Copy to Point' a sphere. The geometry is an animated alembic cache. find centerPoint.hipnc BAZA_GUN.abc Quote Link to comment Share on other sites More sharing options...
Noobini Posted March 29, 2020 Share Posted March 29, 2020 think there's a bazzillion ways to do this, I know one.... vu_find centerPoint.hipnc Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted March 29, 2020 Share Posted March 29, 2020 Hi Doanh, the attribute promote SOP can calculate the average of an (position) attribute. And a VEX solution would be to expandpointgroup(): int pts[] = expandpointgroup(0, 'group2'); vector pos_avg = vector(0.0); foreach(int pt; pts){ pos_avg += point(0, 'P', pt); } pos_avg /= len(pts); addpoint(0, pos_avg); find centerPoint_KM.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted March 29, 2020 Share Posted March 29, 2020 or use Extract Centroid SOP also you may need to copute orient to get stable reference frame in case you need it find_centerPoint_mod.hipnc 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.