Select By Mass

11 votes
Version: 
3dsmax 2009
Date Updated: 
09/13/2009
Author Name: 
Allan McKay

Simple script, if people find it useful I'll make a gui and add a bit more to it. But the whole premise was to just quickly build a tool I could differentiate big objects from small objects in my scene based on VolSize variable in the script.

What I used it for was to fracture objects for a big landslide for a film, and then I wanted to use this script to tell me which objects were big so I would then work on making them procedurally break more, whereas I didn't want the small pieces to sub-fracture because that would be overkill.

So its a simple script but probably useful when dealing with thousands of objects on the fly.

Video URL: 

Comments

Comment viewing options

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

hello Ruben, I think a lot

hello Ruben, I think a lot of people can be interrested in your nice script !!! :-)))

holycause's picture

nice Allan. If you're

nice Allan.

If you're interested, i've a script doing the same, but measuring the mass and using a GUI

If you want, i can send you the file. ;)

http://aespid.com/Perso/MS/selectBySize01.jpg

http://aespid.com/Perso/MS/selectBySize01.rar

it's still a wip, i ll finish it asap.

 

Ruben

Anubis's picture

Hi, Allan. This is not

Hi, Allan. This is not measure of mass, but BoundingBox.
Never mind, its working. There is a quick code by me, by the way:

-- Function -------------
fn SelectBig objArray Size = (
	select (for i in objArray where (distance i.max i.min) >= Size collect i )
)
-- Setup -------------
sel = selection as array ; size = 50
-- Action -------------
if sel.count > 0 do (
	sel.wireColor = yellow
	SelectBig sel size -- call function
	selection.wireColor = blue
) -- done!

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.