Jump to content

Group by primitive size


Recommended Posts

Hi all, i'm trying to create a primitive group based on the size of geometry primitives.

In old version of Houdini, i recall i could use a Group sop, set it by Expression and use this: length($SIZEX,$SIZEY,$SIZEZ) > V ; where V is the size value to filter with.

Now in houdini 16 i have to use the GroupExpression sop, but it can read only vex, and i'm having trouble with it. I found in the help file that there still is a Length (vector) function, so i tried this: length (@size.x,@size.y,@size.z) > V, but it doesn't seems to work...

any advice on how to solve this?

Link to comment
Share on other sites

ok maybe i solved it; instead of using the GroupExpression node i used an attributeWrangle with:
 

v@min = {0.0, 0.0, 0.0 };
v@max = {0.0, 0.0, 0.0 };
getbbox(@min,@max);
v@size = @max - @min;

f@tsize = @size.x + @size.y + @size.z;

and AFTER that, i used the groupExpression node with:

@tsize > X

where X is the value i want to filter with

I could create the group in the wrangle itself, but i found more confortable the group node cause it highlights whatever is inside the group.

 

It seems to work now, but if you have other ways it's always good to know ^^

  • Like 1
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...