# Materials How to: if Base output has blue color - then inverse the blue, otherwise do nothing?

**URL:** <https://forums.unrealengine.com/t/materials-how-to-if-base-output-has-blue-color-then-inverse-the-blue-otherwise-do-nothing/758976>\
**Category:** Asset Creation\
**Tags:** logic, unreal-engine, Blueprint, question, texture-channel\
**Created:** [January 29, 2023, 7:08am UTC](https://forums.unrealengine.com/t/materials-how-to-if-base-output-has-blue-color-then-inverse-the-blue-otherwise-do-nothing/758976 "2023-01-29T07:08:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![XxNotAGamerxX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@XxNotAGamerxX](https://forums.unrealengine.com/u/XxNotAGamerxX)\
**Post date:** [January 29, 2023, 8:57pm UTC](https://forums.unrealengine.com/t/materials-how-to-if-base-output-has-blue-color-then-inverse-the-blue-otherwise-do-nothing/758976/5 "2023-01-29T20:57:57Z")

</div>

Does anyone know the Material logic to have 2 input paths, 1 output?  
Or is it even possible?

The code I posted is incomplete because I do not understand how the nodes in the red box work, thus my question.

- **What do I put as [Value] in the Switch node?**  
I need 2 inputs A & B, a 3rd for off/on, no/yes, and an output based on the no/yes result.  
Closeup pic (full pic is in OP):  
 ![Close up 2 path check](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/b/9/eb9e9b0945c3d5c16f37b419719dffacb43653bd.png)

I got the idea from this pic, using Distance node as a measurement of the difference between [Base output] and [the color I want to detect]:

 ![UE distance mat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/a/0/1a08cd0f776a403142d985ca7d213ac286aad542.png)

> [@how can I remove background color from a material?](https://forums.unrealengine.com/t/how-can-i-remove-background-color-from-a-material/373035/3):
>
> Thank u very much! I found a solution on github: [GitHub - Tolc/Unreal-UMG-3DObjectInWidget: A simple Unreal Engine 4 project (precisely 4.7.4) showing how to render a 3D object/mesh in a UMG widget.](https://github.com/Tolc/Unreal-UMG-3DObjectInWidget). But this solution generates noticeable aliasing，how can I solve this problem? Thank u.

---

_[View the full topic](https://forums.unrealengine.com/t/materials-how-to-if-base-output-has-blue-color-then-inverse-the-blue-otherwise-do-nothing/758976)._
