Home Unreal Engine

UDK - Material - Merge a Clamped with a Unclamped

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

I was wondering if anyone might have any leads and advice about a setup I'm trying to make.

Basically, here is the gist of it, I have two setups, one of them a Lambert term (N.L) with a Lerp which controls the Two colors, so (for example) my character has a white highlight on their face, while anything leading towards the shadow is Red. The catch is, this setup only picks up 'small' details from the normal map, so the color varies pending on light position and normal map.

This setup is clamped.

The second setup is abit more complicated, but basically, I divided my Lambert term in 3 steps, so the light are is white, the in between is blue and the shadow leading part is Red. The catch is, this term is broad and doesn't catch details, as well it 'warps' around my mesh.

This setup is not clamped.

The issue I have is that each setup serves it own function, so I was wondering if these is a way to keep the general effect of the Unclamped value as my base, and somehow 'overlay' the other setup on it.

I tried everything, from Overlay in the UDK package to complex custom nodes, but the problem, no matter what I do, the colors don't overlay, they either bleed to extreme values, darken the hues or become Clamped and return my effect to a generic Lambert.

I cannot post up the materials picture (sorry about that), but I guess if worse comes to worse, I could PM it?

Either way, I'm hoping to get some help, cheers!

Replies

  • JordanW
    Options
    Offline / Send Message
    JordanW polycounter lvl 19
    Your question is pretty complicated so I'm not sure if I understand it correctly, but it sounds like you have multiple values you want to blend but not go >1. You should probably scale each value then add them all up. Whatever lighting model you're approximating sounds like it's splitting/scattering the light in different ways so you need to assign each a weight.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Yeah, I guess I did, me and my incoherent blabbering ;P

    OK, here are snippets of what I mean:

    So I have this, a Blender Normal to fake 'bleeding':
    60225867.png

    Also this, a Lerp (which being fed the Lambert term) gives control for dark and white area's, we shall call it Backys:
    dsfb.png

    Basically, I want the keep the Bleed and Backy's color 'correctly', for a lack of better terms. Issue is, if I mutiply, it will override and kill the yellow colors, but if I add, it will distort the colors, and sometimes, even negate the yellow back to white.

    Now naturally, you might mentioned that I should 'warp' my Lambert term of the Bleed so that Mutipling it by the second term will result in a correct 1:1 color transition, however, the paradox is that a warp on my Bleed term will actually end up killing the colors, since it relies on my normals for the information, so that is a no go.

    How would I combine these two? Everything I tried so far either ended is over exposition of the colors or killed the effect, no matter what I try, I cannot seem to achieve the effect I wish for.
Sign In or Register to comment.