Procedural grouping (grouping leafs of a tree)
4591 7 1- alexpi
- Member
- 41 posts
- Joined: Feb. 2006
- Offline
Hello,
I have this crude tree, and I want to select all ‘leaves’. I thought of selecting all edges that are inside the leaf parts (I highlighted some examples in red), and convert those to primitives - all this with the Group SOP. Any ideas for achieving that?
I have this crude tree, and I want to select all ‘leaves’. I thought of selecting all edges that are inside the leaf parts (I highlighted some examples in red), and convert those to primitives - all this with the Group SOP. Any ideas for achieving that?
Edited by alexpi - Dec. 3, 2016 07:59:45
- Enivob
- Member
- 2630 posts
- Joined: June 2008
- Offline
Middle click on the File node that imports the tree and see if any groups already exists? Then you could just select from the existing groups. Most tree models already have this built-in. (i.e. trunk/bark, leaves)
Edited by Enivob - Dec. 1, 2016 09:22:53
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- alexpi
- Member
- 41 posts
- Joined: Feb. 2006
- Offline
- alexpi
- Member
- 41 posts
- Joined: Feb. 2006
- Offline
- Enivob
- Member
- 2630 posts
- Joined: June 2008
- Offline
Can you post the source tree file?
Mainly because it depends upon how the primitives are arranged within the source object. For instance all the leaves might have been created last thus have a higher primitive index compared to branches. If that were the case then you could create a group by simply evaluating each @primnum in a wrangle.
Maybe each primitive has a specific vertex count that makes it detectable..?
Mainly because it depends upon how the primitives are arranged within the source object. For instance all the leaves might have been created last thus have a higher primitive index compared to branches. If that were the case then you could create a group by simply evaluating each @primnum in a wrangle.
if (@primnum >150) { i@group_bottom_half = 1; }
Edited by Enivob - Dec. 3, 2016 09:39:58
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- alexpi
- Member
- 41 posts
- Joined: Feb. 2006
- Offline
The tree file is too big (32MB) to upload. The primitives are not in arranged in a particular way. The leafs are not connected to the tree, they just float arround, and all of them are just these two prim squares. The only way I can think of achieving the grouping, is adding any geometry that has two prims to a group, perhaps by some kind of looping.
- Enivob
- Member
- 2630 posts
- Joined: June 2008
- Offline
This thread [sidefx.com] mentions a work flow of an Assemble SOP followed up by a Partition. Maybe that is the way to go?
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- el_diablo
- Member
- 133 posts
- Joined: July 2005
- Offline
-
- Quick Links