Difference between revisions of "Blender/Custom Creature"

368 bytes removed ,  08:22, 22 July 2011
imported>UDUN
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 end of the bone. Move the cursor to the center of the bone as best you can. Go back to object mode. Press space->Add->Mesh->Cube. Go to Edit mode. Adjust the cube's shape, size, and orientation so that it roughly covers the area assigned for this bone's vertices. It should be a little bigger than the part of the mesh controlled by this bone. DO NOT RESIZE OUT OF EDIT MODE. Now go back to object mode. 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. DO NOT ADJUST THIS OBJECT AGAIN.
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.
 
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 122: Line 124:




If it doesn't look right create a new object and delete the old one. Now go to Logic View (F4). With your new object selected choose Actor->Dynamic->Rigid Body and turn Bounds on. You'll notice that there is now a little sphere outline inside of your object. This is telling you that your object is set up for physics in the gameworld and that your object is centered on the sphere. Please don't try to edit your object from now on, as it will mess up on export and cause many problems.
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. 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 finger, etc., however if you DON'T create an object for a bone and it's in a chain without an object further down it's bone chain then it won't have any animation to inherit once the creature is dead. This is an issue because after death it will keep playing the same animation it was playing last over and over again. This means if the animation was curling the fingers on the hand into a fist, the creature will do that over and over again. Whether that will look appropriate is up to you. However I recommend only making objects for major body parts as ragdoll physics can be VERY taxing on even the best systems.


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.


You only need an object for parts of your mesh, not the special bones like Bip01 or magicNode, because their animations don't matter after creature death, and Bip01/Bip01 NonAccum inherits from other bones.
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 is what happens to the storm atronoch when he dies! 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
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


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.
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.
Line 155: Line 155:




The last thing that we may have to fix is the BSBound Box. If it isn't immediately under the scene root then you need to move it up to the scene root. Also, you may have to adjust its size since it isn't a box any more. Heh. WHEH! Save that sucker and get ready for animations! http://i255.photobucket.com/albums/hh130/kilzaja/BSBound.jpg
The last thing that we may have to fix is the BSBound Box. If it isn't immediately under the scene root then you need to move it up to the scene root. Heh. WHEH! Save that sucker and get ready for animations! http://i255.photobucket.com/albums/hh130/kilzaja/BSBound.jpg
 


==Creating Animations==
==Creating Animations==
Anonymous user