   my texture is very blurry when i move (and sparkly)
  I recently started learning how to make graphics for my game. I tiled wood texture on a large thing. It is kind of blurry when i stand there not moving the camera and when i do move, it basicly appears to be very sparkly. The black "cracks" between the "log things" whatever theyre called swirl and i dont like it.Here is a picture on a free upload site i found on google.This ScreenshotI am new at programming this stuff so i dont know much options there are. But i dont like the way my stuff looks right now so i need to fix it. How can i make this look better?   
  [NB. your screen-shot is a bitmap, please use JPG/PNG/GIF next time!]Sounds like a texture-filtering issue, which graphics API are you using (GL/D3D/...)?   ;  What texture filtering settings are you using?EDIT: beat :)   ;  Sounds like there is no mipmapping. Which graphics API are you using, OpenGL, DirectX, other?BTW, imageshack is much better at hosting pictures.   ;  i dont know what options they are. i dont know what mip mapping is but i heard of it and read about it but dont understand what it is. I think my API or graphics thing is XNA if thats is one. I know its not open gl, directx, managed direct x. I dont know how to filter my textures and what the filtering does.Here is the function to draw the stuff on my screen //'mfx' is an Effect shader object.private void draw_ground()   {  // 1: declare matrices  Matrix matIdentity, matTransl;  // 2: initialize matrices  matIdentity = Matrix.Identity; // always start with identity matrix  matTransl   = Matrix.CreateTranslation(0.0f, -0.9f, 0.0f);  // 3: build cumulative world matrix using I.S.R.O.T. sequence   // identity, scale, rotate, orbit(translate & rotate), translate  mMatWorld   = matIdentity * matTransl;  // 4: pass wvp matrix to shader  mfxTex_WVP.SetValue(mMatWorld * mMatView * mMatProj);  mfxTexture.SetValue(mTexGrass);  mfxTex.CommitChanges();  // 5: draw object - select vertex type, primitive type, # of primitives  gfx.GraphicsDevice.VertexDeclaration = mVertPosColorTex;  gfx.GraphicsDevice.DrawUserPrimitives<VertexPositionColorTexture>( PrimitiveType.TriangleList, mVertGround, 0, 18);  ////////////////////////////////////////////  // 2: initialize matrices  matIdentity = Matrix.Identity; // always start with identity matrix  matTransl = Matrix.CreateTranslation(0.0f, -0.9f, 0.0f);  // 3: build cumulative world matrix using I.S.R.O.T. sequence   // identity, scale, rotate, orbit(translate & rotate), translate  mMatWorld = matIdentity * matTransl;  // 4: pass wvp matrix to shader  mfxTex_WVP.SetValue(mMatWorld * mMatView * mMatProj);  mfxTexture.SetValue(mTexDirt);  mfxTex.CommitChanges();  // 5: draw object - select vertex type, primitive type, # of primitives  gfx.GraphicsDevice.VertexDeclaration = mVertPosColorTex;  gfx.GraphicsDevice.DrawUserPrimitives<VertexPositionColorTexture>( PrimitiveType.TriangleList, mVertDirt, 0, 2);  ////////////////////////////////////////////  // 2: initialize matrices  matIdentity = Matrix.Identity; // always start with identity matrix  matTransl = Matrix.CreateTranslation(0.0f, -0.9f, 0.0f);  // 3: build cumulative world matrix using I.S.R.O.T. sequence   // identity, scale, rotate, orbit(translate & rotate), translate  mMatWorld = matIdentity * matTransl;  // 4: pass wvp matrix to shader  mfxTex_WVP.SetValue(mMatWorld * mMatView * mMatProj);  mfxTexture.SetValue(mTexStonewall);  mfxTex.CommitChanges();  // 5: draw object - select vertex type, primitive type, # of primitives  gfx.GraphicsDevice.VertexDeclaration = mVertPosColorTex;  gfx.GraphicsDevice.DrawUserPrimitives<VertexPositionColorTexture>( PrimitiveType.TriangleList, mVertStonewall, 0, 28);   }I dont think im doing the shaders right please correct me if its not right.   ;  In Managed DirectX there is a function GenerateMipSubLevels to generate mipmaps for a texture. You can call that function right after loading the texture from a file.EDIT: Don't forget to set mip filter to linear, or mipmaps won't be used: SetSamplerState(i, D3DRS_MIPFILTER, D3DTEXF_LINEAR)[Edited by - deathkrush on September 4, 2007 1:49:02 AM];  I still havnt got this texture mip map to work. In fact, im more confused about how to use it than i was before. I did a lot of google searching and download a few source code examples (not focused on texture options but general 3d programming). I couldnt understand them tho. I need help lol. Can someone plz give me some code to put at cirtain spots in my source? Like what i need to declare, what goes in Initialize(), LoadGraphicsContent(), Update(), and Draw(). Or a tutorial online. Or a good source code please.;Quote:Original post by javasircI still havnt got this texture mip map to work. In fact, im more confused about how to use it than i was before. I did a lot of google searching and download a few source code examples (not focused on texture options but general 3d programming). I couldnt understand them tho. I need help lol. Can someone plz give me some code to put at cirtain spots in my source? Like what i need to declare, what goes in Initialize(), LoadGraphicsContent(), Update(), and Draw(). Or a tutorial online. Or a good source code please.I don't really want to rain on your parade but..You could read up on how computer graphics are generated, how the pipeline looks like, what are different filtering methods, how textures are applied, and all that 'boring stuff'.When I read senteces like 'dunno lol, my graphics stuff is XNA' it makes me die a little inside. It means that microsoft made programming too easy and allows people with basically no knowlege of either programming (givf code to put in places) or graphics to code stuff for their platforms. Although XNA is a great way to standarize the switch between xbox and pc, making it overly too easy without exposing any parts of the underlying engine makes events like these too common.I know that everyone wants to make another world of warcraft, tekken or whatever, but starting with the basics and patience is one the best advices anyone can give you.If you're using examples, learn what they do.If you're using examples, learn to modify them after you understand what they do.If you understand what you're doing, read up on what can be done, and what is usually done and where, adapt your code.Seeing as you have problems with posting screenshots in a proper format, there is a lot you must stil learn, young padawan. And do not give in to the dark side of 'easy programming' as its path is wicked and treacherous! ;-)   ;  Mipmapping was invented to solve aliasing problems when texels are minified. Mipmaps provide a set of pre-filtered images, each one 1/4 smaller than the previous one, for example: 16x16, 8x8, 4x4, 2x2, 1x1. These images need to be computed at or before load time, so typically you would that into your Init or Load function.Just having mipmaps computed doesn't do anything, because you need to set appropriate texture filter settings to enable them. Minification filter specifies what filter to apply when texels are minified, Magnification filter specifies what filter to apply when texels are magnified and Mip filter specifies how to interpolate between two mip levels.So how to do this in XNA? I never used XNA, but a quick search on MSDN gave me this:GenerateMipmapsSamplerStateTextureFilterAfter generating mipmaps, set MinFilter, MagFilter and MipFilter to Linear. Pu the code in the Render function because sampler states are typically changed many types per frame. This will effectively enable tri-linear filtering. Remember these settings in PC games: bi-linear, tri-linear, anisotropic? This is it.BTW, use your SDK documentation, it's your friend.[Edited by - deathkrush on September 6, 2007 1:06:36 AM];Quote:Original post by javasircI still havnt got this texture mip map to work. In fact, im more confused about how to use it than i was before. I did a lot of google searching and download a few source code examples (not focused on texture options but general 3d programming). I couldnt understand them tho. I need help lol. Can someone plz give me some code to put at cirtain spots in my source? Like what i need to declare, what goes in Initialize(), LoadGraphicsContent(), Update(), and Draw(). Or a tutorial online. Or a good source code please.You could do a lot worse than reading my book which has 800 pages of information about how all this 3D graphics stuff works.  You won't ever get beyond "code and pray" without an understanding of how 3D graphics works.  Yes, you're using XNA and my book is talking about Direct3D8/9 for C++, but guess what -- all the concepts are still the same.  It doesn't matter what your API is, you're still rendering fancy triangles.   