[RESOLVED]usd_getbbox Vex functions return Huge incorrect values

   2547   5   1
User Avatar
Member
3 posts
Joined: Feb. 2017
Offline
Hi,

I'm running into a small problem trying to automate a Daily Tool.

Basically I want to be able to get the BBox of my asset to transform them accordingly next to each other for presentation.
Only Problem is when I query the Bbox_size or min,max,etc… using the Vex functions(usd_getbbox_size)
houdini returns values that are huge (bboxSize = {-6.80565e+38,-6.80565e+38,-6.80565e+38}).
Which makes it basically unusable.

I don't know wether it's a bug Or I'm using it wrong.

Strangely enough inside my scene graph details window the world bounding Box property, shows the correct information…
If there is another way of obtaining this info (using python) I'm all ears

Thank you very much in advance!
Antonino

Here is my vex snippet:

//=========== Parameters =============//

string parentPath = usd_parentpath(0, @primpath);

//———– String Path Par

string wildCardAsset = “/cube1”;

//———– Setting Bbox Par

vector bbox_size = usd_getbbox_size(0,wildCardAsset,“Render”);


printf(“bboxSize = %g”,bbox_size);
Edited by NinoS - Nov. 20, 2020 06:59:21

Attachments:
usd_getbboxsize.hipnc (63.7 KB)
Capture.PNG (462.9 KB)

User Avatar
Member
3 posts
Joined: Feb. 2017
Offline
Ok so thanks to having a fresh head in the morning,
I found out that my “purpose” tag was wrong, and when it is it basically returns the world bounds I guess…
But switching to proxy made it work and the correct Bounding Box size is now returning!
YAY
User Avatar
Member
176 posts
Joined: Nov. 2013
Offline
I'd be interested to know how to access the World Bounding Box attr of say, a camera using VEX
User Avatar
Member
67 posts
Joined: July 2005
Online
not resolved here, same issue.
opened your .hip file, changed it to "Proxy" and still get same error. Was there something else you set to make it work?
I get same error with all the usd bbox functions
Edited by GrahamDClark - March 24, 2023 01:27:41

Attachments:
Screenshot 2023-03-24 012703.png (77.7 KB)

User Avatar
Staff
4451 posts
Joined: July 2005
Offline
The purpose name for proxy purpose is "proxy", not "Proxy". Also, make sure your mesh is in fact proxy purpose. If it doesn't have an explicit purpose set, use "default" as the purpose string.
User Avatar
Member
67 posts
Joined: July 2005
Online
Thank you Mark, default works.
  • Quick Links