[Closed] Are there any random stack scripts available?
Hi, im working on a project with a tight deadline and i want to find a script or some way of quickly generating stacks of boxes akin to the image below. Does anyone know of a script that would help me achieve this effect?
Thanks
Jack
though it looks random, the “floor” position of each stack is probably best resolved using the classic 2d bin packing algorithm.
then maybe something recursive on each new box placed ie the box top is a new bin packing region, repeat until a random height is achieved maybe.
Im beginning to wonder whether i could use the basic compound scatter and hide the imperfections manually or under cloth sims. That algorithm is very interesting though! I myself havent ventured into scripting yet but i hope someone does turn that packing into a maxscript.
Might be a good starting point:
http://www.scriptspot.com/3ds-max/scripts/constainer-stack
http://www.scriptspot.com/3ds-max/scripts/boxes
if you go down the scatter approach, have a look at something with particle flow. you could even map distribution weights on to the emitter surface.
Thanks i took a look at that script earlier today and it does a good job of stacking but it leaves large gaps between the boxes as well as massively intersecting some too.
EDIT: Ill take a look at that boxes script too. Also as for Particle flow i hadnt thought of that! Ill have a go and see what i can come up with thanks!
That algorithm is very interesting though! I myself havent ventured into scripting yet but i hope someone does turn that packing into a maxscript.
thinking about it I’d be inclined to do it by hand.
decide how many “Base” crates you are going to use model them up, add some world space fractal noise/grunge or world space grunge textures (to add variation on their position) … some various stencil graphics, 1,2,3,4 etc, fragile, this way up, classified, property of etc (in a typical stencil font). Be clever with the mapping and textures so that every different texture is interchangeable and therefore can be randomized or swapped between crates.
Then from these build up bigger building block, cloning rotating etc, swapping textures. then keep repeating this process until you blocked out the whole scene. finally scatter some random crates around to break up any obvious repetitions.
it sound daunting when you start but I think it’s no worse/slower than correcting the scatter/particle/script and probably give a better result.
20 mins to bash this rubbish out
it looks too repeatable. and very funny… many times repeated random configurations if it was a human who packed it, he was frantic
honestly i don’t have a good programming algorithm in my head for this task.