I get this error when I try to load a model via the sgmotion content processor (so I can use animations) instead of the Sunburn lightning system model (forward) content processor:
Error 1 Building content threw NullReferenceException: Object reference not set to an instance of an object. at SgMotionPipeline.Pipeline.SkinnedModelProcessor.Process(NodeContent input, ContentProcessorContext context) at Microsoft.Xna.Framework.Content.Pipeline.ContentProcessor`2.Microsoft.Xna.Framework.Content.Pipeline.IContentProcessor.Process(Object input, ContentProcessorContext context) at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item) at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item) at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild() at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem sourceAssets, String& outputContent, String& rebuiltContent, String& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2& warnings)
I really don't know what it's telling me, this is my first time using sgMotion (and I've only just bought Sunburn) so I'm really confused. Been trying to fix this for hours now and it's starting to frustrate me, when I bought Sunburn I imagined more time spent developing and less time wasted on little errors like this...
Can you post a copy of the model that's throwing the error?
Sure, password for the archive is "lol123".
The file size is quite large at the moment, I'm not entirely sure why this is (possibly the turbosmooths) but the model is only a test character until my actual modeller (I'm a programmer) starts on the art. I just want to get the animation system all working so the modeller can simply replace the models with better, textured ones.
Thanks for the reply.
I think the issue is it's not a skinned model, so when sgMotion tries to load it using a skinned model processor it throws the null exception because the model doesn't have any skinning.
I hope this helps!
In case it's helpful, here's an animation model viewer that my team has found useful to test models with animation:http://modelviewer.codeplex.com/
For you model, it's not throwing any errors as it imports, so no clues there. The right arm of the character does wiggle, but I'm not sure if that's the expected animation.
Alright thanks, any idea what I can do to make it a skinned model? I thought a quick material such as the one I've added would suffice.
I'm not sure about that - it's more of 3dsmax artist sort of thing. But if you need a sample skinned character to test with your code, you can use Dude.fbx from the SunBurn skinned model example:
So I followed the tutorial on exporting a skinned model from Maya to XNA found here: http://graphics.cs.columbia.edu/wiki/doku.php?id=wiki:user:henderso:tutorials:fbxtoxna
My model exports fine as an fbx file with animation, as I can import it back into Maya and it's all good. However, I get nothing displayed (no errors, just nothing) in my game, whether I load it from code or the editor. This happens for both loading it with the Sunburn (forward) content processor and the sgMotion one (although I don't get that error anymore). It loads fine in the XNA model viewer.
What happens when you load it in to the model viewer?
It loads fine, no warnings or errors, and plays the animation back perfectly.
The only thing I can see different is the box is black - I'll try adding a material to it in Maya and then exporting, but other than that I'm not sure how to go about fixing it.