Game Development Reference
In-Depth Information
// Set up alpha blending
Blend SrcAlpha OneMinusSrcAlpha
// Render the back facing parts of the object.
// If the object is convex, these will always
// be further away
// than the front-faces.
Pass {
Cull Front
SetTexture [_MainTex] {
Combine Primary * Texture
}
}
// Render the parts of the object facing us.
// If the object is convex, these will be
// closer than the
// back-faces.
Pass {
Cull Back
SetTexture [_MainTex] {
Combine Primary * Texture
}
}
}
FallBack "Diffuse"
}
Step 9. Play. The character now has a fully fledged flowing cape
complete with secondary animation. The final character is shown
in Figure 3.21 .
Note
The cape model used in the previous workshop was a freely available
model from Turbosquid. The original file had too many polygons to be
used for cloth rendering. It slowed down the processor such that the
application ran at a snail's pace. To reduce the polycount, the cape model
was opened with Blender, and with the object selected and placed in
Edit mode, the Poly Reducer was used as shown in Figure 3.22 . Running
this script several times reduced the cape down to fewer than 2000
polygons.
Search Nedrilad ::




Custom Search