selinux.es

Hi all

Somebody knows where I can find some mipmapping tutorials

I'm trying this:

texture = content.Load<Texture2D>("tx");

Where tx is an asset loaded with de "Texture (mipmapped)" processor. When it loads has 9 levels.

Then, in the draw call I do:

effect.Texture = texture;

Where effect is and object of BasicEffect class

The texture is

From wikipedia

The result is the entire texture drawing. I think that hardware must select the level to draw. Can anyone help me



Re: XNA Framework MipMaps

dczraptor

I'm pretty sure the hardware/xna will automatically take care of using the mipmaps for you, so you don't have to do any special code. All you have to do it create textures with different mipmap levels. You can use the DDS tools from DirectX SDK to do this i think.




Re: XNA Framework MipMaps

selinux.es

Thanks, but where can I find examples or resources.



Re: XNA Framework MipMaps

The ZMan

There are not any specific mipmap tutorials becuase as previolsy stated you do not do anything to use them.

Mipmaps are prescaled versions of your textures that are chosen by the hardware depending on how far away the object is from the camera. Using the prescaled versions prevents aliasing problems.

So any xna tutorial that moves textures on meshes in 3d will be using mip maps.

If thats not what you mean then you might have to explain your question better






Re: XNA Framework MipMaps

selinux.es

I'll try to explain it better.

I took the picture from wikipedia in jpeg format. I created a game and load the texture with the ¡°Texture ¨C Mipmapped¡± processor. I rendered and the result was all satellites drawn in spite of one.

I¡¯m being to think that the problem is in the jpeg file. May be





Re: XNA Framework MipMaps

Johnnylightbulb

I think you're dropping the entire image from Wikipedia into your project; the result is you see a bunch of satalites of various sizes instead of one. Instead, crop out all but the largest satalite and save that as a new image, and then add that image to your project. XNA will automatically create MipMaps and your 3D card will decide which level to show on which part of the screen.

Later, you can use MipFilter, MagFilter, etc properties of BasicEffect/HLSL files to tell the 3D Card how it should interpolate between the various levels of the texture.

Short answer: Don't worry about mip-maps, drop a picture into your project and you will see that picture when running.





Re: XNA Framework MipMaps

selinux.es

hahaha

... I'm stupid ...

Thanks very much Johnny!!!