Home Unreal Engine

Blended detail normal maps

polycounter lvl 9
Offline / Send Message
samnwck polycounter lvl 9
Is there a way to have blended detail normal maps with a mask that has several different colors to differentiate where the different detail maps will blend together? If so, could you tell me what that is called within UE4/ a link to it in their documentation or a tutorial? Here's an example of kind of what I'm thinking: 

Thanks in advance!

Replies

  • LMP
    Offline / Send Message
    LMP polycounter lvl 13
    Yeah, Just use Lerps (Linear Interpolate) You'll need to think carefully about which order you're going to put things in as each Lerp can only blend between 2 inputs so with a mask map using all 4 potential channels you can blend upto 5 different maps. Also, be sure to throw out the blue channel and add the R and G channels of the detail maps over the base Normal Map.
  • Vailias
    Offline / Send Message
    Vailias polycounter lvl 18
    Lerps can be useful but very tricky to control with blended colors, like magenta. You're better off composing your masks from just RGB and A channels.
    However if you wind up needing more than 5 maps you can build a color masking material function like this: 


    ColorMask is your  mask image
    ColorCompare is the color to select from the mask
    Fuzzyness controls how pure the color is you're selecting
    Sharpness controls the falloff rate of the mask.  Save that as a material function and you can use it in other materials when you need arbitrary color masking for whatever reason.
Sign In or Register to comment.