Home Technical Talk

resizing normal maps

Ruz
polycount lvl 666
Offline / Send Message
Ruz polycount lvl 666
Just wondering if resizing normal maps affects them in any way, either making them less distinct or other noticeable problems.
I generally output at 2048 then resize to 512 or whatever the spec is

cheers
mike

Replies

  • Penzer
    Options
    Offline / Send Message
    Penzer polycounter lvl 17
    You have to normalize the texture after resizing it. If you use nvidia normal map filter, just click the "normalize only" option. You have to do this when you resize a normal map, or paint in one yourself. The RGB value of each pixel has to add up to a specific value. When a normal map resizes down, it may no longer add up. You'll have to look very closely to even see the change in your normal map, but it does affect rendering if you don't normalize. Someone correct me if I'm wrong on any of this.

    I haven't worked with any next-gen game engines, but it is my understanding that they will normalize each mip level automatically as it creates them.
  • EarthQuake
    Options
    Offline / Send Message
    worst that will happen is they'll be a little blured from the down sampling, usually resizing from 2048 to 1024 is better than just rendering with high AA on a 1024, i've had people try and argue with me that it will totally destry the normals if you resize them and they're resampled, but its BS. The most you'll have to do is re-normalize and really you probablly shouldnt even need to do that.

    Also you can always just sharpen it as well afterwords if its a bit blured, theres really quite a few things you can get away with in PS that will look just fine. If i was going from 2048 to 512, i would probablly go 2048 -> 1024, unsharp mask a bit -> 512. I've done this before and it works pretty well, just make sure not to go overboard on the sharpen because it will start to bend your normals in wierd ways.

    You have to be careful not to over sharpen, it looks like in this example i did a bit, probablly in all the maps (diffuse, spec, normals) This just shows the difference between the FPV texture, and the world model view texture, you can see some slight issues at the seems, but again i think thats just from over sharpening. We use 2 seperate sets of textures on the same UVs for this for 2 reasons, 1. We turn of mipmapping for the first person textures so they dont look like ass, so in the world view if we used the same, it wouldnt mip, and would swim really badly. And it also actually saves memory to jsut save an alternate version, since you're skipping the 1024 level of the mipmap that you would be caching otherwise.

    Top is 2048, bottom is 512. Diffuse and spec textures by Martin Shapev (dfacto)
    resize.jpg

    [ QUOTE ]
    You have to normalize the texture after resizing it. If you use nvidia normal map filter, just click the "normalize only" option. You have to do this when you resize a normal map, or paint in one yourself. The RGB value of each pixel has to add up to a specific value. When a normal map resizes down, it may no longer add up. You'll have to look very closely to even see the change in your normal map, but it does affect rendering if you don't normalize. Someone correct me if I'm wrong on any of this.

    I haven't worked with any next-gen game engines, but it is my understanding that they will normalize each mip level automatically as it creates them.

    [/ QUOTE ]


    The engine i'm working with here normalizes everything for you on load. So you dont even have to run it through the filter, but some engines may not. [edit]Wrong, as stated below it gets normalized by the shader, not at load =)

    [edit]
    Also it may be worth noting that these are object space normal maps, and do not suffer from many of the aids that tangent space maps suffer, so there may be some differences, it *should* be exactly the same concept though.
  • monkeyscience
    Options
    Offline / Send Message
    monkeyscience polycounter lvl 12
    Sharpen and linear filtering do actually work correctly on scaled and biased normalmaps because of maths. Doesn't matter if it's tangent or object space. The normal lengths will change slightly with both filters, but I doubt you'd even notice. Since most engines will have linear filtering (straight up or between mip levels) on the normalmap at runtime anyway, the artifacts are still going to be there unless the shader itself normalizes the vectors.
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    Thanks for the input guys and the detailed run through EQ. Actually , since I am doing clothes on the whole, a bit of unsharp mask will actually be quite beneficial
    I was actually worried about sharpening originally as I thought it might do something weird to the integrity of the normal map.

    (Ruz goes away and sharpens lots of normal maps)
  • EarthQuake
    Options
    Offline / Send Message
    one last thing, if you're rendering out much larger maps than you need, make sure you have LOTS of pixel padding, i usually do 8 pixels at 2048, but you may want even more than that.
  • StJoris
    Options
    Offline / Send Message
    It might be a stupid question, but why would you want to render out much larger maps then you need?
  • EarthQuake
    Options
    Offline / Send Message
    Some people like to create high res assets, just incase they need them later....
  • Ruz
    Options
    Offline / Send Message
    Ruz polycount lvl 666
    yup, the fmv people always moan if you haven't got a high res version
    EQ, I do tend to have a large bleed around my textures anyway, cheers

    StJoris - I do find that resizing gives me a better quality normal map than rendering the actual size I need
  • StJoris
    Options
    Offline / Send Message
    You know what, I'll have a shot at comparing them when I finish my mill:)
  • moose
    Options
    Offline / Send Message
    moose polycount sponsor
    it depends on how the image is resampled in PS. Sometimes resizing will completely nuke your finer detail, to which you need to go back in and fix the contrast, others it subdues it enough to make it badass. Resizing normal maps for me usually results in tweaking the surface noise/additional bump.

    unsharp doesnt break anything on the normal map, i wouldnt use it in excess, but it does do a decent job at poping some details a little more. Just need to be 100% sure you dont add white or black into the normal from the sharpen.

    likewise with adjusting levels of your blue chan to help pop the details lost in resizing.

    just dont rotate shit. then you have to do all sorts of fun channel swapping and inverting smile.gif
Sign In or Register to comment.