Question about other models! Please help!

Topics: User Forum
Jan 12, 2007 at 4:45 PM
Hey there,

I tried your animation demo, it works great! I have a question about using other models than the bear though, do they have to be textured in blender to be visible in the demo?

Thanks!
Casey
Jan 12, 2007 at 6:30 PM
I tried adding a material to my model (a simple cube) in blender, and I still can't seem to get it to work. I get an index out of range error? Any ideas? Forgive the noob questions...

Here's the project files:
http://arkfamily.org/XNA/SimpleDemo.rar
Jan 14, 2007 at 2:51 AM
Now it seems like I can't export and view anything from Blender via their .X exports!? What's going on!?
Jan 17, 2007 at 6:11 AM
Is there anything else I could provide on this to make it more evident as to what the problem is? I know you guys must be really busy and I don't want to put any extra burden on you.
Coordinator
Jan 17, 2007 at 12:01 PM
Do your blender exported files show in the directx mesh viewer?
Jan 17, 2007 at 2:14 PM
I don't have the DXViewer, but I'm able to reimport them into Blender ok, so I assume they're fine. Am I using the wrong release? Right now I'm using the latest Special build.

Thanks for the response!
Coordinator
Jan 17, 2007 at 2:55 PM
The best thing to use currently is either the latest source code release or the 3rd to latest, which both require you to recompile. If you can point me to some X files you exported, I can say whether or not they work in the X viewer and in that specific build.
Jan 17, 2007 at 4:51 PM
Ok - here's the .X I'm trying to use: http://www.arkfamily.org/XNA/SimpleDemo/SimpleDemo/test.x
Jan 19, 2007 at 5:19 PM
arkdm, the problem you are having is most likely due to the missing AnimTicksPerSecond template in the .x file. Re-export the scene from Blender, but this time make sure that you click the Animation Speed button in the exporter and set the slider to some sane value (25 is good). Then add the new .x file to your project and try running it again.

That should rid you of the IndexOutOfBounds error.
Jan 19, 2007 at 6:05 PM
Thanks so much for your help!! The error is fixed! When the program runs now I still can't see my model though. Any ideas? I can't thank you enough for your help on this!

I've reuploaded at http://arkfamily.org/SimpleDemo/SimpleDemo/test.x

I didn't change the program code from last time.

Thanks again!
Jan 19, 2007 at 6:36 PM
This I can't you help with right now. I am having this problem myself and suspect that it might be the lack of a texture, but have no proof to that yet.
Jan 19, 2007 at 7:26 PM
Thanks anyway. I tried with a texture but it's still a no go. Hopefully dastle will be able to clear this up, I've been trying to find a simple language that will animate models forever, the last 3 times I got stuck at this point.
Coordinator
Jan 21, 2007 at 2:24 AM
Using the ModelViewer, your model works perfectly fine with the latest source code checkin. Could you please be more specific as to the source of your error?
Jan 21, 2007 at 2:54 AM
There's no error, it's just when the program launches when I use my test model (link above) I don't see any model at all. Thanks for the response!
Coordinator
Jan 21, 2007 at 5:16 AM
Have you tried it with the latest source build using the ModelViewer?

It works fine on my computer.
Jan 22, 2007 at 4:39 PM
Ok - I downloaded the latest Source build from the Source code section. This is the one I want right? Forgive my noobness, but how would I go about compiling what I just downloaded? I'm trying to get it into a DLL right?

Sorry about this, I have very little experience with Game programming, I'm a web guy.

Thanks again!
Coordinator
Jan 22, 2007 at 5:10 PM
Create two projects of type Windows Game Library. Put all the files outside the Content folder in one, and all the files inside of Content in the other. Compile the non Content project first (this creates a dll), then add that DLL as a reference to the other project, along with System.XML along with the content pipeline reference. Then you can compile the content project into a dll and this gives you both DLLs.
Jan 22, 2007 at 6:14 PM
Alright- getting further now, I compiled the DLLs and have them referenced in my project that shows the model. I get this error on debug:

"Error loading "test". Cannot find ContentTypeReader Animation.Content.ModelAnimationInfoReader, Animation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null."
Coordinator
Jan 22, 2007 at 6:25 PM
Sounds like didn't add the newly compiled dll to the content tab in the project properties. Also, make sure Model - Animation Library is selected for the model processor.
Jan 22, 2007 at 7:04 PM
Tried those, still getting the same error. I uploaded the project files:

http://arkfamily.org/XNA/SimpleDemo.rar

I can't thank you enough for your help! I really want to get this working!
Jan 22, 2007 at 7:05 PM
...here's the project files for the DLLS: http://arkfamily.org/XNA/DLLS.rar
Coordinator
Jan 22, 2007 at 7:54 PM
The project doesn't work using the dlls you have in that project, so something must have gone wrong compiling it.

I've decided to just post the compiled dlls in the release section more often now, since it seems like a waste to make everyone go through the increasingly complex process of downloading and compiling the source.

A few things to note:

- Right now, you'll have to use the default XNA importer; the custom importer is temporarily incompatible
- Use the model processor
- Add Animation.dll as reference and Animation.Content.dll in the content tab under properties
- test2.x does not work because the microsoft importer does not import the animation. Looking at the .x file, it is in an odd format, and the animation consists of only one frame, so this may be the reason.
- The default lighting for the ModelViewer is considerably brighter than the directx viewer

You can grab the dlls in the release tab.
Jan 23, 2007 at 12:59 AM
Ok - I'll try this ASAP. I'm exporting the .X from Blender, and the animation lasts 48 frames before exporting. Just confusing! Thanks for the help!
Jan 23, 2007 at 6:24 AM
Ok - did what you said, got this error at debug:

"Model contains no animation info; the tag is not an instance of Dictionary<string, object>. Please use the "Model - Animation Library" processor or a subclass."

But Model- Animation Library isn't a choice anymore on any of the models I use!? Sorry, fixing these noob problems must drive you insane!
Coordinator
Jan 23, 2007 at 6:56 AM
It should be an option. If it isn't, it means the dll is not added in the content pipeline.

To add it, right click on the project, select properties, click on the Content Pipeline tab on the left, and then click add and select Animation.Content
Jan 23, 2007 at 1:37 PM
Yes! I can see my model! Thanks so much dastle!