|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]||[ Search: ]|
Written by Alexandru - Teodor Voicu, firstname.lastname@example.org.
Furmeshes support a variety of animations, from simple inherited animations, that come from objects on which the furmesh is attached, to complex animations, based on physics objects, such as Bullet ropes.
There are three main interfaces that can be used for animating furmeshes:
iFurAnimationControl. This interface only provides the most basic methods needed to update guide fur strands positions (see section Furmesh Mesh Object) on each frame. It can be used to initially set up the furs directions and disable it afterwards.
iFurAnimatedMeshControl. This interface extends the
iFurAnimationControlin order to support simple animations inherited from the base mesh. As the name suggest this only works with AnimatedMeshes, but can be easily extended to support other types of meshes that provide access to positions, normals, tangents and binormals render buffers.
iFurPhysicsControl. Although the
iFurAnimatedMeshControlcan be used for animating fur, for animating hairs, physical forces, such as gravity or winds or adequate response to movement, had to be added, using dynamic systems. The
iFurPhysicsControlinterface is designed to work with Bullet dynamic system to provide a physical simulation for hair on Animated Meshes.
iFurPhysicsControl is done
iFurMeshType interface, using the
An example of creating such
iFurAnimationControl interfaces is:
... // Load furMesh csRef<CS::Mesh::iFurMeshType> furMeshType = csQueryRegistry<CS::Mesh::iFurMeshType> (hairTest->object_reg); if (!furMeshType) return hairTest->ReportError("Failed to locate CS::Mesh::iFurMeshType plugin!"); ... // Create Hair Physics Control hairPhysicsControl = scfQueryInterface<CS::Mesh::iFurPhysicsControl> (furMeshType->CreateFurPhysicsControl("krystal_hairs_physics")); // Set up Hair Physics Control hairPhysicsControl->SetBulletDynamicSystem(hairTest->bulletDynamicSystem); hairPhysicsControl->SetRigidBody(headBody); hairPhysicsControl->SetAnimatedMesh(animesh); ... // Create Animation Physics Control animationPhysicsControl = scfQueryInterface<CS::Mesh::iFurAnimatedMeshControl> (furMeshType->CreateFurAnimatedMeshControl("krystal_hairs_animation")); // Set Animation Physics Control animationPhysicsControl->SetAnimatedMesh(animesh); animationPhysicsControl->SetDisplacement(ifms->GetDisplacement()); ... // Regiseter Animation Control with the furmesh furMesh->SetAnimationControl(animationPhysicsControl); furMesh->StartAnimationControl(); ...
This document was generated using texi2html 1.76.