[quote="AceMastermind"]First off create your character and cloth object and texture them or do whatever you have to do.
Make your cloth object a child of "dummyroot".
Then envelope your character mesh to the bones and edit the weights.
Now envelope your cloth object.
If you made a cape and it drapes down from the neck area just envelope the cape object to both left and right clavicle bones or maybe just the neck bone, play around with it to get the best results ingame.
If you made a kama then just envelope it to the pelvis bone.
This is so the cape object will follow your unit properly, such as when jumping, rolling, crouching and so on.
Now we need to make some cloth collision, go to:
Get>Primitive>Polygon mesh>sphere or cylinder(i've seen both used by Pandemic)
and scale it down with the PPG to keep the primitive properties then translate it into place, do not freeze their transforms, add as many spheres/cylinders as you think you need to keep the cloth from flowing through the legs, body, and torso.
Rename your cloth collision spheres c_somename, c_somename1 and so on or whatever and make them a child to the bone that you want them to move with.
Most of the shipped cloth collision primitives made by Pandemic were named after the bone that they move with, such as:
c_ribcage, c_l_thigh, etc....
Now select your cloth object and go to the "Pandemic Tools" and click on "Create Cloth".
A property page(ppg) will come up.
At the top of the ppg you will see a section titled "Collision", in that section you will also see a button that says "Select Collision Objects", press that button and a picking session will begin.
Select all of your cloth collision primtives(ex: c_whatever) then right click to end the picking session.
Now with the ppg still open you will see another section titled "Fixed Points".
Fixed points are the vertices on the cloth object that will attach to the player model, in other words these are the vertices that will ignore the cloth properties(deformation) making it look like the cloth is attached to the player.
For example, if you're making a cape that starts around the neck just select the top row of vertices on the cape object and that will be the fixed portion of the cape.
Close the ppg and you're done, hide(press H on your keyboard) your hp_weapons, bones, dummyroot, sv model, and collision primitives then branch select(middle mouse click) dummyroot and export your model giving it a name and save destination.
Now you need to set up the cloth ODF, just copy one from the assets and rename it to whatever the name of your cloth object was in XSI.
Inside that cloth ODF enter the mesh name of your exported unit:
attachedmesh = "name_of_exported_mesh " (without the ".msh" part appended)
Don't forget to enter the code in the unit's ODF to enable the cloth ingame:
ClothODF = "name_of_your_cloth_ODF"
I also noticed that the more polygons that your cape has then the better it will deform ingame, but there are a few properties you can add to the cloth ODF to make it deform how you want.
From the docs:
There are other properties that you may have in a cloth ODF – we have rarely had occasion to use them, but they are:
(Note that [parameter] means a number, like 20.4, not [20.4])
// ---list of optional cloth parameters---
// Angle of the wind, phi and theta
WindDirection = “[angle1 in degrees] [angle2 in degrees]”
// Wind speed, in m/s
WindSpeed = [speed]
// Dampening coefficient – in some unit or other :^) Default is 0.5
Dampening = [number]
// Drag coefficient, also in some unit – default is -2.0
Drag = [number]
// Mass of each cloth “particle” (in Kg?) – default is 1.0
ParticleMass = [number]
// Maximum world acceleration, in m/s/s – default is 20
MaxAcceleration = [number]
// Priority – cloth with lower priority is skipped,
// if not enough time is left this frame – used for the Emperor
// Default is 0
Priority = [number]
// Does this cloth have an alpha channel? 1 or 0, Default is 0
Transparent = [value]
// BF2 has 3 different types of constraints it satisfies each frame
// when computing the cloth:
// “Bend” constraints keep the cloth’s shape.
// “Stretch” constraints keep the cloth’s size.
// “Cross” constraints keep individual pieces of cloth from shearing.
// You can turn these on or off individually by specifying a
// zero for the constraint.
// For example, if you turn off “stretch” constraints the cloth
// can grow longer or shorter…
CrossConstraint = [zero or one]
BendConstraint = [zero or one]
StretchConstraint = [zero or one][/quote]