isjtar Posted May 5, 2020 Share Posted May 5, 2020 Hello, I'm new to this forum, houdini beginner as well, so please bear with me. I'm dealing with very large meshes from lidar scans and need to separate them into smaller ones, for importing into unreal, LOD's etc It would be neat to set number of divisions in x and z, and assign groups - I can do the object merge to geo node by hand. I started doing it with a for loop, not sure if it's the right approach, in attachment for what it's worth. Any help would be greatly appreciated... Thanks! Isjtar meshCutter.hiplc Quote Link to comment Share on other sites More sharing options...
isjtar Posted May 6, 2020 Author Share Posted May 6, 2020 It's much simpler in VEX, I figured it out, in case anyone needs it. Only on one axis, divides the mesh and assigns the parts to groups. vector bmin = getbbox_min(0); vector bmax = getbbox_max(0); vector bsize = getbbox_size(0); float iter = 4; for (int i = 0; i < iter; i++){ string groupname = sprintf("grup_%d", i); if(@P.x > (bmin.x + (bsize.x / iter * i)) && @P.x < (bmin.x + (bsize.x / iter * (i+1)))) { @Cd = {1, 1, 1} * i / 4; setprimgroup(0, groupname, @primnum, 1); } } 1 Quote Link to comment Share on other sites More sharing options...
ludvigl Posted December 27, 2021 Share Posted December 27, 2021 awesome, this worked great for me! thanks for sharing the solution 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.