Shader Mixer - How to blend 2 displacement maps?

FalcoFalco Posts: 241

I have a shader I made that blends 2 sets of textures together, using a lerp or a blend colors node to blend the 2 texture nodes together by a mask.

Everything works great except that I can't figure out how to blend the displacement maps together since the displacement and displace max get outputed from the node seperately.  

What is the best way blend the displacement maps together?

 

 

Post edited by Falco on

Comments

  • eckhart3deckhart3d Posts: 30

    Photoshop maybe

  • FalcoFalco Posts: 241
    eckhart3d said:

    Photoshop maybe

    The point of a layered shader is that it needs to be done in the shader.  

  • FalcoFalco Posts: 241

    I was able to figure it out.  For anyone else curious, you only need to worry about lerping the displacement channel together and just use the displace max output from one of them.  

  • JonnyRayJonnyRay Posts: 1,744

    That makes sense. I suppose if you wanted, you could pass the Displace Max outputs through a Max() or Min() function, rather than choosing an arbitrary one, right?

  • FalcoFalco Posts: 241

    That would probably make sense if you were adding/multiplying the maps together, in this case I'm just combining them with a mask so the pixel values don't change so I don't need to clamp the output or anything like that.   The combined output just gets scaled by the same user defined min/max as if it was one texture and any big scale differences would need to be authored into the textures themselves.

     

  • JonnyRayJonnyRay Posts: 1,744

    Ah! I gotcha. Makes sense to me then. :) I'm glad you worked it out.

  • FalcoFalco Posts: 241

    It appears I spoke too soon.  After looking more closely, it appears that the displacement is disabled after passing through the lerp, even after switching the operation to float3, float3, float to maintain the correct output.  So I'm back to square one.  

  • pwiecekpwiecek Posts: 1,582

    This is just an idea. I'm a poser user so I'm assuming DS has similar nodes available:

    Take the two maps and cut their brightness in half ( or some other ratio that totals 100%)

    Add the two together.

Sign In or Register to comment.