Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to add a ground so I can know the position of a helicopter in the world. But the ground appeared in a weird way:

The ground had the following texture:

EDIT: Sorry, I forgot to post the code:

public class ImportModel
    public Vector3 Position { get; set; }
    public Vector3 Rotation { get; set; }
    public Vector3 Scale { get; set; }
    Model Model;
    Matrix[] modeltransforms;
    GraphicsDevice GraphicDevice;
    ContentManager Content;
    BoundingSphere sphere;
    bool boundingimplemented = false;
    public ImportModel(string model, GraphicsDevice gd, ContentManager cm, Vector3 position, Vector3 rot, Vector3 sca)
        GraphicDevice = gd;
        Content = cm;
        Position = position;
        Rotation = rot;
        Scale = sca;
        Model = Content.Load<Model>(model);
        modeltransforms = new Matrix[Model.Bones.Count];
    public void Draw(Camera camera)
        Matrix baseworld = Matrix.CreateScale(Scale) * Matrix.CreateFromYawPitchRoll(Rotation.Y, Rotation.X, Rotation.Z) * Matrix.CreateTranslation(Position);
        foreach (ModelMesh mesh in Model.Meshes)
            Matrix localworld = modeltransforms[mesh.ParentBone.Index] * baseworld;
            foreach (ModelMeshPart meshpart in mesh.MeshParts)
                BasicEffect effect = (BasicEffect)meshpart.Effect;
                effect.World = localworld;
                effect.View = camera.View;
                effect.Projection = camera.Projection;
    public BoundingSphere BoundingSphere
            if (!boundingimplemented)
                foreach (ModelMesh mesh in Model.Meshes)
                    BoundingSphere transformed = mesh.BoundingSphere.Transform(
                    sphere = BoundingSphere.CreateMerged(sphere, transformed);
                Matrix worldTransform = Matrix.CreateScale(Scale) * Matrix.CreateTranslation(Position);
                BoundingSphere transforme = sphere;
                transforme = transforme.Transform(worldTransform);
                return transforme;
                Matrix worldTransform = Matrix.CreateScale(Scale) * Matrix.CreateTranslation(Position);
                BoundingSphere transformed = sphere;
                transformed = transformed.Transform(worldTransform);
                return transformed;

Then I call the class from the Game1 class:

ImportModel ground = new ImportModel("ground", GraphicsDevice, Content, Vector3.Zero, Vector3.Zero, new Vector3(20f));

EDIT2:This is how the scene looks from top:

share|improve this question
nobody's going to help you if you don't post any code, even the pictures you posted are terribly lit, if lit at all actually, light the scene properly and point the camera at the ground so people can see what's going on, and post your rendering code – dreta Jul 5 '12 at 10:41
ok i may be missing something, but have you even set the texture? – dreta Jul 5 '12 at 11:52
I used the ground.x from this sample – Belos Jul 5 '12 at 12:22

You must set effect.Texture to a Texture2D object that contains your checkers texture and you have previously loaded with the ContentManager.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.