Difference between revisions of "Blender/Custom Creature"

370 bytes added ,  08:41, 22 July 2011
imported>Hashmi
imported>Hashmi
 
Line 115: Line 115:




This process may seem convoluted, but you must follow the steps as best as is possible. Basically we are going to recreate the shape of our mesh using simple shapes centered on individual bones. Begin with your armature selected in edit mode, front view. Select the biggest, most centrally rigged bone and do shift->s->Cursor->Selection. Now your cursor is at the Centre of the bone. Go back to object mode. Press space->Add->Mesh->Cube. Scale (but do not rotate) the mesh to fit and then press Ctrl+A to apply scale Data. Next rotate it if you need to but do not apply scale and rotation again (If you need to change the scale from now on do it in edit mode only). It should be a little bigger than the part of the mesh controlled by this bone. In the Panels window select Object View (F7). With the square selected in the draw box change the drawtype to Bounds and in the Draw Extra dropdown box to either Sphere or Cylinder, depending on what fits your mesh shape better. Now go to Logic View (F4). With your new object selected choose Actor->Dynamic->Rigid Body and turn Bounds on.  
This process may seem convoluted, but you must follow the steps as best as is possible. Basically we are going to recreate the shape of our mesh using simple shapes centered on individual bones. Begin with your armature selected in edit mode, front view. Select the biggest, most centrally rigged bone and do shift->s->Cursor->Selection. Now your cursor is at the Centre of the bone. Go back to object mode. Press space->Add->Mesh->Cube.  
 
In the Panels window select Object View (F7). With the square selected in the draw box change the drawtype to Bounds and in the Draw Extra dropdown box to either Sphere or Cylinder, depending on what fits your mesh shape better. Now go to Logic View (F4). With your new object selected choose Actor->Dynamic->Rigid Body and turn Bounds on.  


In object mode or edit mode, Scale the mesh to fit the bone (do not rotate) and apply Scale Data (Ctrl A - if you do this in Object mode, not required if you scale in edit mode). Next rotate the mesh if it is required in Object mode (DO NOT APPLY ROTATION DATA ... if you need to scale after rotating do so only in edit mode and do not rotate in edit mode.)
In object mode or edit mode, Scale the mesh to fit the bone (do not rotate) and apply Scale Data (Ctrl A - if you do this in Object mode, not required if you scale in edit mode). Next rotate the mesh if it is required in Object mode (DO NOT APPLY ROTATION DATA ... if you need to scale after rotating do so only in edit mode and do not rotate in edit mode.)
Line 123: Line 125:
http://i255.photobucket.com/albums/hh130/kilzaja/Capsulesetup.jpg
http://i255.photobucket.com/albums/hh130/kilzaja/Capsulesetup.jpg


The next step is to tie this object to the specific bone. To do so, first select your armature and go to pose mode. Now select your object->shift->rclick the bone. If you select the armature you weren't in pose mode at the start. Ctrl->p->Bone to make the collision object the parent of this bone.


The next step is to tie this object to the specific bone. To do so, first select your armature and go to pose mode. Now select your object->shift->rclick the bone. If you select the armature you weren't in pose mode at the start. Ctrl->p->Bone to make the collision object the parent of this bone.  
You may (and should) also assign the mass to collisio objects within blender. In logic view, change the mass value and also add a new float property named Mass with the value that you want. For a general idea of mass values ... a single human thigh in oblivion has a mass of 45, whereas its first collision object (on Bip01 NonAccum) has a mass of 60. In general masses should decrease from the central object to ends.
 
 
Now create an object for each of the bones that make up the major parts of your mesh. You don't need an object for each and every bone (for example fingers) because bones will inherit Physics from other bones, higher or lower in their Heirachy ... remember however that if a bone does not have any Physics data to inherit from then it will keep playing the creature's Idle Animation. Also you don't need an object for special bones like Bip01 or magicNode, because their animations don't matter after creature death ... most bethesda creatures have Bip01 NonAccum as the first bone with a collision object.
 
 
Once you have created these objects it's time to link them together. Without links they will act as separate bodies and fall apart. { Depending on how you have segmented and skinned your mesh ... this can lead to two things in game ... for some like the skeleton and Storm Atroanch it will cause limbs to get cut off and fall apart ... for others it will cause ugly vertex distortions.}
 
If you don't want the collision bodies to fall aprt then you would need to link them together with "constraints". Constraints basically work like Joints, they hold together collision bodies while only allowing limited movement. There are a number of constraints we can put between objects that will limit their movement. The ones Bethesda used for their skeletons are outlined on this page: http://niftools.sourceforge.net/wiki/Oblivion/Oblivion_Bhk_Constraints
 
Blender can only create two of these constraints, the bhkLimitedHinge Constraint and the bhkRagdoll Constraint. We will use the limited hinge for hingelike joints like a knee or elbow that only rotates on one axis, and the ragdoll constraint for more free joints like neck, hips, shoulders etc.


Now create an object for each of the bones that make up the major parts of your mesh. You don't need an object for each and every bone (for example fingers) because bones will inherit Physics from other bones in their Heirachy ... remember however that if a chain does not have any Physics data to inherit then it will keep playing the creature's Idle Animation.
To create these constraints select the object that is FURTHER DOWN the creature's armature hierarchy. For instance, if we have an upper and lower leg, each with an object, in Object Mode select the object linked to the lower leg. Go to Object View (F7) and in the Constraints box choose Add Constraint->Rigid Body Joint. You can choose either Ball or Hinge. Ball is for the ragdoll constraint and hinge is for the limited hinge constraint. Now in the toObject box type the exact name of the other object this object is linked to. For instance, if this one is named box 5 and the one for the upper let is named box 4 type box 4. Press enter and the red box should go away.


Also you don't need an object for special bones like Bip01 or magicNode, because their animations don't matter after creature death ... most bethesda creatures have Bip01 NonAccum as the first bone with a collision object.




Once you have created these objects it's time to link them together. Without links they will act as separate bodies and fall apart. {This can mean two things in game ... for some like the skeleton and Storm Atroanch it will cause limbs to get cut off and fall apart ... for others it will cause ugly vertex distortions.} However, it isn't appropriate for most creatures, so we have to recreate the skeleton's movement as best we can. There are a number of constraints we can put between objects that will limit their movement. The ones Bethesda used for their skeletons are outlined on this page: http://niftools.sourceforge.net/wiki/Oblivion/Oblivion_Bhk_Constraints
You can position


Blender can only create two of these constraints, the bhkLimitedHinge Constraint and the bhkRagdoll Constraint. Basically, we will use the limited hinge for hingelike joints like a leg that only rotates on one axis, and the ragdoll constraint for everything else. To create these constraints select the object that is FURTHER DOWN the creature's armature hierarchy. For instance, if we have an upper and lower leg, each with an object, in Object Mode select the object linked to the lower leg. Go to Object View (F7) and in the Constraints box choose Add Constraint->Rigid Body Joint. You can choose either Ball or Hinge. Ball is for the ragdoll constraint and hinge is for the limited hinge constraint. Now in the toObject box type the exact name of the other object this object is linked to. For instance, if this one is named box 5 and the one for the upper let is named box 4 type box 4. Press enter and the red box should go away. This is all the detail we can achieve in blender for each joint, so link each object together to recreate the armature hierarchy, starting at the farthest from Bip01 and going inward.
This is all the detail we can achieve in blender for each joint, so link each object together to recreate the armature hierarchy, starting at the farthest from Bip01 and going inward.




Anonymous user