99jonathan

http://www.myjavaserver.com/~jonathanf/stairs.x

This .x file displays correctly in the DXviewer as a staircase. However, when loaded into xna it is merely a cube. What gives The staircase was made using XSI Mod Tool and exported using the default .x exporter.

~Jonathan


Re: XNA Game Studio Express .X importer for XNA

Martin Schmidt

download the source code from Rocket Commander XNA. there is a content processor for processing .x files. Download



Re: XNA Game Studio Express .X importer for XNA

99jonathan

That download site is extremely unstable. 3 downloads in a row have canceled partway through. Are there any other sites with the same file




Re: XNA Game Studio Express .X importer for XNA

Martin Schmidt

don't know another site. but in general it has to work with the xna importer too, doesn't it



Re: XNA Game Studio Express .X importer for XNA

99jonathan

I finally got the file downloaded. Interestingly enough, although the .zip is 50 mb, the files inside the zip are a mere 1.5 mb.




Re: XNA Game Studio Express .X importer for XNA

99jonathan

ok, so i got the importer into my project. however, now it gives a TextureCoordinate0 not found error. I can't figure out how to get a texture onto my simple scaled cube that works though... could someone who has used XSI Mod Tool or XSI help me




Re: XNA Game Studio Express .X importer for XNA

99jonathan

bump



Re: XNA Game Studio Express .X importer for XNA

Crenna

Can you provide a link to the native XSI Mod Tool file I believe the issue stems from the exporting function of XSI and not from the content pipeline handling the format. I know that there are well-known issues with the .X exporter, and that you can run into problems with multiple UV maps.

Your .X output file will display in DXViewer.exe but it won't import into other 3D packages. I know this screams 'workaround', but before you try .X processing in code, you might want to try exporting from XSI --> .OBJ, and use something like Blender to re-export to .X.

Daniel





Re: XNA Game Studio Express .X importer for XNA

Leaf.

That .x file displays fine in XNA using the example code given in the docs. I suspect you are not getting the absolute transforms for your model's bones. You don't need to worry about using different processors or whether you are using XSI correctly, just make sure that you are drawing the model in a manner similar to what is shown in that link.

Cheers,
Leaf.






Re: XNA Game Studio Express .X importer for XNA

Leaf.

Crenna wrote:
Can you provide a link to the native XSI Mod Tool file I believe the issue stems from the exporting function of XSI and not from the content pipeline handling the format. I know that there are well-known issues with the .X exporter, and that you can run into problems with multiple UV maps.

Your .X output file will display in DXViewer.exe but it won't import into other 3D packages. I know this screams 'workaround', but before you try .X processing in code, you might want to try exporting from XSI --> .OBJ, and use something like Blender to re-export to .X.

I think the XSI Mod Tool mentioned is this, it is a free version of XSI (an older version) that only exports to certain formats for creating game mods - Unreal, Source (Half Life) and now DirectX .X presumably for XNA. Pretty good deal for free but unfortunately means that it probably wont export to .OBJ.

Cheers,
Leaf.






Re: XNA Game Studio Express .X importer for XNA

Crenna

Leaf,

You're right. I checked the XSI forums and found a number of issues logged with the DirectX exporter, leading me to believe that a re-conversion could help (also noting that the exported image won't process in Blender which is usually very good at importing .X files), but the XSI Mod Tool won't export to .OBJ for good reason--Either way, if the staircase loads fine using documented code, the nail's already in the head. :)

Daniel





Re: XNA Game Studio Express .X importer for XNA

99jonathan

wow, thanks for all the help guys! I'll try out the docs and see if that helps!!




Re: XNA Game Studio Express .X importer for XNA

99jonathan

ok, thanks a lot!! Its working fine now! Thanks to the Scenery class I made, all it took was a few copy-pastes to get all my models working. The problem was that my code lacked this:

transforms = new Matrix[model.Bones.Count];
model.CopyAbsoluteBoneTransformsTo(transforms);

and this:

effect.World = .......... * transforms[mesh.ParentBone.Index];

Thanks a lot!

~Jonathan