I've tried the shadow mapping sample, and it looks pretty good, for a
quick and easy way to get shadows working in a game. But I went to
implement the technique into my game and an exception was thrown
concerning my model.
At first I assumed that it was just an error
with the way I had written the model and material processor (typing out
the ones from the sample) so I tried the same model in place of
"dude.fbx" in the sample, and the same exception was thrown.
The
model I was using had no textures associated with it at all, so I
quickly created another model in 3dsmax and "textured" it and embedded
the media in the fbx file.
The content processor is throwing an exception, so would somebody be able to explain to me what requirements there are for making a model that will work with this technique?
Thanks as usual everyone.
This is the exception:
| Error 1 Building content threw ArgumentNullException: Value cannot be null. |
| Parameter name: value |
| at Microsoft.Xna.Framework.Content.Pipeline.NamedValueDictionary`1.AddItem(String key, T value) |
| at Microsoft.Xna.Framework.Content.Pipeline.OpaqueDataDictionary.AddItem(String key, Object value) |
| at Microsoft.Xna.Framework.Content.Pipeline.NamedValueDictionary`1.Add(String key, T value) |
| at CustomEffectPipeline.CustomEffectModelProcessor.ConvertMaterial(MaterialContent material, ContentProcessorContext context) in C:\Documents and Settings\Administrator\Desktop\ShadowMapping\CustomEffectPipeline\CustomEffectModelProcessor.cs:line 47 |
| at Microsoft.Xna.Framework.Content.Pipeline.Processors.ModelProcessor.ProcessMesh(MeshBonePair meshBonePair, ContentProcessorContext context) |
| at Microsoft.Xna.Framework.Content.Pipeline.Processors.ModelProcessor.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) C:\Documents and Settings\Administrator\Desktop\ShadowMapping\ShadowMapping\Content\box.FBX ShadowMappingWindows |
| |