Jump to content

MasterFlu

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by MasterFlu

  1. I solved the problem with the brick. but now when i export the model as .X file and start xna it gives me a NullReferenceException. Hope here is someone who can help me with this.
  2. i tried it with the texture name. but then i get a nullreference exception. if i use a modell out of 3dws like the indoorframe1 i get the same error like mentioned above. usually i am doing sth. wrong. so i´ll write how i did it: In 3dws on the right side in object categorie i choose house, under object i choose indoorframe1, under Texture Category i choose buildings and the i choose my own wood texture. then i export the object as .X file, because XNA wants this. In the .X file appears the brick. "error". when i write an other texture which exists and is in the same folder i get a nullreference exception at this line of code in the draw method(): for (int i = 0; i < level.Models.Length; i++) { Vector3 rotation = level.Models[i].rotation; rotation *= MathHelper.Pi / 180f; Matrix worldMatrix = Matrix.CreateFromAxisAngle(Vector3.Up, -MathHelper.PiOver2); worldMatrix *= Matrix.CreateFromYawPitchRoll(rotation.Y, rotation.X, -rotation.Z); worldMatrix.Translation = level.Models[i].position; foreach (ModelMesh mesh in Models[i].Meshes) { foreach (Effect effect in mesh.Effects) { effect.Parameters["World"].SetValue(worldMatrix); effect.Parameters["View"].SetValue(View); effect.Parameters["Projection"].SetValue(Projection); } mesh.Draw(); } }
  3. Hi. i have got a question. when i add an object to my world i have to export it as .x file. but when i compile it in XNA i get the following mistake: Fehler 1 Missing Asset ...\WP7\3D World Studio\Test3DW\Test3DW\Test3DWContent\sonstiges\brick". ...\WP7\3D World Studio\Test3DW\Test3DW\Test3DWContent\sonstiges\box_wood_open.x Test3DW and here is the mistake in the .x. the following is only a part of the whole .X 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 { "brick."; } } What do i have to add behind brick. ? I i tried .xml or .jpg but both doesn´t work. Hope someone can help. I thought the XNA 3dw Contentpipline takes away the work with the x files. when i only use boxes/Solids, all works fine, but when i use my own models it doesn´t work. Thanks MasterFlu
×
×
  • Create New...