Call us toll free: +421 902 099 830
Top notch Multipurpose WordPress Theme!

Teapot scattering tutorial

Sep
14

Teapot scattering tutorial

Hi there!  Recently, I came across a rendering that I found fascinating. It was of a bunch of teapots of different colors, in the description a plug-in for 3ds max was mentioned and the first thing that crossed my mind was, whether this could be easily done in modo. Well guess what! It can!

Let’s crunch through some basic breakdown of this scene. There are 2 main problems. The geometry, arranging a bunch of items so that they don’t intersect and the materials, assigning random colors to these items. Well… and a third one… how do we do both at the same time.

What we can use to color our teapots seemingly randomly is to use the replicator item in combination with a gradient, but first, we need to arrange the replicated items in a way, that they don’t intersect. This is where I came up with a little trick. Look at the image bellow:

I put a single polygon inside the teapot mesh, exactly where the teapot’s center and pivot are. To be able to easily select this polygon in later steps, I added it to a selection set.

In the image bellow, you can see an array of teapots, almost ready for their physics simulation, but not quite yet. (a little tip… when doing your array, leave one teapot at the side.. you will need it later as a replicator prototype). To help our teapots get the desired randomly scattered look, I utilized another small trick before starting the simulation.

With action center set to local (image above) and the Noise falloff active (image bellow), I applied a random rotation to the items, to give the simulation a good start.

The image bellow shows what you should get after the random rotation and just moments before the start of the simulation.

Make the teapots active rigid bodies and the box with an open top a passive rigid body, set the collision shapes of all the rigid bodies to “mesh”. This will make the simulation run very slow, but assures us the most accurate results. In our case of a big static rendering, anything less than perfectly accurate would be unacceptable.

Once the simulation has been finished, freeze the resulting transforms from the cache (as in the image bellow), otherwise we might loose the fruits of our simulation.

And this is where the fun comes. Remember the polygon we added inside the teapot at the beginning? This polygon marks the position and rotation of every single teapot in our animation, and since it is part of a selection set, with all the teapot items selected, we can recall the selection set and cut and paste all the polygons in a single new layer that will serve us as the source for our replicators. After this, you might feel tempted to delete the teapots, but I would advise you to leave them in your scene for now, or at least leave a few of them for reference. The polygon from inside the teapot might have a different Y-axis rotation, most likely in a 90° increment, which is easily fixed by rotating the prototype object in its component mode. ( in modo 601, you can turn on replicator visibility in viewports, which will make referencing  the rotation a lot easier)

The next 3 images show these steps and what we get:

Now for the materials. All you need to do is to assign a material to our teapot prototype. A gradient set to particle ID should do the trick.

Just set some colors between 0-100% or 0-1 (depends on your unit settings) and already our rendering is starting to look good!

All that remains is to add an environment and some lighting, tweak some other material properties to your liking and in a matter of minutes we have a rendering like this one:

Hope you found this little trick useful. If you should have any questions, don’t hesitate to ask them in the comments section.

 

About the Author:

Related Posts

Sorry, the comment form is closed at this time.