-
|
|
Exporting from 3D World Studio for XNA
|
Has anyone been able to export an .X file from 3DWS and been able to use it in XNA? I'm relatively new to 3D game devlopment and would like to get a decent set of affordable tools. I was hoping to use 3DWS as my level cretion tool. I tried exporting to .x and loading in XNA. It seems to load OK but nothing appears. I tried setting various rendering parameters in case I was looking in the wrong direction. I then tried loading the exported file into the DirectX SDK viewer and it generated a LOT of errors. I'm getting a little frustrated since nothing seems to work together.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
Could you post what errors? What happens, when you're trying to load it into game? Could you show us some exported file with simple uv texture.... or even without? Just simple material.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
Lol, baldmountain, Just noticed your post in the Leadworks forum!!, but check on John's project, getting close now. You might also want to ask John on his discussion page in codeplex, he might have some ideas
Darkside http://thegamedevspace.spaces.live.com/ 
|
|
-
-
- (2)
-
premium membership
-
Posts
121
|
Re: Exporting from 3D World Studio for XNA
|
I made a simple cube in 3D World Studio version 5.52 and exported it to .X And it worked fine into my XNA game. In the DirectX mesh viewer it looks fine but not perfect, from some angles the texture goes black, but i do not have this effect in the XNA game. I tried rendering lights but they had no effect on the object when showing on XNA. This is the content of the exported file. This file can also be used for those that want a simple 3D box to start making some 3D objects. Just copy this code in notepad and save it as .X. Change the "bass.jpg" to the name of any texture that you have. xof 0302txt 0064 // This model was made with 3D World Studio // http://www.leadwerks.com Header { 1; 0; 1; } Material material_1 { 1.0;1.0;1.0;1.0;; 11.3137; 1.0;1.0;1.0;; 0.0;0.0;0.0;; TextureFilename { "bass.jpg"; } } Frame World { FrameTransformMatrix { 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0;; } Mesh Brush1 { 24; 0.0;-32.0;0.0;, 32.0;-32.0;0.0;, 32.0;0.0;0.0;, 0.0;0.0;0.0;, 0.0;0.0;32.0;, 32.0;0.0;32.0;, 32.0;-32.0;32.0;, 0.0;-32.0;32.0;, 0.0;-32.0;0.0;, 0.0;-32.0;32.0;, 32.0;-32.0;32.0;, 32.0;-32.0;0.0;, 32.0;0.0;0.0;, 32.0;0.0;32.0;, 0.0;0.0;32.0;, 0.0;0.0;0.0;, 0.0;-32.0;0.0;, 0.0;0.0;0.0;, 0.0;0.0;32.0;, 0.0;-32.0;32.0;, 32.0;-32.0;32.0;, 32.0;0.0;32.0;, 32.0;0.0;0.0;, 32.0;-32.0;0.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; 0.0,1.0;, 1.0,1.0;, 1.0,0.0;, 0.0,0.0;, 0.0,0.0;, 1.0,0.0;, 1.0,1.0;, 0.0,1.0;, 0.0,0.0;, 0.0,-1.0;, 1.0,-1.0;, 1.0,0.0;, 1.0,0.0;, 1.0,-1.0;, 0.0,-1.0;, 0.0,0.0;, 0.0,1.0;, 0.0,0.0;, 1.0,0.0;, 1.0,1.0;, 1.0,1.0;, 1.0,0.0;, 0.0,0.0;, 0.0,1.0;; } MeshNormals { 6; 0.0;-1.0;0.0;, 0.0;1.0;0.0;, 0.0;0.0;-1.0;, 0.0;0.0;1.0;, -1.0;0.0;0.0;, 1.0;0.0;0.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } }
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
Sounds like you're using a different HLSL effect in the game VS DirectX SDK viewer. Is the game using BasicEffect? For your more complex model, are you sure you have all the textures correct and set via the Effect? You can test it out by setting them all to 'bass.jpg' (which would certainly be easier in Notepad than 3DWS).
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
Here are the output from the DirectX viewer: Loading model - D:\Visual Studio 2005\Projects\AdventureGame1\AdventureGame1\Content\Models\room.x Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush1' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:0 'Brush1' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:1 'Brush1' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:2 'Brush1' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:3 'Brush1' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:4 'Brush1' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵ㅨ material:5 Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush2' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:0 'Brush2' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:1 'Brush2' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:2 'Brush2' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:3 'Brush2' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:4 'Brush2' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㉨ material:5 Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush3' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:0 'Brush3' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:1 'Brush3' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:2 'Brush3' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:3 'Brush3' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:4 'Brush3' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㍨ material:5 Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush4' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:0 'Brush4' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:1 'Brush4' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:2 'Brush4' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:3 'Brush4' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:4 'Brush4' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㑨 material:5 Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush5' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:0 'Brush5' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:1 'Brush5' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:2 'Brush5' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:3 'Brush5' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:4 'Brush5' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㕨 material:5 Binormals do not exist on mesh. Attempting to calculate. Tangents do not exist on mesh. Attempting to calculate. 'Brush6' material 0 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:0 'Brush6' material 1 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:1 'Brush6' material 2 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:2 'Brush6' material 3 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:3 'Brush6' material 4 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:4 'Brush6' material 5 - No effect instance specified. Reverting to the default effect. SAS: error X3539: ps_1_x is not supported in this version of the compiler memory(114,32): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression ID3DXEffectCompiler: Compilation failed
SAS: Could not load effect 'Resource:#103' Failed to load default material at mesh:牂獵㙨 material:5
Here is the model: xof 0302txt 0064 // This model was made with 3D World Studio // http://www.leadwerks.com Header { 1; 0; 1; } Material material_1 { 1.0;1.0;1.0;1.0;; 11.3137; 1.0;1.0;1.0;; 0.0;0.0;0.0;; TextureFilename { "brickwall01a.png"; } } Material material_2 { 1.0;1.0;1.0;1.0;; 11.3137; 1.0;1.0;1.0;; 0.0;0.0;0.0;; TextureFilename { "concretefloor01a.png"; } } Frame World { FrameTransformMatrix { 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0;; } Mesh Brush1 { 24; -704.0;128.0;-352.0;, -704.0;-128.0;-352.0;, 512.0;-128.0;-352.0;, 512.0;128.0;-352.0;, 512.0;-128.0;-352.0;, -704.0;-128.0;-352.0;, -704.0;-128.0;-320.0;, 512.0;-128.0;-320.0;, -704.0;128.0;-352.0;, 512.0;128.0;-352.0;, 512.0;128.0;-320.0;, -704.0;128.0;-320.0;, -704.0;-128.0;-320.0;, -704.0;-128.0;-352.0;, -704.0;128.0;-352.0;, -704.0;128.0;-320.0;, 512.0;-128.0;-352.0;, 512.0;-128.0;-320.0;, 512.0;128.0;-320.0;, 512.0;128.0;-352.0;, -704.0;128.0;-320.0;, 512.0;128.0;-320.0;, 512.0;-128.0;-320.0;, -704.0;-128.0;-320.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; -2.75,-0.5;, -2.75,0.5;, 2.0,0.5;, 2.0,-0.5;, 2.0,1.375;, -2.75,1.375;, -2.75,1.25;, 2.0,1.25;, -2.75,1.375;, 2.0,1.375;, 2.0,1.25;, -2.75,1.25;, -1.25,0.5;, -1.375,0.5;, -1.375,-0.5;, -1.25,-0.5;, -1.375,0.5;, -1.25,0.5;, -1.25,-0.5;, -1.375,-0.5;, -2.75,-0.5;, 2.0,-0.5;, 2.0,0.5;, -2.75,0.5;; } MeshNormals { 6; 0.0;-1.0;0.0;, 0.0;0.0;-1.0;, 0.0;0.0;1.0;, -1.0;0.0;0.0;, 1.0;0.0;0.0;, 0.0;1.0;0.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } Mesh Brush2 { 24; 512.0;-128.0;384.0;, -704.0;-128.0;384.0;, -704.0;128.0;384.0;, 512.0;128.0;384.0;, -704.0;-128.0;352.0;, -704.0;-128.0;384.0;, 512.0;-128.0;384.0;, 512.0;-128.0;352.0;, 512.0;128.0;352.0;, 512.0;128.0;384.0;, -704.0;128.0;384.0;, -704.0;128.0;352.0;, -704.0;128.0;384.0;, -704.0;-128.0;384.0;, -704.0;-128.0;352.0;, -704.0;128.0;352.0;, 512.0;-128.0;352.0;, 512.0;-128.0;384.0;, 512.0;128.0;384.0;, 512.0;128.0;352.0;, 512.0;128.0;352.0;, -704.0;128.0;352.0;, -704.0;-128.0;352.0;, 512.0;-128.0;352.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; 2.0,0.5;, -2.75,0.5;, -2.75,-0.5;, 2.0,-0.5;, -2.75,-1.375;, -2.75,-1.5;, 2.0,-1.5;, 2.0,-1.375;, 2.0,-1.375;, 2.0,-1.5;, -2.75,-1.5;, -2.75,-1.375;, 1.5,-0.5;, 1.5,0.5;, 1.375,0.5;, 1.375,-0.5;, 1.375,0.5;, 1.5,0.5;, 1.5,-0.5;, 1.375,-0.5;, 2.0,-0.5;, -2.75,-0.5;, -2.75,0.5;, 2.0,0.5;; } MeshNormals { 6; 0.0;1.0;0.0;, 0.0;0.0;-1.0;, 0.0;0.0;1.0;, -1.0;0.0;0.0;, 1.0;0.0;0.0;, 0.0;-1.0;0.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } Mesh Brush3 { 24; 512.0;-128.0;352.0;, 512.0;-128.0;-320.0;, -704.0;-128.0;-320.0;, -704.0;-128.0;352.0;, -704.0;-96.0;352.0;, -704.0;-128.0;352.0;, -704.0;-128.0;-320.0;, -704.0;-96.0;-320.0;, 512.0;-96.0;-320.0;, 512.0;-128.0;-320.0;, 512.0;-128.0;352.0;, 512.0;-96.0;352.0;, -704.0;-128.0;-320.0;, 512.0;-128.0;-320.0;, 512.0;-96.0;-320.0;, -704.0;-96.0;-320.0;, -704.0;-128.0;352.0;, -704.0;-96.0;352.0;, 512.0;-96.0;352.0;, 512.0;-128.0;352.0;, 512.0;-96.0;352.0;, -704.0;-96.0;352.0;, -704.0;-96.0;-320.0;, 512.0;-96.0;-320.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; 2.0,-1.375;, 2.0,1.25;, -2.75,1.25;, -2.75,-1.375;, 1.375,0.375;, 1.375,0.5;, -1.25,0.5;, -1.25,0.375;, -1.25,0.375;, -1.25,0.5;, 1.375,0.5;, 1.375,0.375;, -2.75,0.5;, 2.0,0.5;, 2.0,0.375;, -2.75,0.375;, -2.75,0.5;, -2.75,0.375;, 2.0,0.375;, 2.0,0.5;, 2.0,-1.375;, -2.75,-1.375;, -2.75,1.25;, 2.0,1.25;; } MeshNormals { 6; 0.0;0.0;-1.0;, -1.0;0.0;0.0;, 1.0;0.0;0.0;, 0.0;-1.0;0.0;, 0.0;1.0;0.0;, 0.0;0.0;1.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_2 } { material_2 } { material_2 } { material_2 } { material_2 } { material_2 } } } Mesh Brush4 { 24; 512.0;128.0;352.0;, -704.0;128.0;352.0;, -704.0;128.0;-320.0;, 512.0;128.0;-320.0;, -704.0;128.0;-320.0;, -704.0;128.0;352.0;, -704.0;96.0;352.0;, -704.0;96.0;-320.0;, 512.0;96.0;352.0;, 512.0;128.0;352.0;, 512.0;128.0;-320.0;, 512.0;96.0;-320.0;, 512.0;96.0;-320.0;, 512.0;128.0;-320.0;, -704.0;128.0;-320.0;, -704.0;96.0;-320.0;, -704.0;96.0;352.0;, -704.0;128.0;352.0;, 512.0;128.0;352.0;, 512.0;96.0;352.0;, -704.0;96.0;352.0;, 512.0;96.0;352.0;, 512.0;96.0;-320.0;, -704.0;96.0;-320.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; 2.0,-1.375;, -2.75,-1.375;, -2.75,1.25;, 2.0,1.25;, -1.25,-0.5;, 1.375,-0.5;, 1.375,-0.375;, -1.25,-0.375;, 1.375,-0.375;, 1.375,-0.5;, -1.25,-0.5;, -1.25,-0.375;, 2.0,-0.375;, 2.0,-0.5;, -2.75,-0.5;, -2.75,-0.375;, -2.75,-0.375;, -2.75,-0.5;, 2.0,-0.5;, 2.0,-0.375;, -2.75,-1.375;, 2.0,-1.375;, 2.0,1.25;, -2.75,1.25;; } MeshNormals { 6; 0.0;0.0;1.0;, -1.0;0.0;0.0;, 1.0;0.0;0.0;, 0.0;-1.0;0.0;, 0.0;1.0;0.0;, 0.0;0.0;-1.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } Mesh Brush5 { 24; -704.0;96.0;-320.0;, -704.0;96.0;352.0;, -704.0;-96.0;352.0;, -704.0;-96.0;-320.0;, -704.0;96.0;-320.0;, -704.0;-96.0;-320.0;, -672.0;-96.0;-320.0;, -672.0;96.0;-320.0;, -672.0;-96.0;352.0;, -704.0;-96.0;352.0;, -704.0;96.0;352.0;, -672.0;96.0;352.0;, -672.0;-96.0;-320.0;, -704.0;-96.0;-320.0;, -704.0;-96.0;352.0;, -672.0;-96.0;352.0;, -672.0;96.0;352.0;, -704.0;96.0;352.0;, -704.0;96.0;-320.0;, -672.0;96.0;-320.0;, -672.0;96.0;352.0;, -672.0;96.0;-320.0;, -672.0;-96.0;-320.0;, -672.0;-96.0;352.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; -1.25,-0.375;, 1.375,-0.375;, 1.375,0.375;, -1.25,0.375;, -2.75,-0.375;, -2.75,0.375;, -2.625,0.375;, -2.625,-0.375;, -2.625,0.375;, -2.75,0.375;, -2.75,-0.375;, -2.625,-0.375;, -2.625,1.25;, -2.75,1.25;, -2.75,-1.375;, -2.625,-1.375;, -2.625,-1.375;, -2.75,-1.375;, -2.75,1.25;, -2.625,1.25;, 1.375,-0.375;, -1.25,-0.375;, -1.25,0.375;, 1.375,0.375;; } MeshNormals { 6; -1.0;0.0;0.0;, 0.0;-1.0;0.0;, 0.0;1.0;0.0;, 0.0;0.0;-1.0;, 0.0;0.0;1.0;, 1.0;0.0;0.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } Mesh Brush6 { 24; 512.0;96.0;-320.0;, 512.0;-96.0;-320.0;, 512.0;-96.0;352.0;, 512.0;96.0;352.0;, 480.0;-96.0;-320.0;, 512.0;-96.0;-320.0;, 512.0;96.0;-320.0;, 480.0;96.0;-320.0;, 480.0;96.0;352.0;, 512.0;96.0;352.0;, 512.0;-96.0;352.0;, 480.0;-96.0;352.0;, 512.0;-96.0;352.0;, 512.0;-96.0;-320.0;, 480.0;-96.0;-320.0;, 480.0;-96.0;352.0;, 480.0;96.0;-320.0;, 512.0;96.0;-320.0;, 512.0;96.0;352.0;, 480.0;96.0;352.0;, 480.0;96.0;-320.0;, 480.0;96.0;352.0;, 480.0;-96.0;352.0;, 480.0;-96.0;-320.0;; 6; 4;3,2,1,0;, 4;7,6,5,4;, 4;11,10,9,8;, 4;15,14,13,12;, 4;19,18,17,16;, 4;23,22,21,20;; MeshTextureCoords { 24; -1.25,-0.375;, -1.25,0.375;, 1.375,0.375;, 1.375,-0.375;, 1.875,0.375;, 2.0,0.375;, 2.0,-0.375;, 1.875,-0.375;, 1.875,-0.375;, 2.0,-0.375;, 2.0,0.375;, 1.875,0.375;, 2.0,-1.375;, 2.0,1.25;, 1.875,1.25;, 1.875,-1.375;, 1.875,1.25;, 2.0,1.25;, 2.0,-1.375;, 1.875,-1.375;, -1.25,-0.375;, 1.375,-0.375;, 1.375,0.375;, -1.25,0.375;; } MeshNormals { 6; 1.0;0.0;0.0;, 0.0;-1.0;0.0;, 0.0;1.0;0.0;, 0.0;0.0;-1.0;, 0.0;0.0;1.0;, -1.0;-0.0;-0.0;; 6; 4;0,0,0,0;, 4;1,1,1,1;, 4;2,2,2,2;, 4;3,3,3,3;, 4;4,4,4,4;, 4;5,5,5,5;; } MeshMaterialList { 6; 6; 0, 1, 2, 3, 4, 5;; { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } { material_1 } } } }
There doesn't seem to be any errors from XNA while loading the model. The two textures are in the same directory as the model. I tried loading the textures sperately and allowing them to be loaded along with the model with no change in results. I'm new to all of this so if I've made a silly error feel free to point me towards the proper documentation and I'll go RTFM.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
I forgot to mention that the model is simple. Just a hollow block with a brick texture on the walls and ceiling and concrete on the floor. The standard first tutorial for 3D World Studio.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
A little more information... I downloaded the demo version of UltraUnwrap and it is able to open and display the model OK. I tried running my sample code on a laptop. A slower machine and I noticed that the first time I ran the app the brick texture flashed on screen so I'm pretty sure the model is loading OK. I just have some parameters wrong while trying to render. I think.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
There are some answers. It seems that you can't load effect file. Do you have attached somehow effects with material_1, material_2 to same directory as .x? .x file itself can't store effects(or textures). I guess you would have no problems If you were exporting meshes without effects attached. Maybe you can export effect files itself like in max?
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
After thrashing around with this a bit more I'm thinking I may not understand enough about how models and effects are specified in an .x file. I figured working through all the reimers tutorials was enough to get me going with XNA but I guess not. I'll go pick up a book on DirectX programming and spend a bit more time with the 3dw docs and try again once I've read a bit more.
|
|
-
|
|
Re: Exporting from 3D World Studio for XNA
|
WooHoo! I figured out my issue. I blindly copied the code from the XNA documentation without looking at it too carefully. I missed the piece in the "How do I draw a Model?" how-to that creates the world rotation matrix. This meant I was setting the BasicEffect world matix to null. WHich looks like it is a no-no. Once I set the world rotation matrix to something valid the model drew just fine. I'd be upset but I learned a ton by reading a bunch of the DirectX documentation that I can't get mad.
|
|
|