Jump to content

Deleting outside primitives after boolean fracture


Trilec

Recommended Posts

hi all,

This is a bread and butter problem, solved in many different ways....remove (cull) the outside piece primitives after a "Boolean Fracture".

Ive been looking for a simple and fast VEX solution (not... for-each loop nodes)

I found one that seems in the right direction as I love its simplicity. (was trying this in detail mode)

If anyone has other or a more elegant VEX solution I would love to explore it, cheers

int insides [] = expandprimgroup(0, "inside");
int outsides[] = expandprimgroup(0, "outside");

foreach(int inside; insides)
{
    int     success;
    string  insideName = primattrib(0, "name", inside, success);

    foreach(int outside; outsides)
    {
        string outsideName = primattrib(0, "name", outside, success);

        if(insideName == outsideName)
        {
            setprimgroup(0, "inside", inside, 0, "set");
            setprimgroup(0, "outside", inside, 1, "set");
            setprimattrib(0,"Cd",outside,set(1,0,0),"set"); //small test using the colour
            break;
        }
    }
}

as usual any help appreciated.

 

Edited by Trilec
hilighted booleans as this is the main issue,
Link to comment
Share on other sites

Thanks Flcc,

Interesting, uses similar to above, by default if you turn the Material type from Concrete to Wood (boolean fracture) you need to change the group expand to "wood_cutoutside". 

im still investigating and will post any other VEX solutions I might find.

 

c

Edited by Trilec
Link to comment
Share on other sites

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...