So I have this cube that I made in Sketchup and I applied a 4096 X 4096 texture on it. Here how it looks in Sketchup:-
and here is how the original texture looks:-
and here how it looks in my game:-
I just want to know why does it look so so bad?
here is the Cube Class when it load and draw the cube.
namespace _3D_Tower_Defense
{
class CubeModel
{
Model Model;
public Vector3 Position, Rotation;
Matrix ViewMatrix, ProjectionMatrix;
Matrix[] Transforms;
public CubeModel()
{
Rotation = Vector3.Zero;
}
public void Initialize(GraphicsDeviceManager graphics, Matrix ViewMatrix, Matrix ProjectionMatrix)
{
this.ViewMatrix = ViewMatrix;
this.ProjectionMatrix = ProjectionMatrix;
}
public void LoadContent(ContentManager Content, string ModelPath)
{
Model = Content.Load<Model>(ModelPath);
}
public void Update(GameTime gameTime)
{
Position = new Vector3((int)((MouseCursor.Position.X - 400) / 14), 0.9f, ((int)(MouseCursor.Position.Y - 200) / 14));
Position = Position * 14;
}
public void Draw(SpriteBatch spriteBatch)
{
Transforms = new Matrix[Model.Bones.Count];
Model.CopyAbsoluteBoneTransformsTo(Transforms);
foreach (ModelMesh modelMesh in Model.Meshes)
{
foreach (BasicEffect Effect in modelMesh.Effects)
{
//Effect.EnableDefaultLighting();
//Effect.PreferPerPixelLighting = true;
Effect.World = Transforms[modelMesh.ParentBone.Index] *
Matrix.CreateRotationX(MathHelper.ToRadians(Rotation.X)) *
Matrix.CreateRotationY(MathHelper.ToRadians(Rotation.Y)) *
Matrix.CreateRotationZ(MathHelper.ToRadians(Rotation.Z)) *
Matrix.CreateTranslation(Position);
Effect.Projection = ProjectionMatrix;
Effect.View = ViewMatrix;
}
modelMesh.Draw();
}
}
}
}