views:

47

answers:

1

Hi

I have made a model using Sketchup, and have tested rendering it using Blender and it looks great. However loading it in XNA has two problems.
1. One of the textures becomes see-thru not entierly transparent but items below on the inside of the model is visible (this is not the case in blender).
2. I have a rounded part on the model that is divided into smaller parts and the texture gets out of sync (the posisioning is all wrong).

I have tested exporting the model to 3ds and then use blender to save it as fbx (to eliminate any problems with Sketchup). I have also tried using AutoDesks FBX Converter, same problems =(

I'm using myModel.Draw(World, View, Projection); to render the model.

Any suggestions?

/Jimmy

+1  A: 

1)Sounds like a backface culling issue try this

device.RenderState.CullMode = CullMode.None; (try the CW and CCW variants)

also make sure the depth buffer is enabled

2) This may be similar problem to an issue I had with blender when you copy the bones try the gModel.CopyBoneTransformsTo(transforms); as well as gModel.CopyAbsoluteBoneTransformsTo(transforms);

Grant
Hi Couldn't find RenderState, perhaps not present in XNA 4.0 or WP7? And the no2 sugestions didn't work. However I added: GraphicsDevice.DepthStencilState = DepthStencilState.Default; (I'm guessing that enables the depth buffer? :P) And it worked =D Thanks Thats two days I'll never get back ;)
Jimmy Engtröm
cool glad that helped looks like xna 4 is quite different from version 3.1 this might help http://blogs.msdn.com/b/shawnhar/archive/2010/06/18/spritebatch-and-renderstates-in-xna-game-studio-4-0.aspx
Grant