Friday, 16 September 2011

Creating Panel Cloth

Creating Panel Cloth by Adnan Hussain Web: www.madguru.net

shalwar kameezIn this lesson I'll go over the process of creating panel cloth. We'll make a shalwar kameez, which is a traditional garment worn in Pakistan among other places. It presents some unique challenges above and beyond a tight fitted t-shirt, jeans or a simple dress. Remember, cloth isn't easy. Know that it will take time and require lots of clean up when running shots. It will add a significant amount of technical difficulty to a project, but if you spend the time to figure it out, it can really add a lot of depth to your work. This is in regards to cloth in general and not just 3DS Max as I've found the same to be true of Maya Cloth etc.

Cloth can be sculpted, as in you can build a model using the usual tools for modeling and apply a cloth modifier to make it into cloth. This is sometimes called object cloth. Another method is to create flat panels, much like a real tailor would do by cutting pieces of cloth. This second method (panel cloth) is what I will discuss here.

1. First gather some reference materials. Look at photos and if possible clothes that match or are at least similar to what you are trying to create.

2. In the top view create spline shapes (line tool, or any other shapes) in a flat plane in the shape of the cloth panels you wish to create. This needs to be done very cleanly or it will give you errors later. Spline vertices should be properly connected to each other and shapes should not overlap one another. They should all be in a flat plane (as in if you look at it from the front view you just see a straight line.)

Below you can see the layout for the Kameez (shirt) and to the right is a separate layout for the Shalwar (loose fitting pants).

panels

vertexAll splines for the Kameez were attached to one another. Then with all vertices selected, I hit the Break button to make each segment into an individual spline as required by the Cloth modifier.

Tip: Arrange these cloth panels (shapes) to fall within a square. This will later be the UV Layout for your Garment (cloth model).

Edit/Clone to create a Reference of the Panel object. By creating a reference instead of an Instance or Copy, we can use the Reference to create cloth and still maintain a connection to the original splines which can be adjusted for fitting etc and have changes reflected in the Reference object. I went back and forth a lot to get it right, so this was a huge help.

cloneclone options


Apply the Garment Maker modifer to the reference copy.

garment

Later when you make the changes to the original splines, come back here and hit Mesh It! to update this model.


1. Go into Garment Maker, Sub-object Panel and select, move and rotate panels around the character's body. Use a clean, low res stand in for your body.

Tip: With cloth sims, it is best to use a lower res, cleaner model based on your character's body that is specifically for cloth sim collisions.

Arrange the Cloth Panels as if you were going to sew the clothes on the standing character's body. Placement position and angle as well as relationship to other panels are crucial to creating a proper garment for cloth simulation. Again, it can take a good deal of back and forth depending on how complex the garment is. For things like sleeves and collars, you'll want to curve them by adjusting curvature.
panels

2. Next Create Seams between panels. This defines how the cloth panels are sewn together. First seam panels on each individual section before connecting them. For example, the back of the Kameez is two panels, so in Sub Object Seam, I selected the two edges of the panels where I wished to create a seam and then clicked Create Seam. Likewise the cuffs on the sleeve were seamed to the sleeve before the shoulder area of the arm was seamed to the front of and back of the Kameez.

seams

The green lines are seams. Notice how the panels are arranged so that seams don't generally go through the body. When it is simmed into shape, the cloth panels will be pulled together along these green seams. Make it easier on the cloth solver and you'll have less crumpled up mess and more properly simmed cloth. Likewise, when running the Local Sim, at first the shoulders had large bumps on them. I moved the sleeve panels away from the torso a bit and it had enough room to sim down cleanly. Likewise, this is where I adjusted fitting, based on simmed down results. Some areas needed more cloth and some needed less cloth, so I resized the original cloth splines in the top view then clicked Mesh It! in Garment Maker on the Reference object. This maintains the panel position (unless you move the splines around, which will shift it a bit or change the number of panels, which starts off flat again).

3. Next apply the Cloth Modifier to your Garment (Reference Object that has Garment Maker). This makes it Cloth. Click on Object Properties and click Add Objects to add the body. Assign the Kameez as a cloth object. You can load preset cloth properties from the drop down menu. These parameters can and should be adjusted based on simulation results.

Select the body in the Objects in Simulation list and click Collision Object below. Adjust Offset to specify how far cloth stays away from the body during simulation. Hit OK to apply changes in the Object Properties dialogue.

4. Scroll down to the Simulation Parameters rollout in the Cloth Modifier.

params

Make sure Use Sewing Springs is checked as that will pull the panels closer together based on the seams you created when we run the Local Sim next. Set Self Collusion if you want Cloth to collide with itself and Check Intersections etc as needed. If you have trouble with cloth crumpling up when simming down, these are some options that can be tried on or off to help it.

5. Scroll back up to the Object rollout and click Simulate Local (Damped).
object

This sims the cloth down on the local frame. Simulate Local does the same, but faster and Simulate goes frame by frame (what we use to simulate cloth on animated characters later). It can be good to slow it down a little with damped when you are simming the clothes down on the character.

Watch in the viewport as the cloth panels come closer to each other. At any time, click Simulate Local (damped) again to stop the simulation if it isn't the way you want it is as you want it.

If you don't like the results, or you have changed things earlier in the stack (adjusted panels etc) hit Reset State to prepare to sim local again.

This sims the cloth down on the local frame. Simulate Local does the same, but faster and Simulate goes frame by frame (what we use to simulate cloth on animated characters later). It can be good to slow it down a little with damped when you are simming the clothes down on the character.

Watch in the viewport as the cloth panels come closer to each other. At any time, click Simulate Local (damped) again to stop the simulation if it isn't the way you want it is as you want it.

If you don't like the results, or you have changed things earlier in the stack (adjusted panels etc) hit Reset State to prepare to sim local again.

reset state

Sim Local or Sim Local (Damped) can be stopped when the cloth panels are closer together and the shapes starts to drape on the body properly. The panels won't connect yet as seen below.

local

gravity6. Now that the panels are close together, we need them to connect. For this, scroll down and uncheck Use Sewing Springs, then scroll up and click Simulate Local (Damped) again.

It should usually closes the gaps very quickly and you don't want to run it too long or the ship could start to get messy.


panels

Generally any complex clothes will require a good deal of back and forth, adjusting the shape and size of the panels, then adjusting panel positions and adjusting simulation parameters and cloth properties to get the cloth draped. Remember, when draping cloth, you can use different cloth settings or add collision objects and animated locaters that move cloth etc as needed to get the cloth the way you want. You can later change the cloth properties etc for running shot simulations.


Below you can see how the Shalwar panels were arranged. In this case I had large cloth panels (on the legs) seamed into a smaller panel for the waist. Shalwars have naalas in them (like a draw string in the waist). So you have a large volume of cloth, scrunched up at the waist.

garment

Here, because the bottom opening of each leg is quite narrow, placement of the panels was really tricky. I need to to rotate them and give space for the pieces to slowly come together and also wrap around each leg properly. For the waist panels, I did something a little odd. I'm not sure if there is a better way, but I created a group out of the waist panel vertices by going to Sub Object Group, selecting the verts and clicking Create Group. Then I clicked Sim Node and chose the body, collision object for those points to stay with.

waist

groupI scrolled down and adjusted the constraint options on the group to make it soft. This way when I ran a Local Sim (Damped) to drape the Shalwar, the waist panels slowly came down and when they came to the right spot on the waist, I stopped the simulation. I unchecked the soft check box, then ran the Local Sim (Damped) with Use Sewing Springs off to finish the drape. In this case, the cloth puffed out a lot initially and I had to increase the density in under cloth properties to get it to rest closer to the body, without flaring out like a balloon.

There you have it. A quick look at creating panel cloth with 3DS Max's Cloth Modifier. There's a lot more to cloth than this. Definately check out the help file in max and read up on the Cloth Modifier and Garment Maker modifiers to get lots of in depth info on the parameters. This has been more of a practical look at how I have applied some of that for these clothes. If any of you have experience or suggestions you'd like to share, I too would love to learn.

Draped Render of the Shalwar Kameez.

shalwar kameez

Lighting & Setting up a Realistic Render with Vray and 3ds Max


Lighting & Setting up a Realistic Render with Vray and 3ds Max
by Alseso Web: www.aleso3d.com

lighting and setting

In this tutorial you will learn how to lighting and setting up a realistic render with Vray 2.0 and 3ds max 2011, also how to use ies lights, setting lighting with vray sun and vray sky and using vray physical camera, and see how you can set up your render.

To start i have used vray plane lights, vray sun & sky, photometric ies lights and vray camera, I used 3 plane lights for each window, all the lights have the same settings, you can see the settings in the right panel, this is how it looks from the top view

vray plane

Also I have used vray sun and sky, and this is the position for vray sun and the settings

vray sun

Now this it is time for the vray camera, and this is the settings of the vray camera.

vray camera

In the indoor lighting I used photometric ies lighting with vray, i did not used the vray ies because the standard photometric lights has more customizable settings/parameters, all the photometric lights have the same settings, this is an screenshot of all the ies lights in the scene and the settings.


ies lighting
If you want to download the ies file that i used in this scene click here

And this is how the ies looks like

ies

We are done with the lighting part here, let’s see the render settings, i usually use brute force, but in this time I was looking for some fast render times, and irradiance map + light cache is more faster than light cache + brute force, and this is the the render set up with vray

render settings

If you want to speed up the render time using this setting, go to the Settings tab, and in the Global Subdivision Multiplier change the 3 for 1. In photoshop i did a color correction, chromatic aberration and sharpen, nothing more. I hope that you have learned something and please if you have any question, just comment.

Some other renders from this project

interior 1

interior 2

interior 3

Create Realistic Clouds without plug-in

Create Realistic Clouds without plug-in by Khurram Shahzad, Pakistan

clouds

In this tutorial we'll learn how to create realistic volumetric clouds in 3ds Max without using any plug-in, this is step by step tutorial however I assume that you have the basic knowledge of 3ds Max and its interface.

"Note values used in material editor for this tutorial may have different effect on your clouds appearance due to system unit’s values, so experiment with different values to achieve the result you want."

Let’s get started..!

Create a plane with width and length 400 and segments to 50 and name it Cloud Dist. We will use this plane for particle emitter object using Pflow.

plane length

Assign a displace modifier and set the strength to 150. So plane has variation in geometry instead of just plane object.

displace

Now we need to create a displacement map for our plane object, for this we will use smoke map. Press M to open material editor, create a smoke map in empty slot and name it Displace Plne. Set size to 74, Iteration to 20 and Exponent 0.9, and assign this map to the Map slot of displace modifier.

displacement

We need to define the particle shape so we use the sphere, we can also define particle shape as sphere in Pflow, but this way we have bit more control over it, so create a sphere with radius of 25 and segments 8.

sphere shape

Hit 6 key on keyboard to open Particle view, and create standard flow. We don’t need anything fancy since we are using Pflow to distribute particle on our Cloud Dist object, so standard flow will do the job.

pflow

It is simple Pflow setup so in event gets rid of everything but Display and Birth. Set Birth mount to 150 it’s the total numbers of particles and emit stop to 0, this way all particles will born at frame 0.
birth

Create Position Object and Pic Cloud-Dist by clicking Add button or Add by list button. This way the particles will be born/distribute on the geometry we've created earlier.

clouds dist

Create a Shape Instance operator and pic Sphere and set the scale to 350 with 35% of variation. This way we will give our particles some shape (in this case Spherical) and scale is the max size of the particles with some variation so some spheres are big and some are small.

shape instance

Go back to material editor and create Gradient Map in to empty slot and Name it Envm-Background and copy the color values shown in the pics. We are going to create a background map so it doesn't show a simple plane color, but have some sort of horizon.

clouds

clouds2

Hit 8 key on key board and Instance this map to Environment Map slot.

environment
In to Empty slot Create standard Material and name it Clouds-Shader and change it to Ore-Nayar-Blin shader and assign this shader to the Sphere. This shader is good for soft looking materials/ shaders. So we'll use it for our clouds shader.

In the extend Parameters, change Falloff to Out and Amount to 100 and Filter color to 150,150,150 for RGB values. This way we can give the soft look to our clouds outer edges.

transparency

Instance this shader to Material Dynamic in Particle View. As we have instanced the sphere shape to particles, we will assign the material to sphere and it will inherit the material to all particles.

dynamic

Create a Falloff map in to empty slot and name it Diff + Self-Illume, we'll use this for the diffuse and Illumination in cloud shader. This way we can not only give our clouds self illumination but we can control it easily. Copy the Front and side color values shown in the Pics.

diff self illume

color

Try To match the Mix Curve as shown in the figure.
mix curve

Create another Falloff map in to empty slot and name it Cloud-Opacity and assign a smoke map in to the front slot. Now we are going to mask the out the unwanted edges of sphere particles and give our clouds more natural look.

cloud opacity

Name it Opacity-Smoke and set the size to 25, iterations to 5 Exponent to 0.701 and phase to 2.3.

smoke

Go one level up and into Mix Curve try to match the picture.

mixcurve

Now go to the Clouds-Shader and Instance the Diff + Self-Illume to the Diffuse and Self-Illumination slots and Instance the Cloudy-Opacity Map into the Opacity Slot of the Clouds-Shader.

clouds shader

In the top view create Target Directional Light, set shadow type to Ray Traced Shadows, Multiplier to 5.0, and color to white, overshoot on and Falloff/field to 500. We need only one light to illuminate our clouds and to define shadows raytraced shadows work best with opacity maps.

light

Create a Camera and select Mental Ray as Renderer Set Out-Put res and render the scene.

mental ray

render

Getting started in max (tutorials)

...