Jump to content
pornphile

[3ds Max] [Skyrim] Video: Animation Tutorial

Recommended Posts

Overview:
 
This is a video tutorial meant to serve as a complement to the skeleton controller rig. I start an animation from scratch and walk you through the entire process until the end. Everything in the video was done in 8 minutes at moderate speed, real time. Those familiar with 3ds Max could finish in 15 minutes. I don't imagine noobs taking more than 30.
 
The video and the rest of this guide concentrates on the technical side rather than the aesthetic. Which is to show you a workflow that by the end, you have something to show for. I also recommend OS_Ceo's guides, which delve more into aesthetics and theory.
 
 
Requirements:
 
You need to have the following set up and have some basic understanding of 3ds Max:
 
Niftools (To import meshes)

 

Max 2010 - Havok Content Tools 2010.2* or
Max 2012 - Havok Content Tools 2011.3* + hktcnv.exe (To conver xml to hkx)

*Since Microsoft has bought Havok, HCT is no longer publicly availabe. Links kept for reference. However, try looking around. A download manager might help, like jdownloader2.

 

Skeleton Controller Rig (You can use another rig, if you're so inclined. The video is general in nature, but there will be differences)
PEN Attribute Holder 2 (The above rig needs this for full functionality)
 
I'm using Dream Girl if you want to replicate the tutorial. Recommended.
Use Better Males if you need a male mesh.
 
Usage:
My rigs come configured with Havok filters ready for export. If you save the rig scene before HCT is installed, you'll lose the Havok settings. Ensure HCT is properly installed prior to working with the rig to avoid complications. Restarting from a clean rig scene with HCT installed should also resolve this. The Havok filters from the rig scene should look like this when HCT is installed:

post-8195-0-16127800-1442853528_thumb.jpg

 

This is the basic outline the video goes through:

  • Import a body mesh. What mesh you use is unimportant. It's only used as a visual aid in animating.
  • Freeze body meshes. Hide all layers except body mesh and Controllers to reduce clutter.
  • Make your animation.
  • Unhide/unfreeze all layers. Set up proper annotations.
  • Ctrl+A to select everything in the scene.
  • Save your animation. Animation menu --> Save Animation. Tick segment & Key Per Frame. Specify time frame. Save motion.
  • Load your animation back in. Animation menu --> Load Animation --> Load Motion.
  • Export using Havok Content Tools.
  • Test your animation in game.


 
 
Here are the finished work files. Everything except the Dream Girl meshes and hktcnv.exe are included:
Animation Tutorial Work Files.7z
 
 
Afterwards:
 
Now that you've got your first animation under your belt and know how the process works, you'll no doubt want to start making real animations. Here are some resources to help you on your way:
 

Animators: Export final animations using FRAMES:TICKS. Exporting a 30 fps animation using Frames actually results in a 29.7 fps animation. Using FRAMES:TICKS apparently fixes this. I remember reading about this but can't find the source.

 

 

Hand positions not aligned in game but look alright in 3ds Max?

 

 

 

 

 

Is this topic still alive or ded?

 

First, this is a neato tool, huge thanks.

 

Second any reason why exported anims in the game ignore the placement of NPC L HAND? Its just not in the same pose as it was in the 3dsmax, a slightly moved away on the y-axis.  Could it be issue with the ik/fk? I have blends set to 0.0 and elbow swiwel at 2.5. I have tried going back to the previous saves and re-aligning/re-keying fresh and it does not fix it. NPC R HAND appears as it should. No idea what could cause it.

 

Third. Are the hkx files supposed to be that big , 60kbs for 60keyframed static pose? I did exported as .xml ( xml was around 48kb ) and converted to .hkx

 

Thanks for any help or tips.

2. Post comparison pics. Post your Max scene file.

3. Repack hkx to reduce file size.

 

 

Pornphile,

 

First of all, thanks for these awesome rigs! Unfortunately, I'm having a similar problem to Dagren's above concerning hand alignment. I just can't get fingers/hands to align properly in game after export. I'm using your rigs with 3ds Max 2012 and HCT 2011.3. I'm exporting using the vanilla rig 99 bones txt file...however this problem also occurs with the XPMS 1.6 txt file.

 

For reference, I used the Dreamgirl body in game and in 3ds Max. I am attaching a couple of screenshots and my scene file. It's just a simple pose I'm renaming to mt_idle to test. I previously posted this on the new (inactive) site, so reposting here. The scene file I've attached here is better anyway. This is a major road-block to me producing quality animations, so any help and/or advice is greatly appreciated.

 

 

 

Answer to Dagren via PM but is useful here as well:

 

The issue is because the in game female skeleton have hands scaled at .85. To get better representation in Max, you can scale the hand bones to 85. Before exporting, you must rescale the hand bones back to 100 else you will end up with crushed fingers.

 

Scale uniform in World coordinates:

http://www.loverslab.com/index.php?app=core&module=attach&section=attach&attach_rel_module=msg&attach_id=279479

 

BTW, Can you see the pic in the link?

 

 

 

 

 

Leito's source animation files: Look under Resources section.

 

Don't want to make animations from scratch? These are a great way to get up and running. With the source files, it becomes a trivial task to make positional adjustments, make different character combinations, or use as a base to make new animations altogether.

 

Thank you Leito.

 

 

 

 

To improve 3ds Max rendering performance:

 

 

-Use layers to hide clutter

-Use single viewport

-Use Shaded mode

-Turn off stats

post-8195-0-22335300-1441421524_thumb.jpg

 

-Reduce interpolation of controller objects to zero

post-8195-0-21366600-1441421732_thumb.jpg

 

-Add Optimize modifier to reduce mesh poly. Adjust Face Thresh:

post-8195-0-10744900-1441422238_thumb.jpg

 

 

 

 

Adding objects and using furniture.

 

Refer to FNIS for Modders Documentation

 

 

 

Making animations for SexLab.

 

 

Tutorials don't tell you how to export for SL because SL is not part of the animation pipeline. To implement animations into SL requires new skill sets and new tools. This is why some animators release their animations as a mod resource.

 

Requirements:

Skyrim Creation Kit + all the needed script source to compile.

FNIS

 

Firstly, test your animations. Do not replace another mod's animations as it can apply its own script rotations. Instead, simply replace mt_idle.hkx for all your tests. If it looks good as mt_idle, as far as animation is concerned, you're finished.

 

Move on to implement the animations for SL:

Follow the written instructions here. by ~magic~

 

Alternatively, you can look at another mod's source and replace all of their animation instances with your own. Then recompile.

 

Direct your questions to people who have experience adding animations to SL, like Rydin. Also look through FNIS for modders documentation.

 

---

 

To get back to your other questions; each character needs to be exported individually. If you replace someone else's animation and get default pose, you probably didn't run FNIS. Simpler to test as mt_idle.

 

 

 

 

How to quickly reskin a custom body mesh for use with the Controller Rig.

Meshes skinned to this rig should only be used for animation.

 

Of course, this is not the proper way to go about skinning. This is just a quick way to not have the mesh implode in on itself for animation purposes.

We're simply copy/pasting the Skin modifier from Dream Girl to a custom mesh:

 

1. Open F+M scene file
2. Delete the male rig.
3. Unfreeze Dream Girl female mesh layer.
    post-8195-0-68872600-1427652687_thumb.jpg
4. Import your custom body mesh. Make sure Import Skeleton is unticked.
5. Select your custom mesh. Under Modify panel, select the Skin modifier. Click through warnings. Delete the Skin modifier.
    post-8195-0-53980100-1427654305_thumb.jpg
6. Save/reload the scene to get rid of any graphic glitches.
    post-8195-0-72189400-1427654780_thumb.jpg
7. Select Dream Girl mesh, select Skin modifier, Right Click Skin modifier, Copy.
    post-8195-0-29909300-1427655505_thumb.jpg
8. Select your custom mesh, Right Click on Editable Mesh, Paste.
    post-8195-0-56231800-1427656022_thumb.jpg
9. Finish. You will still have some distortion but the mesh will deform properly when animating.
    post-8195-0-99310200-1427656787_thumb.jpg
 
Finished Example:
Reskinned UUNP Example.7z

 

 

 

 

Max 2012 users can save some extra steps. by Leito

 

Hey,
 
Thought you might be interested in knowing, if you're using 2012, you can skip steps 4, maybe 5, 6, and 7.
 
4 - Hktcnv.exe will automatically setup annotations based on the xml file name during conversion.
 
5 - HCT will work with nothing in the scene selected as long as everything that you want to export is unhidden.
 
6 and 7 - Animations will work just fine without having to have every frame keyed.

 


 
Optimize your final hkx files and batch convert multiple files. by Arocide

 

Pretty good tutorial, but there's one last step you can do if you wanted and that is converting it to a packfile using hkxcmd since tag files are portable and not optimised for any one platform although as mentioned before the major one is it being in an XML format not a good idea to release any animation like that (by all means use xml if you want while creating, modifying, and prototyping a mod, just make sure they are binary at the very least before you go releasing anything).
 
As a sort of step it's pretty much these two commands in command prompt:
 
hktcnv.exe <Source File> <Destination File>

hkxcmd.exe convert -v:WIN32 <Converted File> < Final Destination File>
 
and you're done! All compressed, and optimized. Pretty easy really, could batch it too if you wanted.
 
As a sorta idea on what you are saving by doing this: A single 171 frame animation I was working on went from a 400KB xml tag file to a 80KB Binary PackFile,  that's 320KB of memory saved when it's loading the animation that can be used elsewhere.
 
So Binarify your files, my fellow animators ;)

 

I am not really that great with batch so someone could probably do better then this, but I have hktcnv, hkxcmd and a bat file in the same directory, and a sub directory which contain the hct 2012 tagfiles. I use this bat  (create a new text file and just copy paste this into it then change its extension to .bat):

@Echo Off

for /r %%v in (*.hkt) do hktcnv "%%~v" "%%~nv.xml"

for /r %%i in (*.xml) do hkxcmd convert -v:WIN32 "%%~nxi" ".\export\%%~ni.hkx"

del *.xml

Exit
It pretty much runs hktcnv on all .hkt files in the same directory and sub directories which produces a temporary .xml file (the 2010 Tagfile) then runs hkxcmd on all the .xml files and places them as a hkx file in a sub directory called export. Then just deletes xml files in it's directory for a bit of a clean up. Not particularly elegant but it does the job.

 

 


 
2 Actors animation. by Arrok


Here is my own quick tutorial on 2 actor animation (please make sure you can at least replace the game's default mt_idle using havok content tools and a BBP skeleton before attempting this)
 
 
 
 
 
 
 
I use the CHSBHC skeleton for male and female.
 
So yes exactly, just import the male meshes over it.
 
You can get her animation rig scene max file from her nexus page for max 2011.  I just start with that rig. I have one saved with male meshes called "male templet" and one saved loaded with female meshes called "female templet"
 
With those 2 separate scenes,...heres how you combine them to animate, then separate to export...
 
 
 
 
 
 
 
To edit 2 actors...
 
First just make a male t-pose at origin scene (import and freeze meshes too), save and close
 
Then make a female t-pose at origin scene (and import and freeze meshes)
 
Click the green 3dsmax logo /file menu button at the top left corner (the one to open, new scene, reset ect.)
near the bottom of the list you see the references option, click that, and select xref scene. 
 
click "add" at the top of the box. Select your male t-pose scene you created and it should pop up. Keep the Xref window open and look at the "add" button again and gaze downwards until you see the merge button. Press the merge button.
 
Now you can animate them both in the scene.
 
The males bones are on the bone list under the female's.  Its easy to tell b/c they are separated by the meshes.
 
When its time to export your animation you'll have to split the scene to make 2 animations. Its easy though.
 
Make sure your scene is saved with both actors, then highlight every bone on the bone list under the last female mesh (starting at the first male mesh) press ok and hit your delete key.
 
The male will disappear and you can export your female.
 
Open the scene with both actors again, and highlight the female bones and meshes this time and hit delete. Now you export your male.
 
Thats how I do it.
 
 
 
 
 
 
The male and female t-pose scenes I refer to here in this quote of myself is the templets I have described above.
 
Reason for the Xref, and not just straight up import another scene is b/c importing tries to rename the bones (since they have the same name)
 
But merging allows duplicate bone names for some reason. 
 
 
 
 
 
 
Now about the positioning,...just make sure you keep them around the origin. Also keep them oriented along an axis if you want to keep your rotations from becoming very complicated.
 
Once you're fully done animating, you'll need to test the animations in whatever mod you're animating for.  They are all different,..(as far as positioning goes)
 
You may boot up skyrim to find that your animation has both actors too far apart and one rotated 180 degrees in the wrong direction. So you're gonna need to get back in max and focus on one actor (I focus on female) and keep adjusting her and booting up skyrim to test the alignment.
 
If you're making SexiS replacers,...I know the values you have to move your actors once you finish animating,....I have looked at its scripts and noted the distance they displace the actors,...which is what throws off the animations.

 

 

 

 

How do I create animations with a nice flow and smooth transitions? by Leito


There's a number of things.  Having just the right amount of frames, a lot of secondary animations, and some time in the curve editor/dope sheet.
 
Typically, I'll start off by posing all the actors in the scene.  Then I'll key the primary movement of one of the actor in the scene and tweak it until I feel the timing is good.  Then I'll go in and some secondary movements like limb sway, fingers, ect.  Once I get that actor moving to a rhythm I like,  I'll start animating the other actor into the animation, going back and forth between the two actors to make them work with each other.
 
I spend some time in the curve editor, but mainly to make it so the curves are nice and smooth like pornphile mentioned.  I typically use "Set Tangents to Slow" for the starting and ending keyframes and "Set Tangents to Smooth" for every keyframe in between.

 

Share this post


Link to post

I'll be taking a look at this in the future! Thanks for making it!

Share this post


Link to post

Thank you very much pornphile. With the help of your video I have finally managed to create and successfully export my first idle animation. Like in the video, I've used 3ds max 2012 and Havok Content Tools 2011.3. Now I don't have to sturggle with two different max versions anymore :).
 
There are two more things I would also like to ask:
 
1. How do I create animations with a nice flow and smooth transitions? Like for example those Animations by Leito.
Is it just a matter of frame length or are there any other methods or settings to be done to achieve this?
 
2. The exported animation has a rather big file size (> 1 mb). I did an animation with 200 frames and similar hkx files are between 200 and 500 kb.
I suppose that the file size depends on the skeleton rig I use. Should I use the vanilla rig instead to reduce file size?
 
Thank you very much for your help.

Share this post


Link to post

 

There are two more things I would also like to ask:

 

1. How do I create animations with a nice flow and smooth transitions? Like for example those Animations by Letio.

Is it just a matter of frame length or are there any other methods or settings to be done to achieve this?

 

2. The exported animation has a rather big file size (> 1 mb). I did an animation with 200 frames and similar hkx files are between 200 and 500 kb.

I suppose that the file size depends on the skeleton rig I use. Should I use the vanilla rig instead to reduce file size?

 

Thank you very much for your help.

 

1. That's an entirely new subject but I'll touch on it briefly to give you a starting point.

Select a controller(s), Graph Editors --> Track View - Curve Editor. This will bring up the Function Curve that you can adjust the tangents for.

post-8195-0-53096100-1417458776_thumb.jpg

Generally, you'll want the curve to look something like in the picture. Aside from actual animating, this is where a lot of time is spent. You can ask Leito how he does it.

 

2. The hkx in the work files is 500k. My 'real' animations use fewer frames and are 200k. Maybe Max 2012 HCT exports larger files? It's never been a concern for me but you can try Trepleen's rig file. It should export using only vanilla bones.

Share this post


Link to post

Thank you for your answers. Since I don't want my animations to look robotic, I am afraid I have to learn the basics of the curve editor first before I can really start doing animations :). I will ask Leito if he can share some of his secrets, but at the moment this seems to be a good way to get them smooth.

Share this post


Link to post

Thanks for putting this together pornphile.

 

 

1. How do I create animations with a nice flow and smooth transitions? Like for example those Animations by Letio.

Is it just a matter of frame length or are there any other methods or settings to be done to achieve this?

 

There's a number of things.  Having just the right amount of frames, a lot of secondary animations, and some time in the curve editor/dope sheet.

 

Typically, I'll start off by posing all the actors in the scene.  Then I'll key the primary movement of one of the actor in the scene and tweak it until I feel the timing is good.  Then I'll go in and some secondary movements like limb sway, fingers, ect.  Once I get that actor moving to a rhythm I like,  I'll start animating the other actor into the animation, going back and forth between the two actors to make them work with each other.

 

I spend some time in the curve editor, but mainly to make it so the curves are nice and smooth like pornphile mentioned.  I typically use "Set Tangents to Slow" for the starting and ending keyframes and "Set Tangents to Smooth" for every keyframe in between.

 

2. The exported animation has a rather big file size (> 1 mb). I did an animation with 200 frames and similar hkx files are between 200 and 500 kb.

I suppose that the file size depends on the skeleton rig I use. Should I use the vanilla rig instead to reduce file size?

 

 

From what I've heard, xml files are uncompressed verisons of hkx files and are therefore larger.  If you want to compress the hkx files, you can use hkxcmd to convert the offending hkx file to kf, then re-convert the kf to hkx (something that I'm too lazy to do with my anims).

Share this post


Link to post

Thanks for your advice Leito. I am gonna try to implement your methods into my workflow. I watched some 3ds max animation tutorials yesterday and I already have a better idea of how animations in 3ds max work. So hopefully I can contribute some nice animations to the SexLab community in the near future :).

 

I must admit, that the Skeleton Controller Rig by pornphile is a huge help, since it makes positioning of the actor so much easier.

 

I will post my first results later on this thread.

Share this post


Link to post

Hi, first: that rig is really great and makes animation a lot easier. :D Thanks for that!

I already played around with 3ds max and made a custion animation to practice.

But I have two open questions:

1. How do I make animations with 2 or more actors?

2 If I want to make animations for SexLab it there anything I need to take care of?

Share this post


Link to post

But I have two open questions:

1. How do I make animations with 2 or more actors?

2 If I want to make animations for SexLab it there anything I need to take care of?

 

1. Under Afterwards, I've updated this tutorial that adds Arrok's guide to 2 actor animations. This is how I do it. Haven't tested for more than 2. I imagine it'd be the same.

2. The animations themselves don't need anything special. Just to be registered with SL and for a mod to call it.

Share this post


Link to post

Hello to all animators! Would any of you be interested in making a simple flap animation for my Fairy Wings?

 

Hi

I looked at your thread. You have 2 ways to go about this:

 

1. Bone driven skeleton animations like in this tutorial. You'd need to skin the wings to bones and make new animations with flapping.

 

or

 

2. Animated nif like this. This is probably the better option. Check out his animated nif tutorial.

Share this post


Link to post

Thanks for the quick reply. I'll check the tutorial asap, even I have no experience at all with animations. I skinned the wings to spine and wing bones from XPMSE Skeleton 2.14, was that unnecessary for animated nif? Can it be harmful to animating the nif?

P.S. Tried to follow the tutorial and got to export everything, made an animation with 100 frames (didnt needed that much I guess, but I dont know how to set the number of frames for the animation) got the wings opening and closing in a full flap each 20 frames in 3ds, the script exported the texts like in the tutorial, run command prompt, nothing was indicating any error, but all I got in the final nif is 1 bone moving alone. In 3ds it was 2 bones moving and carrying the wings in a nice movement.

I checked the txt files and it seems the Weights.txt didnt got any weight data except for the spine bone.

Any idea what I'm doing wrong here?

Share this post


Link to post

Animated nifs are skeleton independent but I don't know what effects skinning to a skeleton will have. Sorry I can't help with the rest. My knowledge of animated nif is limited.

 

Adenz has made some fairy followers. Maybe that has something similar?

Share this post


Link to post

Adenz mod used the wings from "moving wings" mod created by badgremlin. Badgremlin found some way of copying the animation instructions from mothlunarinjar.nif to his wings, but I have no idea how to do it myself. Besides, the way he did it the wings use the quiver slot in game, so if you use quivers in hips you get weird looking wings in the butt. I was setting a fairy race, have everything set, size, flying behaviours, etc. All is missing is nice wings. But I couldn't do it, tried, but failed.

Anyway, thanks for the help.

Share this post


Link to post

Hey pornphile,

 

Do you know how to remove keys from things custom attribute entries like Heel Peel, Toe Tap, etc?

Share this post


Link to post

Pretty good tutorial, but there's one last step you can do if you wanted and that is converting it to a packfile using hkxcmd since tag files are portable and not optimised for any one platform although as mentioned before the major one is it being in an XML format not a good idea to release any animation like that (by all means use xml if you want while creating, modifying, and prototyping a mod, just make sure they are binary at the very least before you go releasing anything).

 

As a sort of step it's pretty much these two commands in command prompt:

 

hktcnv.exe <Source File> <Destination File>

hkxcmd.exe convert -v:WIN32 <Converted File> < Final Destination File>

 

and you're done! All compressed, and optimized. Pretty easy really, could batch it too if you wanted.

 

As a sorta idea on what you are saving by doing this: A single 171 frame animation I was working on went from a 400KB xml tag file to a 80KB Binary PackFile,  that's 320KB of memory saved when it's loading the animation that can be used elsewhere.

 

So Binarify your files, my fellow animators ;)

Share this post


Link to post

hktcnv.exe <Source File> <Destination File>

 

hkxcmd.exe convert -v:WIN32 <Converted File> < Final Destination File>

 

Works great, thanks. Any way to batch convert multiple files at once?

Share this post


Link to post

 

hktcnv.exe <Source File> <Destination File>

 

hkxcmd.exe convert -v:WIN32 <Converted File> < Final Destination File>

 

Works great, thanks. Any way to batch convert multiple files at once?

 

 

I am not really that great with batch so someone could probably do better then this, but I have hktcnv, hkxcmd and a bat file in the same directory, and a sub directory which contain the hct 2012 tagfiles. I use this bat  (create a new text file and just copy paste this into it then change its extension to .bat):

@Echo Off
for /r %%v in (*.hkt) do hktcnv "%%~v" "%%~nv.xml"
for /r %%i in (*.xml) do hkxcmd convert -v:WIN32 "%%~nxi" ".\export\%%~ni.hkx"
del *.xml
Exit

It pretty much runs hktcnv on all .hkt files in the same directory and sub directories which produces a temporary .xml file (the 2010 Tagfile) then runs hkxcmd on all the .xml files and places them as a hkx file in a sub directory called export. Then just deletes xml files in it's directory for a bit of a clean up. Not particularly elegant but it does the job.

Share this post


Link to post

I'm stuck!
I've been able to follow the video pretty nicely, until the video gets to 4:10.

After having selected Root_F as the video showed, I right clicked and opened up the Dope sheet. Here's the problem.

In my "Track View - Dope Sheet" window, there is no toolbar tab named "Track" for me to click and add a note track.
I have the other tabs those are fine, but instead of the "Track" tab like in the video, mine says "Track View - View" and all this allows me to do is pan, zoom in etc on the sheet, but not add anything.

 

Dopesheet.jpg

 

 

How can I fix this?
I'm brand spanking new to everything, EVERYTHING on here but I'm learning thanks to videos like this. Thank you for that!

Looking forward to finishing this tutorial once i get over this probably stupid simple lump!

 

Share this post


Link to post

Your 3ds Max version? You're missing some menus for whatever reason.

 

The scene file already includes these note tracks. This is the full view; scroll down or expand the window:

post-8195-0-38273700-1421111741_thumb.jpg

 

 

Share this post


Link to post

Your 3ds Max version? You're missing some menus for whatever reason.

 

The scene file already includes these note tracks. This is the full view; scroll down or expand the window:

attachicon.gifCapture.JPG

 

I'm using 3ds Max 2012 and I do have all the plugins and Havok tools installed also.

 

I decided to use the file you provided and thankfully the note tracks are there so it'll get me over this problem. The tabs however still look the same, maybe it's a version difference. i don't see how else to add them though.  :-/

 

Thank you anyway, this is good enough to let me get back to learning with the tutorial!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...