Sign in to follow this  
neeker

OpenGL Handrolled mipmaps

Recommended Posts

Hi,

 

I have terrain that I want to display with a grid.  I thought multitexturing would be a good way to apply the grid (basically, have one texture that is a square outline), but I run into problems when zooming the camera out because of minification.  I want the grid lines to be a consistent width no matter the zoom.

 

I thought the solution would be to build my own mipmaps in a graphics editor so the texture contains each LOD.  I did something similar in OpenGL a while ago, but I'm not having any luck finding out how to do it in DX.  Can someone point me to where I can (if it's possible) implement this?

 

Also, if this is possible:  My base texture is 256x256 and when the camera is fully zoomed out the texture size would be 16x16.  Would I just stub out the remaining LODs or just leave them out entirely?

Share this post


Link to post
Share on other sites


I want the grid lines to be a consistent width no matter the zoom.

 

You could instead draw the terrain with line primitives, although then you'll have jaggies.

 


I thought the solution would be to build my own mipmaps in a graphics editor so the texture contains each LOD.  I did something similar in OpenGL a while ago, but I'm not having any luck finding out how to do it in DX.  Can someone point me to where I can (if it's possible) implement this?

 

If you're using photoshop, there is an nvidia plugin that allows you to specify the mipmaps and save as a .dds file.

Share this post


Link to post
Share on other sites
If you're using photoshop, there is an nvidia plugin that allows you to specify the mipmaps and save as a .dds file.

 

Note also that you can save .dds as RGBA without compression, which you'll probably want to do - dds is just a container format.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this