Community
Can anyone advise why this is returning zeros on all min/max axes?
from arnold import * #define a triangle a = AtVector(10, 3, 19) b = AtVector(50, 3, 1) c = AtVector(6, 43, 3) #get bounding box MyBbox = AtBBox(a, b, c) #print the bound's maximums print MyBbox.max.x print MyBbox.max.y print MyBbox.max.z
I looked at the Python bindings, and I don't see that constructor.
You can do this:
from arnold import * # min = AtVector(0, -3, 0) max = AtVector(1, 3, 5) # # Create from min and max vectors MyBbox = AtBBox(min,max) # #print the bound's maximums print MyBbox.max.x print MyBbox.max.y print MyBbox.max.z # # # Create with min.x, min.y, min.z, max.x, max.y, max.z MyBbox = AtBBox( 1.3, 2.4, 3.5, 11.2, 34.2, 22.2 ) print MyBbox.min.y print MyBbox.max.y
hmm. ok. this doesn't seem to do what I thought it would, and now that I think of it, it's a bad idea anyway. What I really need is the bounding box for the whole scene, i.e.
AiUniverseGetSceneBounds()
But again, I'm getting nothing but zeros:
AiBegin()
AiASSLoad(myass, AI_NODE_ALL)
bounds = AiUniverseGetSceneBounds()
AiEnd()
ass file is attached...test0001.ass
I'm trying to make a standalone thumbnail generator. Later down the road I need it to be host-agnostic. I'm trying to use the bounding box to calculate the camera's position.