SkinnedModelProcessor

Apr 5, 2009 at 7:20 PM

I create a contentBuilder to compile and load files .x on runtime (using the WInFormContentLoading sample from XNA Cretors).  
Now, if i want compile the .x file in Skinnedmodel, what is the name of processor to compile and add the file .xnb in Skinnedmodel file?

contentBuilder.Add(fileName, "Model", null, "???");

If use the ModelProcessor to coplile ( contentBuilder.Add(fileName, "Model", null, ModelProcessor); ) i'have this error:

Error loading "C:\Documents and Settings\WILEz\Impostazioni locali\Temp\XnaInForm.ContentBuilder\3032\1\bin\Model".
File contains Microsoft.Xna.Framework.Graphics.Model but trying to load as XNAnimation.SkinnedModel.


Because the .fbx file (build with ModelProcessor) structure is:

XNBw »‡  +Microsoft.Xna.Framework.Content.ModelReader    ,Microsoft.Xna.Framework.Content.StringReader    7Microsoft.Xna.Framework.Content.VertexDeclarationReader    2Microsoft.Xna.Framework.Content.VertexBufferReader    1Microsoft.Xna.Framework.Content.IndexBufferReader    1Microsoft.Xna.Framework.Content.BasicEffectReader  .....

I want build the .fbx file with Skinnedmodel structure:

XNBw 3“  wXNAnimation.Pipeline.SkinnedModelReader, XNAnimation, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0    +Microsoft.Xna.Framework.Content.ModelReader    ,Microsoft.Xna.Framework.Content.StringReader    7Microsoft.Xna.Framework.Content.VertexDeclarationReader    2Microsoft.Xna.Framework.Content.VertexBufferReader    1Microsoft.Xna.Framework.Content.IndexBufferReader    ‚XNAnimation.Pipeline.SkinnedModelBasicEffectReader, XNAnimation, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0    7Microsoft.Xna.Framework.Content.ExternalReferenceReader    -Microsoft.Xna.Framework.Content.TextureReader    {XNAnimation.Pipeline.SkinnedModelBoneReader, XNAnimation, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0    xXNAnimation.Pipeline.AnimationClipReader, XNAnimation, Version=0.7.0.0, Culture=neutral, PublicKeyToken=0c21691816f8c6d0    .Microsoft.Xna.Framework.Content.TimeSpanReader......   


The importer is ok (null, and it will be autodetected from extension) but the processor?


Feb 16, 2010 at 10:16 PM

I am also trying out the same thing and getting this problem

Can any one please post which processor to use.

Developer
Feb 16, 2010 at 10:42 PM
Edited Feb 16, 2010 at 10:43 PM

Try "SkinnedModelProcessor".

Feb 17, 2010 at 3:34 AM
Edited Feb 17, 2010 at 4:05 AM

Thanks for the reply

but its still giving me error

Cannot find Content Processor "SkinnedModelProcessor"

i am doing something wrong?

Developer
Feb 17, 2010 at 7:15 AM

If you are doing the processing at runtime, you must add a reference to the MSBuild instance that the program uses. Check this CC sample, and have a look at "ContentBuilder.cs" file.

Feb 18, 2010 at 11:35 PM
Edited Feb 19, 2010 at 1:14 AM

 

 static string[] pipelineAssemblies =
        {
            
            "Microsoft.Xna.Framework.Content.Pipeline.FBXImporter" + xnaVersion,
            "Microsoft.Xna.Framework.Content.Pipeline.XImporter" + xnaVersion,
            "Microsoft.Xna.Framework.Content.Pipeline.TextureImporter" + xnaVersion,
            "Microsoft.Xna.Framework.Content.Pipeline.EffectImporter" + xnaVersion,
            "XNAnimationPipeline" + xnaVersion,
        };

 

 static string[] pipelineAssemblies =

        {

 

            "Microsoft.Xna.Framework.Content.Pipeline.FBXImporter" + xnaVersion,

            "Microsoft.Xna.Framework.Content.Pipeline.XImporter" + xnaVersion,

            "Microsoft.Xna.Framework.Content.Pipeline.TextureImporter" + xnaVersion,

            "Microsoft.Xna.Framework.Content.Pipeline.EffectImporter" + xnaVersion,

            "XNAnimationPipeline" + xnaVersion,

        };

 

 

is this the reference you are talking about  i have added "XNAnimationPipeline" in the references.

i have also added XNAnimation.dll and XnaAnimationPipeline.dll into default positions.

C:\Program Files\Microsoft XNA\XNA Game Studio\v3.1\References\Windows\x86

 

Feb 19, 2010 at 1:28 AM

I think i got it i was making a mistake by writing 

"XNAnimationPipeline" + xnaVersion,

it should be just

"XNAnimation",