Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

AtBBox Blunder

2 ANTWORTEN 2
Antworten
Nachricht 1 von 3
Anonymous
314 Aufrufe, 2 Antworten

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)
Beschriftungen (1)
2 ANTWORTEN 2
Nachricht 2 von 3
Stephen.Blair
als Antwort auf: Anonymous

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
Nachricht 3 von 3
Anonymous
als Antwort auf: Anonymous

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.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report