Author Topic: Newbie question - ho to invert opacity mask bitmap?  (Read 1106 times)

2023-10-09, 19:24:47

hankusp

  • Active Users
  • **
  • Posts: 41
    • View Profile
How do I invert a black and white bitmap when using it as an opacity mask? I can't find a "invert" button anywhere in the Corona bitmap shader.

2023-10-09, 19:45:51
Reply #1

lollolo

  • Active Users
  • **
  • Posts: 225
    • View Profile
You could use Corona Color Correct, it has an option called "Invert colors"

2023-10-10, 00:54:39
Reply #2

hankusp

  • Active Users
  • **
  • Posts: 41
    • View Profile

2023-10-10, 08:30:08
Reply #3

Beanzvision

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 3873
  • Bengamin
    • View Profile
    • Cormats
You can also swap the black & white points in the texture :)

Bengamin Jerrems l
Portfolio l Click me!

2023-10-10, 14:09:42
Reply #4

hankusp

  • Active Users
  • **
  • Posts: 41
    • View Profile
Yes, I've done it earlier - swaped black and white point. But according to my tests it works much better with Corona Color Correct method.

2023-10-10, 15:08:48
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8898
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Keep in mind that Corona color correct invert is not linear. It doesn't matter with purely black and white masks like in your example, but if you want to invert greyscale textures like roughness, or displacement, you will get wrong result. You can use curves editor in Corona color correct if you want to get linear invert.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-10-10, 15:50:17
Reply #6

hankusp

  • Active Users
  • **
  • Posts: 41
    • View Profile
Ok, thank you a lot for your tip.