Home Unreal Engine

UDK - CMY/RGB Soft Mask - How to Clean them up?

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

I'm having a little bit of a problem, hope someone can help me. Here is the image.

unled1qab.jpg

I'm trying to create a CMY and RGB mask, from a single texture, but so far I have the following issues:

-I need to "mask out" my CMY colors from my RGB colors, I was hoping to simply have my RGB channels act as RGB channels, without 'taking' my CMY colors with them when I connect them. Is there any other method of doing this, save for 'masking' them out later on in my nodes?

-My 'soft' masks, especially the CMY, are proving hard to mask out from my RGB Channels later on. The closest solution I found was Square-Rooting my CMY colors, before subtracting from my RGB colors. However, as you can see from the image, it leaves behind a strange artifacts in the middle of my map, and I'm baffled by it.

So yeah, there it goes, was wondering if anyone has any tips about these issues on masking with a RGB/CMYK setup.

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    OK, for those who want to use the CMY-RGB masks and (like me) need them to be somewhat soft transition, here is the cheapest solution I found, not best, but should work.

    unled1smo.jpg

    Subtract the RGB from it's child color (EI: Red = Yellow and Magenta), and once that is done, stick to a power node so that it tightness up any residual issues and clean them up.

    With a heavy smudge, values between 8-10 work best (variable from person to person, but should be a good starting point), followed by a little over half for a Gaussian blur, and 2-3 for a sharp falloff mask.

    To compensate for this, one could create a slightly larger mask, or they could add in another node to 'expand' the output AFTER the Power node, though not sure which will be the best option for 'expanding' a mask.

    Anyone got tips on how to 'expand' a mask?

    PS: Don't mind the MaskComponent nodes, it was just me being silly.
    PS2: Also, the bigger your map is, the better the results will. On a 4K map that had 'generous' soft masks, I barely noticed the difference of loss, while on a 512 texture, you get the picture above.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    Ace: if you stick to pure colors you can isolate your CYM masks via an if node for each. If r=g output r for yellow and similarly for magenta and cyan. Then just multiply those masks by the rgb channels as needed to get your end 6 output masks.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hey Vailias, as usual, awesome advice, didn't think the If node would work for me, but surprisingly enough it did.

    Still need some manually Power correction here and there (especially for smudged soft masks), but overall, much cleaner and easier to manage.

    Cheers!
Sign In or Register to comment.