Home Technical Talk

sharpening mip-map levels

polycounter lvl 17
Offline / Send Message
SHEPEIRO polycounter lvl 17
sharpening up the mips in a DDS manually in photoshop to counter terrain shading blurriness

personnally i disagree with this, i find it makes any tiling issues much worse and really just ups the contrast in the mips not really makes any difference to the sharpeness of the image, also makes any aliasing issues much worse.

but has anyone got any tips tricks or examples of it working really well?

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    i don't know anyone who manually edits mips in photoshop, sounds like madness to me!
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Sometimes it might be needed to edit mipmaps, especially for alpha maps on vegetation.

    Thing is, to be able to edit a mipmap. you must export your texture to DDS. Open the DDS, edit the mipmaps, and export again. (right?)
    But this sucks because the DDS will have double compression. Unless there's some lossless DDS export option that I don't know of.
  • poopinmymouth
    Options
    Offline / Send Message
    poopinmymouth polycounter lvl 19
    MoP wrote: »
    i don't know anyone who manually edits mips in photoshop, sounds like madness to me!

    It can actually be useful on some things. For example on characters, I'll sometimes adjust contrast on the faces, to help them read better at a distance. You can also remove overlays for the 2nd mipmap and below for more readable textures.

    On the latest engine I'm working on, without going too much into detail, we do some fancy blending from one set of terrain textures to the next. The particular blending kind of reduces contrast once it comes in, and it only comes in at a certain mip level, so I can over contrast that one to rectify.


    But it's rare that I do that.
  • Ryan Clark
    Options
    Offline / Send Message
    Ryan Clark polycounter lvl 18
    [HP] wrote: »
    this sucks because the DDS will have double compression. Unless there's some lossless DDS export option that I don't know of.

    There is.
  • throttlekitty
    Options
    Offline / Send Message
    I made some profiles for the nVidia plugin for different mipmap sharpening, maybe you'd find them useful?

    http://tesnexus.com/downloads/file.php?id=11817
    there's a brief rundown of the types halfway down the description page.
  • doc rob
    Options
    Offline / Send Message
    doc rob polycounter lvl 19
    Yeah, I would almost never sharpen a texture in the mips - you generally want less detail as distance increases. However, IIRC, there are sharpening options in the DDS exporter, so you don't need to do it manually.

    On the other hand, I occasionally will open up a texture and futz with the alpha in the mips, so that it will fade in/out according to distance.

    I would also love to have an easy way to simplify shapes on textures in the distance. Check out this painting:

    oga3.jpg

    The closest tree has 5 or 6 colors in the foliage. The farthest ones have only 1 or 2. That is something you could maybe simulate by hand painting the mips in a texture, but it would be a pain in the ass. Having a tool that could slot textures into various mips and allow easy editing would be better.

    The benefit is that you still have crisp shapes in the distance, just at the proper granularity. Scaled-down mip maps just give you muddy over-detail.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    foc_rob: Cool idea. You could maybe do something like the "cutout" filter per mip level with different settings in order to flatten out the details if you were doing a stylised game, and something like that would be easy to automate.

    As for editing mip levels to get transparency to work, I prefer an engine-side solution - for transparency problems with alpha test, you can set the "cutoff" point to something really high in your material settings (eg. default 0.5 is mid grey cutoff, 0.9 means close to white, etc), and then have a gradient from white to black instead of just a hard black/white edge in your alpha. That way when it mips down, the filtering retains more volume in the alpha, so for stuff like chain link fences it works really well - you don't end up with a flickering pixelly mess at a distance.

    Our engine also had per-texture settings for "minimum mip level" so you could tell an alpha texture never to use below, say, mip 2 if that meant it looked better. Useful to have options like this available to the artist.

    The more "procedural" stuff like this I reckon is always better - as soon as you are hand-editing anything then you're not only making more work for yourself right now, but also potentially more later if you ever have to revisit that texture. Something I'd always avoid if at all possible.
  • Neox
    Options
    Offline / Send Message
    Neox veteran polycounter
    ah studio ghibli.. how much would i love to have the ability to import dds into unreal for airborn...
    manipulating mipmaps is a thing i experienced in some productions, the best approach was to use them to increse certain details over distance and remove smal details, so in an RTS Title is removed fine sand structures but added some rougher shapes of dunes and such things, which worked pretty cool
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    cheers for the info
  • Michael Knubben
    Options
    Offline / Send Message
    Yeah, I played around with this some, it can be quite fun. Just some filters (cutout, for one) on the mips can looks quite nice.
    Edit: oh, and sharpening alphas in the mips, or (if it's a simple shape, like a grid) just painting a new one, or getting rid of it altogether.
Sign In or Register to comment.