Home Technical Talk

Photoshop/Shader - Normal Map - Deepening and Combine

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Hey to all,

I was wondering if anyone knew the proper way to marry two normal maps in Photoshop or shaders.

I was following this tutorial, is it still a valid method?

http://vimeo.com/8025133


Also, I cannot access Ben's page for Normal Map deepening, anyone have the image in hand?

http://www.poopinmymouth.com/process/tips/normalmap_deepening.jpg

Cheers!

Replies

  • leslievdb
    Offline / Send Message
    leslievdb polycounter lvl 15
    in photoshop i usually put the layer on overlay, then goto levels for that layer and put the white (output levels) on 128 for the blue channel
  • gsokol
    Offline / Send Message
    gsokol polycounter lvl 14
    Sorry...I was too lazy to look at your video.

    For combining:

    I set the new layer to overlay, then uncheck the blue channel in the blending options in layer styles.

    For deepening:

    I can duplicate the normal map layers and do an overlay like above...essentially combining it with itself...

    You can also try adjusting the levels of the red and green channels in your normal map layers. Bring in the black and white sliders up to where a lot the peaks are, so that any empty space is out of the range.
  • tristamus
    Offline / Send Message
    tristamus polycounter lvl 9
    Hey there,

    I have an action set for you... :) It goes through all the proper steps for you at the push of a button.

    Have at it, http://www.filedropper.com/combinenormals
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Ravenslayer and gsokol: Thanks you guys, that should be useful. The reason I was asking compared to the video, is because the guy essentially overlays the RG channels (kills the blue) and creates another copy of the normal map, but this time, kill the RG and mutiplies the blue.

    So this the basic idea: [RG(Overlay)-B] + [B(Multiply)-RG] = Detail Map x Base Normal Map = Final Output


    tristamus: Awesome! Much love mate! You should create a section in your site and put that baby up!
  • throttlekitty
    PC Wiki: Blending Normal Maps Together.

    I use the action provided here.

    tristamus, I'm lazy/on painkillers right now, what does your action do?
  • Ben Apuna
    The Photoshop overlay and -1/2 the blue channel blending method "works" but it's definitely not the "proper" way to do it due to the way vector math doesn't work in PS.

    For the best results use Crazy Bump (or some other tool?) that will do the proper calculations.

    You can't see much of a difference by just looking at the texture flats, but once you start viewing 3D objects at oblique angles with the normal maps applied then crazy bump's method makes a huge difference in accuracy/quality.
  • snake5
    You can also use Texture Designer to add them together... :D
    Load any number of them, use "Unpack normal" node to get the [-1;1] version, add them together (with the Add node), normalize (there's a node for that), "Pack normal" and right click on the last node->save
    You can also multiply each loaded and unpacked normal with the Brightness/Contrast node to do a weighted add.

    P.S. This tool was made exactly for situations like these, that's why I feel it's a shame that people rarely notice it.
    P.P.S. Since Texture Designer works similarly to a shader, these instructions can also be used to write a shader that does that. ;)
  • DOG-GY
    Offline / Send Message
    DOG-GY polycounter lvl 12
    Ben's tutorial did the same overlay method but with blurred duplicates of the original normals. Make a few duplicates and iterate higher levels of gaussian blur, neutralize the blue channel and then overlay it on your originals. It looks great. He recommends not renormalizing it (your engine may renormalize by default), but it still looks great if you do.

    I don't know if it's been mentioned, but you can add the blue channel back in by making a dupe WITH the blue, putting white in the red and green channels and setting the blending mode to multiply. I'm sure this is old news for you though.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    What is the point of halving the blue channel, I can't remember at the moment.
  • Maph
    Offline / Send Message
    Maph polycounter lvl 8
    malcolm: Because that way you remove any sort of normal (Z direction) influence from the overlay map, which will interfere with your baked normals otherwise.
    In normal maps, the blue channel represents the normal's magnitude in a range of -1 to 1 mapped to 0..255 A value of 127 means that the normal has a magnitude of 0 (ie. no raised of deepened surface). A value of 0 means fully deepened and 255 is fully raised.

    If you effectively overlay two normal maps without halving the blue channel of the detail map, you destroy all the information in the blue channel because you screen blend the value of the detail map (range 0..255) over the base normal map (range 0..255). Which results in a basically all white value in the blue channel and really funky results when viewed realtime.

    But if you want top notch results with blending normal maps, use Crazybump as Ben suggested.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Maph, thanks for that. Makes perfect sense, for some reason I thought it was the green channel that held the depth.
  • pasha_sevez
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    Ace-Angel wrote: »
    Hey to all,

    I was wondering if anyone knew the proper way to marry two normal maps in Photoshop or shaders.

    I was following this tutorial, is it still a valid method?

    http://vimeo.com/8025133


    Also, I cannot access Ben's page for Normal Map deepening, anyone have the image in hand?

    http://www.poopinmymouth.com/process/tips/normalmap_deepening.jpg

    Cheers!

    IMHO, this method gives the best result of all I have tested. I'm using it for several years and it works perfectly ))
  • gsokol
    Offline / Send Message
    gsokol polycounter lvl 14
    Maph wrote: »
    malcolm:In normal maps, the blue channel represents the normal's magnitude in a range of -1 to 1 mapped to 0..255 A value of 127 means that the normal has a magnitude of 0 (ie. no raised of deepened surface). A value of 0 means fully deepened and 255 is fully raised.

    Incorrect.

    The blue channel has nothing to do with magnitute...Your thinking of how a bump map works.

    The three channels of a normal map store the ANGLE of normal vectors...Red is X, Green is Y, and Blue is Z. So in any one pixel, there is a value for each channel, giving angle for each axis to direct light which way to bounce.

    127 blue is the default blue color, so that the Z value = 0. This will essentially bounce light directly back from a face as if there was no normal map there.

    When you are trying to get "deep" Normals, you actually want the angles of red and green to be stronger, so your multiplying red and green values, but you need blue to stay the same, because that defines what is "flat" (for a lack of a better word) against the geometry itself. Adding more blue can offset the angle that light bounces off of sections that should be completely flat. So you can get things where...a flat section of a wall should be lit bright because its directly facing a light source, but it will appear darker than it should because light is bouncing the wrong way. Overall your mesh will be lit in a way that isn't correct and will probably not look right if your base blue isn't at 127.
Sign In or Register to comment.