Wednesday, February 07, 2007

The not so good news…

Warning: The following entry is very distressing. Proceed at your own risk.

First of all, apparently the author did acknowledge that his compiled XBOX360 Animation Components (the one which we have been trying to use) indeed HAVE problems.

This is what I understood to be the issue:

The component comprises of two parts: Animation.dll is the animation library itself and Animation.Content is the content pipeline.

Trying to recompile the Animation.dll as XBOX360 library, I encountered a problem:

  • The type or namespace name 'SortedDictionary' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'MouseState' could not be found (are you missing a using directive or an assembly reference?)

To solve the first one, I tried changing all declarations of SortedDictionary into SortedList instead. The MouseState issue is due to the ModelViewer class referencing to a mouse library which clearly only available in x86. So I just removed the ModelViewer class for now, since it’s just a utility to view models and not essential.

It compiles successfully after I made the above changes.

Now here’s the more daunting issue:

Apparently, Animation.Content can only be compiled as an x86 game library, because it is using XNA.Framework.Content.Pipeline and some other x86 only libraries.

So it seems for now there is NO WAY (well at least, not to my knowledge) to recompile it as a 360 library. My guess I that in the first place, content processors are meant to be for x86 only anyway.

So what I did is just make it as a Windows library instead, and I tried to compile it using the source code provided, making references to the above successfully compiled 360 Animation.dll. It failed to compile, because of some library conflicts:

The type 'Microsoft.Xna.Framework.Matrix' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=51c3bfb2db46012c'. D:\XNA\Recompile\Animation\Animation.Content\X File\XModelImporter.cs 114 21 Animation.Content

So I cheated, I just created another Animation.dll for x86, call it Animationx86 and use it to build Animation.Content.dll. And it works! At least it does compile successfully…

Then finally I tried to create an XBOX360 game, use the above compiled Animation.Content as Content.Pipeline, and added reference to the compiled 360 Animation.dll. I put a model (.fbx), successfully change it to Model-Animation type ( meaning the content pipeline successfully loads the x86 Animation.Content.dll), and when I try to compile it, I got the following error:

Building content threw NullReferenceException: Object reference not set to an instance of an object. At Microsoft.Xna.Framework.Content.Pipeline.Processors.EffectProcessor.CreateContentIdentityFromErrorString(String& errorString, ContentIdentity oldContentId)

One last thing, I then try to create a Windows Game instead, using the Animationx86.dll and Animation.Content.dll, it works, it loads the model and animations.

In Summary, here's what I have tried so far:

Platform

Library

Compile

Run

x86

Animation

OK

OK

x86

Animation.Content with x86 Animation

OK

OK

xbox360

Animation

Can Compile with Minor tweaks (SortedList, removed ModelViewer)

Cannot Run

xbox360

Animation.Content with x360 Animation

Cannot Compile (Looking for x86 XNA framework)

Cannot Run

x86

Animation.Content with x360 Animation

Cannot Compile (Looking for x360 XNA framework)

Cannot Run

x86

X86 Game with x86 Animation.Content

OK

OK

xbox360

XBOX360 Game with x86 Animation.Content

Cannot Compile

Cannot Run


I have been trying to look for alternative Animation components to no avail, so looks like we are stuck with the codeplex one for now.

It seems there are other people facing the same issue, and the author has actually noted the issue and hopefully working on it, so for now, we can only wait for him to update his library to work for 360, which he claims to be Possible…

Note: The source code is in our CS4343 Community, Recompile.rar



0 Comments:

Post a Comment

<< Home