Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AtBBox Blunder

2 REPLIES 2
Reply
Message 1 of 3
sombersound.genetics
212 Views, 2 Replies

AtBBox Blunder

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
Tags (1)
Labels (1)
2 REPLIES 2
Message 2 of 3

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


// Stephen Blair
// Arnold Renderer Support
Message 3 of 3

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report