Home Unreal Engine

Problem creating a Gooch Shader

polycounter lvl 13
Offline / Send Message
16bit polycounter lvl 13
A Gooch shader goes from warm to cool. Like in this picture

screenshot.png

but in unreal, I'm having trouble.

My shader works correctly in that the brighter the light is, the yellower it gets, and the darker it is, the bluer it gets. But the trouble is that it stops half way, as in it's only lighting half the sphere, which is normal. How can I make the entire sphere affected by the lighting vector?

Replies

  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    posting your shader network would be helpful.

    Objects always self shadow in the material editor preview window.
    The light vector IS applicable to the entire mesh, its just being overruled by the shadow component of the render pipeline.

    Place a static mesh in the world and turn off its shadow casting, and you'll see your full goochy effect.
    GOOCH_World.jpg
    GOOCH_ShadEd.jpg
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    I did the same as you, except I didnt normalize or use a constant bias scale. And I did a longways lerp... for some reason...

    Gooch.png

    I don't suppose there's a way to turn off the shadows in the material editor, because they get in the way a lot. Other than zooming out, zooming out makes it fade out.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Hmm. Yeah the constant clamp on your light vector is an odd choice, but it seems to work in this particular instance. Only trouble is you could get a vector with a magnitude up to 3, which could throw off what youre expecting out of the dot product.
    I'be looked for a way to turn them off without success. Could be somewhere I have yet to check.
Sign In or Register to comment.