ChrisJudkins Posted January 13, 2016 Share Posted January 13, 2016 Hey everyone, I'm sure this problem has a super simple solution but I'm a bit stumped. I have a cached smoke simulation, and I need get the bounds of the volume at every frame so that I can create a new volume with bounds big enough to fit every cached frame. However, this obviously needs to happen before each frame is evaluated in Houdini (otherwise the new volume's bounds will just match those of the current cache frame). Is there any way I can get Houdini to fetch the bounds of the sequence before cooking the rest of the network, or alternatively create a volume that matches the current frame's bounds (as long as it is larger than previous frames)? Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 13, 2016 Share Posted January 13, 2016 Welcome if I understood it correctly you want to find union of bounding boxes of all volumes? Juraj union.hipnc Quote Link to comment Share on other sites More sharing options...
tjeeds Posted January 14, 2016 Share Posted January 14, 2016 Best way to do this is to use Chops, since that cooks it's incoming values for the entire frame range on the first frame. Ideally you want to send as little information as possible over to Chops, so in this example I'm creating two points at minimum and maximum positions of the incoming geometry's bounding box each frame. Once in chops I'm using the Expression Chop with icmin()/icmax() to find the min/max values of the min/max points over the entire frame range. This then gets piped back out into sops, moving the points to these minmin maxmax positions. After that a Box Sop or Volume Sop can be plugged into these guys. This is the kind of thing you build once, make into and HDA and just use forever. Gets you around using a Solver/invoking Dops and having cook and cache the last frame, and it's super fast since you're only really working with 2 points. You'll notice that nothing is plugged into the first input of the Attribute Vop where the points are created, this is just one of many ways to get these points. The Attrib Vop is in Detail mode so it doesn't need input geometry to iterate over, in this case you don't want to carry through the geo that you are bounding so you plug it into Input 2 and leave Input 1 alone. Fun? max_bbox.hipnc 1 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.