Author Topic: Black and White Masking Issue - Stroked/Halo Edges  (Read 1864 times)

2018-05-24, 14:00:12
Reply #15

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9052
  • Marcin
    • View Profile
Try this string option (https://coronarenderer.freshdesk.com/support/solutions/articles/5000518663-string-options):
bool shading.enableAa = false

It will completely prevent this effect, and will also disable AA for you.
So I guess it means that this is how AA works in Corona, and this is how it is supposed to work. I do not think it makes sense to turn this thread into a report in our tracking system, so I will just leave it here, and hopefully someone from our dev team will check it at some point, and provide technical explanation, since this is what we are all interested in. :)

I am also curious if this effect also happens in other renderers, and if so, then how it looks compared with Corona.

2018-05-24, 19:08:34
Reply #16

ferrarod

  • Active Users
  • **
  • Posts: 12
    • View Profile
Thanks maru for your help. This does seem like a workaround as disabling AA won't be great for many other edges and details in the image. Hopefully a technical explanation will come along too! I don't have a Vray license unfortunately so I can't test in another platform, but it would be interesting.

Thanks again!

2018-05-25, 11:05:14
Reply #17

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9052
  • Marcin
    • View Profile
Thanks maru for your help. This does seem like a workaround as disabling AA won't be great for many other edges and details in the image.
This was by no means meant to be a solution or even workaround. It's just an explanation which part of the rendering process affects this.

2018-05-25, 18:27:22
Reply #18

ferrarod

  • Active Users
  • **
  • Posts: 12
    • View Profile
Gotcha - thank you either way!

2019-03-04, 12:10:43
Reply #19

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9052
  • Marcin
    • View Profile
So the final answer is:
GAMMA!

You can see the edges of the letters as tiny black-to-white or white-to-black gradients, right?
And we all know what gamma 2,2 does to gradients, right?

Here are some example images to confirm that.
2.2 images were saved "just like that" from 3ds Max with gamma 2.2 - that's what you get when rendering with 3ds Max and Corona by default.
1.0 images were saved with gamma overridden from 2.2 to 1.0, which as you can see results in a linear gradient. So the tiny gradients in the letters are linear too.

Check out these comparisons:
Gamma 1.0 - https://corona-renderer.com/comparer/8uaHMw
Gamma 2.2 - https://corona-renderer.com/comparer/hEoxV6

As you can clearly see, with 2.2 the white-on-black text is thicker.
As you can also clearly see, with 1.0 the letters are the same. Some monitor profiles or optical illusions may be at play here, but if you take a look at the thin lines in "h" or "w", you will definitely see it.

Extra: why did disabling anti-aliasing completely produce similar results? Because then we basically removed the tiny gradients on the edges of the letters.

2019-03-04, 17:07:33
Reply #20

ferrarod

  • Active Users
  • **
  • Posts: 12
    • View Profile
YOU are a GENIUS!

1000  thank you's for taking the time to follow up on this. This will be a huge help in quite a number of projects moving forward.


2019-03-04, 17:27:15
Reply #21

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9052
  • Marcin
    • View Profile
YOU are a GENIUS!

1000  thank you's for taking the time to follow up on this. This will be a huge help in quite a number of projects moving forward.

First of all, the credit goes to our dev team. They provided an explanation, and I just showed some examples to make it easier to understand. :)
Secondly, I am not sure if there is any "workaround" to this which would not destroy the image by applying incorrect gamma...

That's basically how rendering works, and it will happen in other renderers as well (already confirmed with V-Ray).

2019-03-04, 17:31:38
Reply #22

ferrarod

  • Active Users
  • **
  • Posts: 12
    • View Profile
Haha totally - go dev team!

Yes, the gamma change is a problem, but at least we know what was happening. And who knows...maybe there is some workaround in the future for it.

2019-03-04, 19:20:55
Reply #23

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5787
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Secondly, I am not sure if there is any "workaround" to this which would not destroy the image by applying incorrect gamma...

How about saving linearly to 32 bit image and then converting to 8 bits in photoshop? Would that work?
I'm not Corona Team member. Everything i say, is my personal opinion only.

2019-03-06, 19:30:00
Reply #24

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9052
  • Marcin
    • View Profile
Secondly, I am not sure if there is any "workaround" to this which would not destroy the image by applying incorrect gamma...

How about saving linearly to 32 bit image and then converting to 8 bits in photoshop? Would that work?

But you would either end up with gamma-1-contrasty image, or you would get the same issue (if you would convert to gamma 2.2).