Jump to content

Split large mesh into pieces


Recommended Posts

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

Link to comment
Share on other sites

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);
    }
}

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...