Tuesday, July 14, 2009

Cool Plug-In: Component Spray

A colleague of mine, John Palmer from University of Maryland, told me about this fun (and FREE) plug-in which sprays components randomly. John's a landscape architect, and uses Component Spray to spray trees around. I tried that out, and came up with this (click the graphic below to open the 3D Warehouse page for the model):



Then I tried using Component Spray to model what a room in my house would look like after my kids finish playing with blocks. (I spend a lot of time every night cleaning up rooms like this one!) The room on the left shows a circular spray of uniform-sized blocks, and the room on the right shows a rectangular spray of blocks of different sizes.



If you want to try this plug-in yourself, you can download it from the Ruby Library Depot (scroll down and look for "compo_spray"). The ZIP file contains an RB file that you need to place in the "Plugins" folder of your SketchUp installation, and also contains a PDF you can read to explain how the plug-in works. In SketchUp, Component Spray will appear under the Draw menu.

UPDATE: Mac users, place the RB file in Library/Application Support / Google SketchUp 7 / SketchUp / plugins.

You can specify up to six components for spraying, and the components must already exist in your model. So for the tree model, I inserted each tree one at a time from the 3D Warehouse, then erased them from the model. (Even when components are erased, they still exist in the "In Model" folder of the Components window.) I then placed the trees on a large sandbox surface. You can adjust limits for slopes and altitudes; I set the altitude limit so there would be no trees on the top of the hill. Also, you might notice there are twice as many conifer trees as every other tree. This is because my list of six components has the conifer listed twice, and all others listed once (so I really only used five trees).

For the blocks model, I created one block, made five copies of it, made each one into a component, then erased them. The Component Spray list contains one of each block. I enabled both stacking and random rotation. For the non-uniform blocks on the right, the scale values range from 1 to 2, without maintaining proportion (aspect ratio). You should also notice that components are highly concentrated at the center of their defined area, then taper off toward the defined area limits.

If you play with this plug-in and come up with something great, send me the file and maybe I'll post it here.

And if you have a favorite plug-in you'd like to see me write about, share that, too!

Anyone can create anything in 3D! www.3dvinci.net

2 comments:

Mrs. Glavan said...

I wanted to try the component spray, but could not find the "Plugins" folder for SketchUp in my mac computer. Can you help?

Kim

Bonnie Roskes said...

Sorry about that! I added an update to the post above. You place the file in Library / Application Support / Google SketchUp 7 / SketchUp / plugins.