# How to avoid mixing the base color with the emissivity color?

I want to get the hardness effect for my opacity mask.
The same effect that the spherical mask brings by default.

Example:

I more or less got it. However I have the problem that the emissivity color is mixed with the base color.

Watch video:

How can I solve the color mixing problem?
PS: A better method to achieve the hardness of the mask is also welcome.

Thank you very much!!

You need to subtract the mask, then clamp, then add the new color.

3 Likes

Sorryâ€¦ Iâ€™m very confused nowâ€¦
What should be the maximum and the minimum?
I tried to do something like that but nothing happenedâ€¦

Thank you very much

I think I know what the problem isâ€¦ If there is no base color connected then the emissive color doesnâ€™t work.

And the emissive color when it works is very different from the selected color (red looks pink).

I tried with several colors and the blue never changesâ€¦

Then I think I saw a problem where there was none.

Anyway thank you very much for your help!!

Base color and emissive colors get combined.
Unless you subtract the area of emissive from base color like suggested, it will always be offset by the base color.

The clamp is just 0 to 1.
Its to insure that after any math you donâ€™t have negative values, or values over 1.

1 Like

okâ€¦ I think I understandâ€¦
I see that itâ€™s not as simple as I thought.
Iâ€™ve been trying for a whileâ€¦

it is necessary to get the inverse function of the mask to obtain the other sideâ€¦ isnâ€™t it?

Or at least I donâ€™t know how to make it easy yet (too newbie).
I have to study the functions of materials.

Thank you very much for your help!!

Many ways to do it.

A normalized value you plug into the base color or the emissive is usually positive.

You can do a power by 10 to make sure all values above 0 are completely 1, a clamp to cut off all thats over 1, and then use it to subtract from the base color.
If you need to subtract the opposite of the mask you just 1- the result.

Once you get the hang of it its fairly simpleâ€¦

I got it.

I thought that the color is applied on the surface, but now I see that the color is in the volume of the space.

Thank you very much for your help.
Greatly appreciated!!