Towel Tutorial Part I – Using Max Cloth Simulation
October 3rd, 2009
Hi everyone, this is my first mini-tutorial article for the Surreal Structures Blog. It is Part I of a two-part tutorial and deals with creating a towel with Max Cloth Simulation. Part II deals with creating a nice terry cloth material for the towel. Although meant for fryrender users, it may have useful information for users of other render software that supports micro-poly displacement. For those who are not interested in the tutorials, I will simply post my best try at a bath towel for you to gaze at in wonder, and ask those who are interested to read on.
Scene Setup
Towels and fabric objects in general are the bane of the visualizer’s existence, mainly due to the difficulty in producing a convincing shape and texture for the object. I created all of the objects in this particular scene in 3ds Max 2009 with simple primitives. I used a chamfered box for the room (top and two sides removed), a plane for the towel (more later), a torus and cylinders for the towel ring. I used a low-poly sphere for the key light. General illumination is provided by an hdr (high dynamic range) image put into the Environment map slot of the fryrender Environment dialog. I created a fryrender target camera and made sure the target was right on the towel. I used the default fryrender camera settings, but set focal length to 85mm.
The Towel (AKA The Bane of Our Existence)
To create a believable towel, we need to do a cloth simulation. The tutorial that I learned from is by Scott Onstott and you can see the video of it here. Using the Max Cloth modifier, you designate an object as a cloth object, and one or more objects as collision objects. For my towel, I’ve created a 60″L x 30″W plane and given it 60 Length segs and 30 Width segs. Be sure Generate Mapping Coords. is enabled. For the collision object, I’ve created a Torus object with a Radius 1 parameter of 16 inches and Radius 2 of .25 inches.
- Apply a Cloth modifier to the plane object (I’ve named it “towel”).
- In the Cloth rollout, click Object Properties.
- Select the towel from the list and set it as “Cloth”, then pick a preset. I used “Cotton”.
- Click “Add Objects” and add the torus object (I’ve named it “ring”).
- Select the ring from the list and set it as “Collision Object”. Use the default settings.
Note: If the collision settings for the collision objects are too small, the cloth has a hard time holding onto the object and will fall right through. You can do some trial and error with the settings to see how small you can go.
Now we’ll do a local simulation to get the towel to fold over the ring. In the Cloth modifier rollout for the towel, set the Simulation Parameters per Fig. 3. With the towel object selected, click the Simulate Local button and let it process until you like the way it looks. You can rotate and pan the view while it is processing so that you can make sure that it looks good from all sides.
Finalizing the simulation:
- Click Auto Key and set the Animation slider to 100.
- Select the ring (torus) and go into the torus properties. Say “yes” to the warning box.
- Set the Radius 1 parameter to 3.5″
- See Fig. 4 for all the settings.
- Turn Auto Key off and set the Animation slider back to zero. You are now ready to start the final simulation.
- Select the towel and in the Cloth rollout, click Simulate.
You will see that as the torus radius decreases, the towel is gathered along with it. You can stop it whenever you like, but if you let if run all the way to the end, you can adjust the Animation slider to any frame to get just the look you’re after. I adjusted my slider back down to frame 82 and then cheated by going back to the torus properties and setting the Radius 1 to 3.5″. This way the towel wasn’t quite as squished together.
If you look at the towel in the viewport, you will see that it is not quite there. You will want to add a Shell modifier and Turbosmooth modifier. Fig. 5 shows the towel before and after applying those modifiers. I’ve used the default settings for Turbosmooth and for Shell, set the Outer parameter to 0.25″. The rest of the settings are default. This gives the edges of the towel a nicely rounded shape that will do well with micro-poly displacement. If you need a rounder edge on the towel, set Turbosmooth iterations to 2.
We are almost finished with the towel object. Since we enabled Generate Mapping Coords. in the Plane object rollout, when we apply a bitmap texture, we see that it follows the terrain of the object. However, if we have a bitmap that is meant to be tiled multiple times, it will be stretched over the whole object. You have two options:
- Tile the bitmap in your render engine’s bitmap parameters
- Apply a UV Mapping modifier to the plane.
I have chosen to apply UV Mapping to the object, otherwise I would have to set tiling for each bitmap I use in the material. Setting the Size parameters in UV Mapping instead will allow you to input the physical size of your texture sample and give more realistic results. Place the UV Mapping modifier in the towel tree below the Cloth modifier. I’ve set Length and Width to 12″ because that is the approximate size of my fabric sample. Use Planar mapping. Box mapping in Max introduces unwanted artifacts and we don’t need it anyway.
Once your towel is the way you want it, make a mesh copy of it with the Snapshot tool in the Max Tools menu. I just use the default settings. If you named your object “towel” the snapshot will be named “towel01″. You would be wise to put the original towel in a safe place with the modifier tree intact in case you need to do tweaks – ie adjust thickness or smoothness or to remove the UV Mapping modifier.
You can download the scene I used for this tutorial here in Max 2009 format. You need to run the animated simulation. You will also need to add the UV Mapping (if needed), Shell, and Turbosmooth modifiers as I’ve described. I stripped those parts out to reduce the archive size. The non-tiled bitmap with an edge border is included in the archive. If you use that map, you won’t need to add the UV Mapping modifier.






Fran
I’ve just replicated your settings and my towel pretty much falls through the ring. It holds on by a couple of vertex points during the simulation. Any ideas why?
[Reply]
Frances Reply:
October 8th, 2009 at 1:58 pm
Yay! A comment! That’s the good news anyway.
Let me look at the setup again and make sure I didn’t mess up anything. Did you try running the simulation with the scene I linked to?
[Reply]
Frances Reply:
October 8th, 2009 at 2:09 pm
Did you change the collision properties Depth or Offset? I find that if I set them too small – in this case 0.25″, the cloth slips on by. At 0.5″ the cloth will hold onto the ring.
[Reply]
Karen Reply:
October 30th, 2009 at 12:49 pm
I’m having the same issue, and it doesn’t seem to matter what I set the depth and offset too. And mine isn’t holding on with any vertex points… it falls straight through. I’d love some other ideas on how to fix this? Can you tell me the sizes of your plane and torus? I love the idea of reducing the ring at the end, and really wish I could get this to work!
Thanks!
[Reply]
Frances Reply:
November 1st, 2009 at 9:54 am
Hi Karen,
Make sure Solid Collision is checked in the cloth’s Simulation Parameters rollout. Also, make sure the torus is designated as a Collision Object for the cloth object and that Enable Collisions is checked in the torus’ Collision Object properties.
That’s the only way I could get the Simulate Local operation to fail completely.
[Reply]
Anonymous Reply:
November 1st, 2009 at 11:30 am
Those items were checked. However, when I increased the poly count on the plane, it finally worked. I’m not sure why that made a difference, but it did. Thanks for the great tutorial.
Frances Reply:
November 1st, 2009 at 7:42 pm
Ok. That’s the one thing I didn’t try. I use a lot of length and width segments on the plane to get a smoother simulation.
Comment by Dave Buckley — October 8, 2009 @ 1:45 pm
Hello Fran, Im rubbish at this kind of stuff, so thanks for the tips. Ive done exactly this before, but without the step of reducing the size of the torus. Thats a winner.
[Reply]
Frances Reply:
October 9th, 2009 at 11:22 pm
I’m glad this is helpful. I’ve posted another cloth tutorial – just a simple duvet/comforter. Next I plan to do a folded throw or blanket.
- Cheers!
[Reply]
Comment by Anonymous — October 9, 2009 @ 11:34 am
[...] usando o Cloth do Reactor, existe um tutorial que explica em detalhes o procedimento para criar o modelo 3d de uma toalha com o auxílio do Reactor, nesse endereço. Além da modelagem em si, o tutorial aborda a criação do material para a toalha no FryRender de [...]
Pingback by Tutorial 3ds Max: Modelando uma toalha com Cloth e MPD no FryRender - Allan Brito — October 13, 2009 @ 10:36 pm
Thanks Man Great Tutorial
[Reply]
Comment by mohameD — November 12, 2009 @ 7:13 am
HI
You are really good, i have tried this but the plane does not wrap round the spline, What am I doing wrong…Thanks
Lily
[Reply]
Comment by Anonymous — December 6, 2009 @ 4:53 pm
HI
You are really good, i have tried this but the plane does not wrap round the spline, What am I doing wrong…Thanks
Lily
[Reply]
Comment by Lily — December 6, 2009 @ 4:54 pm
Sorry that was a wrong comment, i meant that for the folded blanket tutorial.
[Reply]
Comment by Lily — December 6, 2009 @ 4:55 pm
[...] this two part tutorial, you will learn to set up, light, and render a towel using 3ds Max Cloth. Part 1 Part [...]
Pingback by 65 Mold-Breaking 3ds Max Tutorials « Neykovi Design — December 15, 2009 @ 3:10 pm