Display Volume as Bounding Box

   5041   13   2
User Avatar
Member
120 posts
Joined: Jan. 2012
Offline
Hi,

Is it possible to display Volumes as Bounding Boxes?
I tried different Kinds, but none worked.

Thanks!
Edited by tas3d - June 1, 2021 10:23:08

Attachments:
Screenshot 2021-06-01 102012.jpg (113.8 KB)

Michal Tas Maciejewski @ www.vfxtricks.com
User Avatar
Member
171 posts
Joined: Nov. 2013
Offline
EDITED:
Create an empty primitive and parent the volume under that. Make sure both the parent prim and the vol prim have has their Kind set to Component. Then use the Configure Prim LOP to set the parent prim's Draw Mode to Bounding Box and Kind to Component. In the Primitives field put
`lopparentprims(lopinputprims('.', 0))`
to ensure you affect the parent prim.
Edited by Hamilton Meathouse - June 4, 2021 20:37:34
User Avatar
Member
120 posts
Joined: Jan. 2012
Offline
Thanks for suggestion.
Unfortunately, once I set Draw Mode to BBox, it disappears.

Attachments:
Screenshot 2021-06-04 214027.jpg (45.3 KB)

Michal Tas Maciejewski @ www.vfxtricks.com
User Avatar
Staff
4164 posts
Joined: Sept. 2007
Offline
Yeah Draw Mode is tied to the Model Hiearachy concept in USD; it could work, but you probably will have better luck with display purpose. You can make a bounding box in SOPs, with the prim attribute proxy, s@usdpurpose = "proxy";and then set the volumes to render s@usdpurpose = "render";. By default HoudiniGL doesn't show render purpose, though you can tell it to; Karma and other render delegates should ignore proxy display purpose.

The advantange of proxy control, is you could provide something lightweight for GL, but still represents the shape. I've seen the down-sampled points from volumes used as proxy displays successfully.

Hope this helps!

Attachments:
volumes_and_purpose.hip (290.2 KB)
capture_2021-06-04_23.03.00.gif (1.8 MB)

I'm o.d.d.
User Avatar
Member
120 posts
Joined: Jan. 2012
Offline
that's super useful!
Thanks
Michal Tas Maciejewski @ www.vfxtricks.com
User Avatar
Member
75 posts
Joined: Feb. 2017
Offline
This is super useful, but is there a way to make my bounding boxes just show as lines in the stage view like the normal viewport and not whatever these card looking things are? They look normal in the standard viewport.
Edited by smbell - May 4, 2022 15:50:18

Attachments:
Screenshot_1.jpg (158.6 KB)
Screenshot_2.jpg (116.2 KB)

User Avatar
Member
240 posts
Joined: Oct. 2014
Offline
This may only work if the parent of the component is a group kind (this really gets ridiculous, doesn't it? :-D).

But we have done that in production and it works fine. Volumes can be drawn as Bbox easily this way.
- Tim Crowson
Technical/CG Supervisor
User Avatar
Member
240 posts
Joined: Oct. 2014
Offline
There are usually several ways to arrive at this result, but here is one. Just remember that (unless something has changed in the last few months) Draw Modes only work if ALL ancestors of the component are either group or assembly kind.

Then set your volume to be a component, and the draw mode will work.

It's a whole thing.

Just to get a bounding box display.
Edited by Tim Crowson - May 6, 2022 16:51:00

Attachments:
volbox.PNG (736.8 KB)

- Tim Crowson
Technical/CG Supervisor
User Avatar
Member
273 posts
Joined: Nov. 2013
Offline
Draw modes in USD are intended for models, not prims. You can make your volume prim a model if you like, but it’s not really how things are supposed to work.

It seems like the main limitation here perhaps is that purpose=proxy is not capable of drawing a wireframe box in a shaded scene?
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
antc
Draw modes in USD are intended for models, not prims. You can make your volume prim a model if you like, but it’s not really how things are supposed to work.

It seems like the main limitation here perhaps is that purpose=proxy is not capable of drawing a wireframe box in a shaded scene?

There's no way to tell the viewer that a prim is 'wireframe' that I know of. Proxy purpose controls when the prim is drawn, not how.

Converting the mesh to curves will get it to draw as wires, but shaded ones with thickness, since that's how curves are drawn by default in HoudiniGL. Of course, it's possible to disable shaded curves globally, but it's not very convenient and isn't encoded in the scene.
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
Tim Crowson
Then set your volume to be a component, and the draw mode will work.

It's a whole thing.

Just to get a bounding box display.

I doesn't work if the volume doesn't have extents authored. I haven't found a convenient way to do it either. The only way I've found is to start with the vdbfieldasset in a wrangle, get the asset path, and then query the bbox as if it were Houdini geometry.
User Avatar
Member
273 posts
Joined: Nov. 2013
Offline
jsmack
There's no way to tell the viewer that a prim is 'wireframe' that I know of. Proxy purpose controls when the prim is drawn, not how.

Yes that's kind of what I'm getting at - there's no sanctioned way of stating that a prim should just draw as a wire box. I guess Houdini GL could do something non-standard if it wanted maybe. That said, I know one consideration in the past has related to performance in that querying an attribute isn't free, and the more "just in case" attributes that need checking the slower everything gets regardless of whether or not you use them.
User Avatar
Member
240 posts
Joined: Oct. 2014
Offline
jsmack
Tim Crowson
Then set your volume to be a component, and the draw mode will work.

It's a whole thing.

Just to get a bounding box display.

I doesn't work if the volume doesn't have extents authored. I haven't found a convenient way to do it either. The only way I've found is to start with the vdbfieldasset in a wrangle, get the asset path, and then query the bbox as if it were Houdini geometry.


Interesting. In my example above the volume was coming from a simple 'cloud' SOP inside a SOP Create (fed by a sphere, so maybe that's where it came from). I have also done this with published bgeos containing volumes, loaded via GeometrySequence. In all cases the extents didn't need to be explicitly handled on the LOPs side. I'm curious now.
Edited by Tim Crowson - May 8, 2022 17:51:14
- Tim Crowson
Technical/CG Supervisor
User Avatar
Member
7770 posts
Joined: Sept. 2011
Offline
Tim Crowson
Interesting. In my example above the volume was coming from a simple 'cloud' SOP inside a SOP Create (fed by a sphere, so maybe that's where it came from). I have also done this with published bgeos containing volumes, loaded via GeometrySequence. In all cases the extents didn't need to be explicitly handled on the LOPs side. I'm curious now.

That's because bgeo contain the bounds. vdb files do not. Sop create is kind of like layering in a bgeo.
  • Quick Links