Are there any random stack scripts available?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Search this Thread Display Modes
Old 04 April 2014   #1
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
 
Old 04 April 2014   #2
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.

Last edited by Klvnk : 04 April 2014 at 03:03 PM.
 
Old 04 April 2014   #3
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.
 
Old 04 April 2014   #5
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.
 
Old 04 April 2014   #6
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!
 
Old 04 April 2014   #7
That algorithm is very interesting though! I myself havent ventured into scripting yet but i hope someone does turn that packing into a maxscript.


luckily it been done

Last edited by Klvnk : 04 April 2014 at 03:26 PM.
 
Old 04 April 2014   #8
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


Last edited by Klvnk : 04 April 2014 at 10:27 AM.
 
Old 04 April 2014   #9
it looks too repeatable. and very funny... many times repeated random configurations if it was a human who packed it, he was frantic

Last edited by denisT : 04 April 2014 at 01:52 PM.
 
Old 04 April 2014   #10
honestly i don't have a good programming algorithm in my head for this task.
 
Old 04 April 2014   #11
yeah but it's only 3 different stacks with no randomized material and 20 mins work. what did I discover after I did that one was to random delete the top most elements to produce a more randomized effect, if you use that add more boxes than you think you need.


Last edited by Klvnk : 04 April 2014 at 02:43 PM.
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:06 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.