Difference between revisions of "Blender/Custom Creature"
Jump to navigation
Jump to search
m
no edit summary
imported>Kilza m |
imported>Kilza m |
||
Line 132: | Line 132: | ||
Once you have created these objects it's time to link them together. Without links they will act as seperate 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/ | Once you have created these objects it's time to link them together. Without links they will act as seperate 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 | ||
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 152: | Line 151: | ||
Once that's done it's time to adust our constraints. First in the Render menu make sure that everthing but Show Hidden is checked. In the render window we should now be able to see our collision objects as spheres or capsules. Inside of each capsule we can see our constraint as either a cone or a little circle. Cones are ragdoll constraints and circles are limited hinge constraints. The first thing to do is to adjust the pivot point of each a constraint to the bone joint. To do so select a constraint (click it), then in the Block Details window expand the Ragdoll or Limited Hinge block. | Once that's done it's time to adust our constraints. First in the Render menu make sure that everthing but Show Hidden is checked. In the render window we should now be able to see our collision objects as spheres or capsules. Inside of each capsule we can see our constraint as either a cone or a little circle. Cones are ragdoll constraints and circles are limited hinge constraints. The first thing to do is to adjust the pivot point of each a constraint to the bone joint. To do so select a constraint (click it), then in the Block Details window expand the Ragdoll or Limited Hinge block. | ||
For a Ragdoll Constraint I recommend setting Pivot A to 0/0/0, Plane A to 1/0/0, and Twist A to 0/1/0. This is a simple setup that will limit bone's rotation to about 115 degrees in any direction perpendicular to the bone's current orientation. Now right click Pivot B and choose A->B. Confused yet? Hope you remember (or at least heard of) radians from high school. Basically instead of degrees of rotation .nifs use radians. So instead of 360 degrees there are 3.1415926535 (ie. pi) radians of rotation possible. DO NOT enter a number above 3 (excluding friction and pivots) or it's likely nifskope will crash. If you don't want your joint to feature 230 degrees of rotation then you need to lower the last five entries above Max Friction. To keep it simple I recommend just entering equal values like .4 or .2 for each and looking at how it effects the constraint. Or you could take a look at this page and try to figure it out: http://niftools.sourceforge.net/wiki/ | For a Ragdoll Constraint I recommend setting Pivot A to 0/0/0, Plane A to 1/0/0, and Twist A to 0/1/0. This is a simple setup that will limit bone's rotation to about 115 degrees in any direction perpendicular to the bone's current orientation. Now right click Pivot B and choose A->B. Confused yet? Hope you remember (or at least heard of) radians from high school. Basically instead of degrees of rotation .nifs use radians. So instead of 360 degrees there are 3.1415926535 (ie. pi) radians of rotation possible. DO NOT enter a number above 3 (excluding friction and pivots) or it's likely nifskope will crash. If you don't want your joint to feature 230 degrees of rotation then you need to lower the last five entries above Max Friction. To keep it simple I recommend just entering equal values like .4 or .2 for each and looking at how it effects the constraint. Or you could take a look at this page and try to figure it out: http://niftools.sourceforge.net/wiki/Oblivion/Oblivion_Bhk_Constraints | ||
For Limited Hinge Constraints you can again move the pivot easily, but to be honest I haven't had much experience using them beyond that. I recommend you check that page linked above out or maybe copy a bethesda nif's values. | For Limited Hinge Constraints you can again move the pivot easily, but to be honest I haven't had much experience using them beyond that. I recommend you check that page linked above out or maybe copy a bethesda nif's values. | ||
Line 166: | Line 166: | ||
Making animations is simple. First choose a frame in the box to the right of the End box, then set up a pose by grabbing or rotating bones, select all bones, and finally do i->locrot again. Each time you do i->locrot you are adding a keyframe to the animation. You don't need a keyframe for each frame in the animation, but you need one at the start and end frames and the pose should look the same even if the armature itself has moved. Otherwise it's possible you will have your creature skipping from one pose to another between animations. The game engine can blend between individual keyframes in animations. http://i255.photobucket.com/albums/hh130/ | Making animations is simple. First choose a frame in the box to the right of the End box, then set up a pose by grabbing or rotating bones, select all bones, and finally do i->locrot again. Each time you do i->locrot you are adding a keyframe to the animation. You don't need a keyframe for each frame in the animation, but you need one at the start and end frames and the pose should look the same even if the armature itself has moved. Otherwise it's possible you will have your creature skipping from one pose to another between animations. The game engine can blend between individual keyframes in animations. http://i255.photobucket.com/albums/hh130/kilzaja/animationready.jpg | ||
You will need at a minimum a forward, fastforward, backward, idle, turn left, and turn right animation. If you want your creature to be able to attack you'll need more, cast spells more, etc. | You will need at a minimum a forward, fastforward, backward, idle, turn left, and turn right animation. If you want your creature to be able to attack you'll need more, cast spells more, etc. | ||
One thing to note is that to delete a keyframe if you make a mistake you should go to the NLA editor, choose the keyframe (only that keyframe), and press x. So how many frames should an animation be/how much forward should you move in a forward animation? You'll have to check out beth's animations to get an idea. http://i255.photobucket.com/albums/hh130/ | One thing to note is that to delete a keyframe if you make a mistake you should go to the NLA editor, choose the keyframe (only that keyframe), and press x. So how many frames should an animation be/how much forward should you move in a forward animation? You'll have to check out beth's animations to get an idea. http://i255.photobucket.com/albums/hh130/kilzaja/NLAeditor.jpg | ||
Once you have a decent looking animation you need to do two more things. First is to give the game specific cues using the text buffer. For instance, in cast and attack animations the game needs to know when to launch a fireball or to check if the swing hits a creature. In both cases you just add an entry like 25/Hit to tell the game when to launch/check. There are some other things you can add to the text buffer such as the Enum and Blend commands (see beth animations for exact syntax. To look at a beth animation you would import skeleton.nif with skeleton only + parent selected depressed, and import animation/choose an animation. Not all animations can be imported successfully). Enum tells the game when to play a sound. Blend is actually very useful because it controls how the animation loops. You don't want a creature at rest in a forward animation to return to that position at the beginning of each loop. I'll try to expand this section with details later. Also, don't forget the End command at the end frame like 45/End! | Once you have a decent looking animation you need to do two more things. First is to give the game specific cues using the text buffer. For instance, in cast and attack animations the game needs to know when to launch a fireball or to check if the swing hits a creature. In both cases you just add an entry like 25/Hit to tell the game when to launch/check. There are some other things you can add to the text buffer such as the Enum and Blend commands (see beth animations for exact syntax. To look at a beth animation you would import skeleton.nif with skeleton only + parent selected depressed, and import animation/choose an animation. Not all animations can be imported successfully). Enum tells the game when to play a sound. Blend is actually very useful because it controls how the animation loops. You don't want a creature at rest in a forward animation to return to that position at the beginning of each loop. I'll try to expand this section with details later. Also, don't forget the End command at the end frame like 45/End! | ||
Line 212: | Line 210: | ||
---- | ---- | ||
This subject has already been covered in adequate detail in the Custom Creature Creation tutorial in the CS Wiki located here: http://cs.elderscrolls.com/constwiki/index. | This subject has already been covered in adequate detail in the Custom Creature Creation tutorial in the CS Wiki located here: http://cs.elderscrolls.com/constwiki/index.php/Blender/Creature_Meshes_101 | ||
Please refer to | |||
Please refer to its CS Work: make a quickie mod section for the exact procedure. But I've also abridged the steps just to make sure this tutorial is somewhat complete. | |||
Also, here are a couple useful links for AI and Combat Styles: | Also, here are a couple useful links for AI and Combat Styles: | ||
http://cs.elderscrolls.com/constwiki/index.php/Combat_Style | http://cs.elderscrolls.com/constwiki/index.php/Combat_Style | ||
http://cs.elderscrolls.com/constwiki/index. | http://cs.elderscrolls.com/constwiki/index.php/Basic_NPC_Creation_Tutorial | ||
Your perilous journey is almost at an end! Open the CS without any mods loaded and create a new creature. Add your skeleton.nif. Press OK and Save your mod. Now reopen the creature and go to modellist. Choose your model (and pray). Click full preview (and pray). Test out your animations (and pray). Now just give him some simple AI and a combat style, maybe a few spells and some equipment and you're all set! | Your perilous journey is almost at an end! Open the CS without any mods loaded and create a new creature. Add your skeleton.nif. Press OK and Save your mod. Now reopen the creature and go to modellist. Choose your model (and pray). Click full preview (and pray). Test out your animations (and pray). Now just give him some simple AI and a combat style, maybe a few spells and some equipment and you're all set! |