KiloWatt Animation 20081128

jwatte's picture

This is the third release of the KiloWatt Animation library. It is intended as a companion to the kW X-port 3ds Max X file exporter, to be used with Microsoft XNA Game Studio. This release is for version 3.0 for Windows and Xbox 360. Sorry, no Zune support :-)

Click here to download.

The KiloWatt Animation Library is different from the XNA Animation sample code in several ways, including:

  • KiloWatt Animation stores animation keyframes as position, rotation and scale (for a total of 10 floats), instead of the full matrix used by the Animation Components.
  • KiloWatt Animation removes unnecessary keyframes (down to a tolerance that you can specify), for a usually quite significant savings in file size.
  • KiloWatt Animation does interpolation between animation keyframes using quaternions, which means that slow-motion and varispeed playback will still look smooth.
  • KiloWatt Animation supports composition (blending) of animations to generate the final output pose for a given Model.
  • KiloWatt Animation replaces the Effect used for your Model only when you tell it to.
  • KiloWatt Animation does not make any specific demands of your geometry; you can (and should) use it to animate rigid objects such as windmills, catapults etc. in addition to skinned meshes.

New in release 20080703 is full support for skinned meshes, more documentation, and more sample art.

New in release 20081128 is an upgrade to XNA Game Studio version 3.0, and pre-made Xbox 360 projects for those who don't want to do it themselves.

Find more documentation in the download, and please let me know what works for you and what doesn't. This is the third release, and there were no known bugs between second and third release. Note, however, that this is a power tool for programmers who understand 3D animation; it is not a step-by-step tutorial on the basics of what skinning, skeletons or animation blending are.

AttachmentSize
KiloWatt.20081128.zip4.4 MB

Comments

biped animation

hello!
good library here. i have a problem though..
i'm trying to display a character which i've modeled and animated in 3dsmax using a biped.. but it own't animate in my program.

if i export a regular move/rotate keyframe animation, it works and shows up right, but for a biped animation, it just gets stuck on the first frame with nothing happening.

do i need to set my model up in any specific way to get this to work? or do i need to add some particular code in my program to make this type of animation work?

thanks!

jwatte's picture

If you open the exported mesh

If you open the exported mesh in the DirectX Viewer, does it animate there?

Also, which shader are you drawing with? If your animation is skinned, then you need to draw it using a skinning shader. The KiloWatt model processor can set up a new shader for you in the "force shader" and "force skinned shader" fields. You can look at the Archer sample model in the content project to see how this is set up.

i guess my first problem was

i guess my first problem was not using a skinned shader, because i had no idea.
trying the model in the included animationviewer now, it tells me it needs an "inverse bone transform". is this also something i set up before the model is exported? i tried googling a bit but couldn't come up with anything. i also tried poking around inside the archer.x file.
sorry to be asking all this, but i've never used this kind of 3d animation in games before..

jwatte's picture

Did you read the

Did you read the documentation? Did you use the proper model processor for your mesh?

hmm, i see. what i did first

hmm, i see.

what i did first was select the diffuseonly-skinned.fx shader in 3dsmax *before exporting*, which didn't work. when i select diffuseonly.fx in 3ds and then add +-skinned under forceskinned shader, it works. is this because it only recognizes the shader as skinned when it's entered there, and not the 'regular' way?

either way, it appears to be working now. thanks a lot for your time! sorry again for the silly questions..

Cannot find ContentTypeReader ...ArrayReader

Hi,
I'm trying to run the AnimationViewer on my 360. I've created a copy of the AnimationViewer "for XBox 360" and changed the assembly names of the new projects to "Base.360" and "AnimationViewer.360". The problem is everytime I try to load a model I get the message:
Error loading "archer". Cannot find ContentTypeReader Microsoft.Xna.Framework.Content.ArrayReader`1[[KiloWatt.Base.Animation.SkinnedBone, KiloWatt.Base, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
Am I missing something?
Thanks a lot,

Kique

in response to ContentTypeReader error

The FIX
Add a reference of "Base" in the base references folder.

A 4th note to update your docs...

1) Add KiloWatt\Base\Base.csproj to your solution.
2)Add KiloWatt\Pipeline\Pipeline.csproj to your solution. solution.
3)In main project References folder add a reference to "Base" under Projects tab.
4)Find the "Content" project in your main project. Right-click on that project and choose "Add Reference...". From the "Project" tab, choose "Pipeline."

Tomoprime

KiloWatt.Base ContentTypeReader error in XNA windows env

Hi jwatte
I get an error when trying to load a model in windows.

Cannot find ContentTypeReader KiloWatt.Base.Animation.AnimationSetReader, KiloWatt.Base.

I added the Pipeline reference to the Content references folder. What else is missing? Thanks.

Tomoprime (creators club)

jwatte's picture

Version 20080624 is replaced

Version 20080624 is replaced with version 20080703, which includes better documentation, and doesn't include the unnecessary files. It also includes more sample art for your viewing enjoyment.

Animation Library Compatibility

Will this animation code work if I'm not using the kW X-port to export my model into XNA?

jwatte's picture

Some extra files were

Some extra files were accidentally included, in the "Runtime" and "tools" directories. Those are not used by the animation library, and can be safely ignored. They will not work stand-alone as they have other dependencies, too. My apologies for the inconvenience.