   Problem loading objects with different Effects
  I am having problems rendering 2 objects that use different effects. I have made 2 custom object loading classes On load a object with the basiceffect and is working fine. The 2nd class loads a object with a custom Colored effect that I got from http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series2/Loading_a_Model.php the class also uses the Draw() code from there as well. The Problem seems to be that it never loads the new effect so the Technique comes up void.Here is the code for loading the model and effect:  box.Effect = Game.Content.Load<Effect>("Effects//Effect2");  box.Camera = camera;  box.Model = Game.Content.Load<Model>("box");  box.Scale = Matrix.CreateScale(1, 1, 1);  box.Location = Matrix.CreateTranslation(new Vector3(300, 100, 300));  box.Device = device;and here is the Draw() code:public void DrawObject()   {  Matrix worldMatrix = scale * Matrix.CreateRotationY(MathHelper.Pi) * location;  Matrix[] xwingTransforms = new Matrix[model.Bones.Count];  model.CopyAbsoluteBoneTransformsTo(xwingTransforms);  foreach (ModelMesh mesh in model.Meshes)  { foreach (Effect effect2 in mesh.Effects) {effect2.CurrentTechnique = effect2.Techniques["Colored"];effect2.Parameters["xWorld"].SetValue(xwingTransforms[mesh.ParentBone.Index] * worldMatrix);effect2.Parameters["xView"].SetValue(camera.View);effect2.Parameters["xProjection"].SetValue(camera.Projection); } mesh.Draw();  }   }And here is the first screenshot from my Game Engine. Graphic Quality isn't as good as I would like but I have only been working on it for 3 days and I am still learning.
  Linear texture sampling would make it look alot smoother.   ;  Thanks I will look into it.I have solved my problem here is the solution in case any one is trying to figure out the same thing.loading the model, effect, and other settings (can be done from any file):private void loadbox()   {  box.Model = Game.Content.Load<Model>("box");  box.Effect = Game.Content.Load<Effect>("Effects//Effect2");  Engine.GameObjects.Loader.ColoredEffectLoader.RemapModel(box.Model, box.Effect);  box.Camera = camera;  box.Scale = Matrix.CreateScale(0.06f, 0.08f, 0.06f);  box.Location = Matrix.CreateTranslation(new Vector3(310f, 35.5f, 310f));  //box.Device = device;  //box.Fog = true;}And then in the ColoredEffectLoader class:public static void RemapModel(Model model2, Effect effect2)   {  foreach (ModelMesh mesh in model2.Meshes)  { foreach (ModelMeshPart part in mesh.MeshParts) {part.Effect = effect2; }  }   }   public void DrawObject()   {  Matrix worldMatrix = scale * Matrix.CreateRotationY(MathHelper.Pi) * location;  Matrix[] xwingTransforms = new Matrix[model2.Bones.Count];  model2.CopyAbsoluteBoneTransformsTo(xwingTransforms);    foreach (ModelMesh mesh in model2.Meshes)  { foreach (Effect effect2 in mesh.Effects) {effect2.CurrentTechnique = effect2.Techniques["Colored"];effect2.Parameters["xWorld"].SetValue(xwingTransforms[mesh.ParentBone.Index] * worldMatrix);effect2.Parameters["xView"].SetValue(camera.View);effect2.Parameters["xProjection"].SetValue(camera.Projection); } mesh.Draw();  }   }