• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Endemoniada

Preparing Textures to Reduce Shimmering

6 posts in this topic

Hey guys,

 

I was wondering if there are some tried and true methods for preparing textures to reduce shimmering. Even with mipmaps and filtering I get some shimmering, mostly with high contrast textures that are viewed from the side.

 

I'm pretty sure it's the high frequency pixels causing the problem and I can do low pass filtering to minimize it, but all I can think of in Photoshop is either gaussian blur or reduce noise. Maybe there is a better way, or some guidelines to go by.

 

Thanks.

 

0

Share this post


Link to post
Share on other sites

Are you using generated mipmaps or authored ones? Often, people will alter the mip levels by hand to cut back on shimmering. Also you might try trilinear filtering, if you're using bilinear with mipmaps. That causes the hardware to filter across levels, rather than choosing a level and only filtering within it.

 

After that, there are the extreme answers but they probably don't apply here.

0

Share this post


Link to post
Share on other sites

Are you talking about shimmering from specular, or from the colors in the texture itself? If it's the former, you should read the link Promit provided and perhaps also check out this thread where we were discussing the same topic. If it's the later, then you can probably address it by prefiltering the mips differently. Filtering out higher frequencies will reduce aliasing, but will also remove high-frequency details from the texture. Certain filter kernels can counteract this somewhat by adding a "sharpening" effect due to their negative lobes.

In theory you really shouldn't get any aliasing from a "standard" mip chain and trilinear filtering, but GPU's tend to play a little loose with their filtering quality in order to boost performance. You can actually adjust manually on some GPU's in the driver control panel. 

1

Share this post


Link to post
Share on other sites
The way that you generate your mipmaps also has an impact. Standard mipmapping should completely eliminate texture shimmering, at the cost of blurring details. Some art is configure to use a filter other than bilinear durin generation in order to preserve details a bit more.
1

Share this post


Link to post
Share on other sites

Thanks for the info guys. I'm getting the shimmering from the texture itself. An extreme example would be a texture with a black background and white gridlines. For a texture like that I'd have to drop the levels so the white becomes grey (say 0.5 instead of 1.0) and gaussian blur it, I can also make sure the gridlines aren't too thin. Even after doing that I'd still get some shimmering.

 

I switched to trilinear by doing this:

 

d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER,D3DTEXF_LINEAR);
d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER,D3DTEXF_LINEAR);
d3d_device->SetSamplerState(0,D3DSAMP_MIPFILTER,D3DTEXF_LINEAR);

 

...and it made a pretty big difference, but some lines still wink in and out a little.
 

I'm making my mips like this:

 

d3d_device->CreateTexture(width,height,0,D3DUSAGE_AUTOGENMIPMAP|D3DUSAGE_DYNAMIC,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&texture,NULL);

texture->GenerateMipSubLevels();

 

Am I on the right track using gaussian blur to prefilter ? Is there another filter that will eliminate only the high frequencies, so it won't blur everything ?

 

Thanks again.

0

Share this post


Link to post
Share on other sites

Someone correct me if I'm wrong but the auto-generated API function applies a simple box filter (aka just averaging neighboring pixels).

Not sure if I understood it correct but do you generate them using the api call and then try to apply a gaussian filter on them ? Because you shouldn't do that tongue.png

I remember Mitchell (which is a specialized kind of cubic filter afaik) being a fairly good filter for mipmaps.

If you create your textures using photoshop you can set the mip filter using the nvidia dds tool.

 

I also remember Jimenez having a grid sample for his SMAA (Subpixel-Morphological-Anti-Aliasing) solution, so you could look into this kind of AA if nothing else helps.

http://www.iryoku.com/smaa/downloads/SMAA-DX10-v2.8.exe

Edited by lipsryme
0

Share this post


Link to post
Share on other sites

 

Is there another filter that will eliminate only the high frequencies, so it won't blur everything ?

 

There's also anisotropic filtering, which helps when looking at surfaces from sharp angles.

0

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  
Followers 0