Create Animation Bounding Box

15 votes
Version: 
3dsmax 2009
Date Updated: 
09/13/2009

Script I built to work with Fume FX, but can probably be used for many other things.
The idea is that I wanted to roughly work out the entire dimensions of a characters animation, so a bounding box - of the entire animation.
Lets say I have a character running, and jumping, and falling over - and I want him to be on fire, this tool will track all of the dimensions of the character for the entire animation duration and build a bounding box representing the exact area he's covered.
This way I can create a fairly accurate Fume FX container that isn't wasting space.

However could possible be useful for animators, and various other uses.

Video URL: 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

Hi, Allan. I think you know

Hi, Allan. I think you know so the final box is bigger than bounding box with 2.5 in all 3 dimensions, maybe this is what you want, but rather I want to say that its quite complicated code and it runs slowly. Here's a quick idea of me:

rollout myGUI "Anim Box"
(
	pickbutton chooseOBJ "Choose Anim OBJ" width:140
	checkbox keepDum "Keep Helpers" checked:off
	on chooseOBJ picked obj do
	(
		if obj != undefined do
		(
			bb = nodeLocalBoundingBox obj
			for t = animationrange.start to animationrange.end do
			(
				at time t dummy boxsize:(bb[2]-bb[1]) pos:obj.center prefix:"_tmp"
			)
			select $_tmp* ; tbb = $.max-$.min ; tc = $.center
			b = box name:"AnimFFX_box" \
			width:tbb[1] length:tbb[2] height:tbb[3] xray:on isSelected:on
			CenterPivot b ; b.pos = tc
			if not keepDum.checked do delete $_tmp* -- del. helpers
		)
	)
)
createDialog myGUI
AttachmentSize
animbox.png 7.72 KB

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.