Set a Box size based on Asset Input Size

   1102   2   0
User Avatar
Member
2 posts
Joined: Jan. 2020
Offline
Hi,

yesterday I started to work with Houdini and ofc I already came across a problem I can't seem to solve, even after intense research. The problem I have is actually pretty basic I guess, but maybe I don't know about the right terminology.

So here it goes: I created an Asset (or Tool !?) via “Asset -> New Digital Asset From Selection…”, containing a bunch of nodes doing some handy stuff for me. The input for this particular Asset is supposed to be a Box. Among all the tasks this Asset is doing for me, there is one task creating another box. Now I want this Box (which is created in my Asset Node Chain) to be, let's say half the size of the Input Mesh! How do I do that!?

I know I could go into my Asset's Box size parameters and add something like ch(“../../box1/sizex”). But this is too hardcoded for me, I actually need the “box1” part in that expression to be dynamic and actually based on the input mesh (wich indeed is “box1” in some case, but it can vary, since I want to use my Asset multiple times, based on different boxes).

I hope I managed to explain my issue good enough so you Houdini Pro's know what I am trying to do.

Thanks in Advance,
Marten
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
you could reference the bounding box of the input to the HDA

see: https://www.sidefx.com/docs/houdini/expressions/opinput.html [www.sidefx.com]
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
2 posts
Joined: Jan. 2020
Offline
@goldfarb Thanks for your answer! This looks like it could work, I am going to give it a try later!
  • Quick Links