Home Technical Talk

UDK decal questions

polycounter lvl 8
Offline / Send Message
snow polycounter lvl 8
I'm not 200% sure on the best way to setup decals in UDK, so how I did it was, I plugged my decal texture into the emissive channel, and set the blend mode to blend_modulate, and lighting model MLM_Unlit.

So it does work and is transparent, but I'd like to be able to adjust the OVERALL opacity of it so it isn't so dominant in my scene (strong black) and ideally setup a parameter that allows me to adjust the opacity of the decal on the fly. I know I could adjust the decal texture itself, but I'd like to vary the strength of it depending on what I want to put the decal on.

Secondly, is it possible to have white decals? The way I have my material setup it's just going to make that impossible as anything white will be transparent.

I'd like to just use a standard material setup with a mask for the decal, but then you run into the problem of UDK not reading the entire greyscale and as consequence really bad opacity clipping.

Hope I made sense. Thanks chaps!

Replies

  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    that setup looks right to me - if you want control over the opacity then try plugging the texture into a power node before the emissive channel. if you make the exponent a material instance then you can adjust the overall visibility of the decal easily.

    for a white decal you need to overdrive the white values so they're greater than 1. personally i use the decal texture as the mask in a lerp between values of 1 and 1.5 for example. again you can add a power node to control the opacity. i presume the white decal you want is for dirt and/or scratches etc. rather than a poster. if you wanted a solid white then you'd probably just be better off using an overlay.

    not sure i understand your third point 100% but i think you're talking about just using a normal material on a overlay polygon? like a master material type setup? if so then that does work but you need to use the opacity channel and blend_translucent if you want a full 8 bit alpha channel. there's also the blend_softalpha which is designed for things like leaves that have a soft edge but are mainly either fully opaque or fully translucent.

    hope that helps!

    tharle
  • snow
    Options
    Offline / Send Message
    snow polycounter lvl 8
    Thanks tharle I'm excited to see how this goes. I'm not sure if I completely get you on how to overdrive the white. I'll give it a shot when I get back home, and hopefully you won't have to hear from me again! =]
  • SanderDL
    Options
    Offline / Send Message
    SanderDL polycounter lvl 7
    Are you actually using a decal material instead of a regular one? Normal materials cause the lighting to be incorrect on your decal.

    http://udn.epicgames.com/Three/UsingDecals.html
  • feanix
    Options
    Offline / Send Message
    feanix polycounter lvl 7
    You can also just use regular phong and transparency for decals. Works fine.
  • G3L
    Options
    Offline / Send Message
    G3L polycounter lvl 9
    About decal actors...

    If it's a straight out masked decal with no transparency, wouldn't it be easier and better to use a flat card with a masked material on it instead of using Unreal's decal actor?
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    g3l - possibly. if you can then yeah thats going to be cheaper, however you might want to use a decal that spreads over two piece of geometry or that keeps the normals of the underlying pieces in which case its easier to use a decal. all depends on what you need it for and what your engine is setup to use.
  • yodude87
    Options
    Offline / Send Message
    yodude87 polycounter lvl 5
    well, i for myself make a mask for the decal, white what i want to be seen and black unseen, and plug it to the opacity mask slot (have to set the blend mode to masked).

    dunno if im doing it wrong, but works fine for me
Sign In or Register to comment.