Display Volume as Bounding Box
5041 13 2- tas3d
- 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!
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
Michal Tas Maciejewski @ www.vfxtricks.com
- Hamilton Meathouse
- Member
- 171 posts
- Joined: Nov. 2013
- Offline
EDITED:
Create an empty primitive and parent the volume under that. Make sureboth 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 to ensure you affect the parent prim.
Create an empty primitive and parent the volume under that. Make sure
`lopparentprims(lopinputprims('.', 0))`
Edited by Hamilton Meathouse - June 4, 2021 20:37:34
- tas3d
- Member
- 120 posts
- Joined: Jan. 2012
- Offline
Thanks for suggestion.
Unfortunately, once I set Draw Mode to BBox, it disappears.
Unfortunately, once I set Draw Mode to BBox, it disappears.
Michal Tas Maciejewski @ www.vfxtricks.com
- goldleaf
- 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,
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!
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!
I'm o.d.d.
- tas3d
- Member
- 120 posts
- Joined: Jan. 2012
- Offline
- smbell
- Member
- 75 posts
- Joined: Feb. 2017
- Offline
- Tim Crowson
- Member
- 240 posts
- Joined: Oct. 2014
- Offline
- Tim Crowson
- 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.
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
- Tim Crowson
Technical/CG Supervisor
Technical/CG Supervisor
- antc
- Member
- 273 posts
- Joined: Nov. 2013
- Offline
- jsmack
- 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.
- jsmack
- 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.
- antc
- 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.
- Tim Crowson
- Member
- 240 posts
- Joined: Oct. 2014
- Offline
jsmackTim 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
Technical/CG Supervisor
- jsmack
- 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