Developer's Diary Some words on track design and just generally 3d modelling

6Jan/12Off

How to: Use 3ds max to texture tents

Free-hand drawing isn't exactly my strength. I look at things by figuring out their spatial geometry, dissecting the objects features, figuring out how deep it is and at what angles the edges meet. To draw or paint pictures you're more supposed to make a 2d "photo" in your mind of a scene (or at least that's what I learned in art classes), which is quite the opposite of how my brain takes in scenes.
One piece of art that has suffered because of this were my tents. I managed to find ways to get by but I wasn't quite happy with the quality of those textures. Well, that's about to change. I have found a way to help me get that basic shading and creases without too much effort, through a process that I can quickly adapt to any kind of tent structure. Here's how:

What you need is 3ds max and the necessary skills with it to build the supporting structure of your tent. So not much really, if you're building tracks with 3ds max that would be a given. You should build the supporting structure of your tent first, or - if you don't need it modeled at all for in-game use - at the very least know how the tent is structured underneath the fabric. Create a plane above it that covers the area you want to span your tent cloth over. Add some centimeters to the edges as a safezone if you want to add ripple effects later or when you're creating a vertical cloth. This is roughly what you should have now:

Now make sure your vertices align with the supports so that you have a row of polygons above them - these will be the vertices we will be keeping fixed later on. You can see my beam in green if you look closely:

The time has now come to apply the Cloth modifier (just find it in the Modifier List when you have the cloth object selected). First thing after that, open the Cloth modifier by clicking the + in front of it. Then select the Group level and select the vertices we need to keep fixed, those to either side of the beams and - depending on the exact structure of your tent, usually also the outer edges. When you have them all selected, click on "Make Group". Name it anything you like:

In the Group list, select the group you have just created and click "Preserve" (right column, 5th from the top) to tell 3ds max that this is the group of vertices that will not be modified when doing the cloth simulation:

Now we need to create some outside forces so the cloth goes where we want it to. If you're just using horizontal cloth you can probably skip this step, for vertically hung tent walls you will likely want at least some wind though. In the Create panel click on Space Warps (the wavy thingy) and create two such Space Warps: Gravity and Wind. Depending on which viewport you were using when creating the Wind space warp, you might need to rotate it to get the effect you want. I rarely use the full force. Try with lower values like 0.1 or 0.2 first:

Reselect your cloth object and on the main modifier panel (not the group one we used earlier) click on Cloth Forces. Add Gravity and Wind to the Simulation.

Close that window by clicking OK and now open the Object Properties window. Select your object, switch it from "Inactive" to "Cloth" at the top and chose a Preset. I've chosen Burlap for this object. Softer cloth like Satin or Silk wrap more but also get blown around more/drop a lot more and you might need to adjust your forces.

Here the fun part begins. Click "Simulate Local" and watch! You can stop it at any point in case you reach your desired state early. If it ends up horrible, click "Reset State" under Selected Objects manip to reset the cloth simulation. As you can see, my cloth worked out quite fine. But then if it hadn't, I wouldn't have written up this How To. ;) It looks exaggerated (and is), but since I'm using this object only for rendering for a layer of the eventual layer, exaggerated is good. I can just dial it down later if it ends up too much.
Pic 08
If you so wish (and well, I did) you can add Ripple modifiers too so the cloth looks more natural. The Ripple modifier creates a ripple like the wavepattern that you're getting when you drop a rock into water. To get a decent effect on the cloth, I moved the center of the ripple off to the side of the cloth, rotated it some and used the settings you can see on the screenshot. Repeat off the other side of the tent roof:

Have fun with your newly acquired skill!
If you have got a question, leave a comment.

Tagged as: Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.