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

2018-04-10, 20:17:35

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
Hoping the more technical-minded here can help me out with a really strange issue I'm having. If this isn't corona related then maybe I'll take it straight to Autodesk, haha. I haven't cross-tested in V-Ray.

ANYHOW

While doing product render tests, I've noticed that using an image for the mask of a layered or mix material gives an incorrect stroke appearance or halo of sorts around the text. I've tested this every way I know how - Using a white/black jpg, tiff, png, inverting the white/black jpg, tiff, png, testing all the different filtering methods, blur settings, as well as gamma changes, corona bitmap, max standard bitmap, corona layered material and standard mix material. Each time, same result.

HERE'S THE KICKER!

When its a white background (bottle) and black text, the sharpness reads perfectly, just as in the real photo. Both of those examples are attached here...

Anyone have any thoughts as to what this could be, or has anyone run into a similar issue in the past??

Any help is greatly appreciated.

Thanks!
« Last Edit: 2018-04-10, 20:22:23 by ferrarod »

2018-04-10, 20:53:41
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Hard to say without seeing an example input image. Thoughts

- Any Blur used in the Filtering section of the Bitmap?
- You mention this happening used as a mask for layer / mix materials, what happens if you just use it directly on a single material e.g. as Diffuse (and other inputs)? That would show if this is something to do with masking, or just something to do with the way the Bitmap nodes are handling it
- Any blur or sharpen or other post effects used in the VFB?
- Is the bitmap of a high enough resolution?
- Any Denoising used?
- Anything changed from the defaults in the Image Filter section of the System tab of the Render Settings?


Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-10, 21:24:05
Reply #2

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
Thanks Tom!

I'll go one by one:

Can't share the original input image unfortunately, but rest assure it's as basic as it gets. White background with crisp black text from Illustrator.

- I tried every blur setting down to .01
- I can definitely do a test with the text as the single material...I'll upload results
- No post effects, blur or sharpen
- The bitmap is 4k and from a print EPS (and again, works fine when it's black text on white bottle)
- No denoising
- No change to default image filter settings


2018-04-10, 22:14:56
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
TY for the info!

On tests here, I can't see any difference between using it as a mask or using it directly as a Diffuse material (not doing reflection or anything, just black and white color) - for me, I am not seeing a problem, the only thing showing is the anti-aliasing expected in the image (which can be affected by Exposure and Highlight Compress values as to just how strong that anti-aliasing shows up). I also couldn't see any difference with white on black or black on white (I had both in the same image, a 4K PNG, attaching that here).



Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-10, 23:26:46
Reply #4

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
Interesting!

A few more tests here. It seems changing the image filter works in favor a bit, however does introduce unwanted aliasing on some edges of the product itself. The tests done are standard (Tent 2px), Sharper (Tent  1.5px) and Sharpest (Blackman-Harris 1px). Blackman absolutely worked the best for text, but introduced the most jagged aliasing on other geo. NOW what's more interesting about all this is if I undo the "invert" on the alpha mask to bring it back to its original white background, black text, the text is the most sharp and delicate even while using the standard Tent @ 2px.......

The final test is the bottle with a corona bitmap as the base material, and not a layered alpha. This still seems to keep the text a bit "bulky"

All those attached...

2018-04-11, 14:29:30
Reply #5

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Can the image file being used not be sent via the private uploader? (or even the entire scene, since it would be private and only we would see it for testing purposes)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-11, 14:46:46
Reply #6

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
While testing whether the "Invert" option had any bearing on the issue, it gave me an interesting way to do an A/B comparison. White text on black is more likely to "grow" depending mostly on Exposure but also partly on Highlight Compress, while black text on white does not (or maybe black on white is more likely to shrink... not sure!)

Here are three images with different values were used in Exposure and Highlight Compress. Note that these were done with pure white which has is too high in albedo, but correcting for that did not seem to change that this takes place.

Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-11, 14:49:14
Reply #7

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
PS inverting isn't the cause, as in the lower half of my image where there is reversed text on background colors, it is still the white text on black that "grows"
EDIT - attaching an image, with an even more extreme Highlight compress value change too; still the white text that "grows" even though it is now the "Not inverted" version
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-11, 14:55:40
Reply #8

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
And as a last note, doesn't matter whether the bitmap is used as Diffuse, or as a mask on a Layered. Whether anything is wrong here I can't say, but it seems to come down to the Exposure and Highlight compress as the cause (without seeing the scene itself to confirm).
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-11, 16:36:38
Reply #9

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
Wow thanks for all the replies and tests! I think I see what you're getting at, and I had the same experience - Whether the diffuse slot is a white text on black bitmap OR it's a layered material with an alpha (inverted or not), the result is the same.

The highlight compression is an interesting note - not sure if there's a definitive reason, but my highlight compression typically around 5-10 depending on the scene, so this isn't floating around the 0-1-2's like you tested. I'd assume the "growing" effect of the white on black gets worse the lower the compression value.

I can privately send you a pared down scene to test, for sure. New to the forums though so let me know the best way to do that.

Thanks again for all the help.

2018-04-11, 16:46:03
Reply #10

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
If you want to share the scene, can use our private uploader - https://corona-renderer.com/upload

Stripped down to just the parts that show the issue is definitely preferred if you can, makes it easier to work with, smaller to upload, and means you are sharing less :)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-04-11, 17:12:33
Reply #11

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
1523459517_CORONA-BLACK-WHITE-TESTING-001.zip

Thanks! Uploaded now. Looking forward to hearing back...

2018-05-15, 21:40:30
Reply #12

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
Hi - just wondering if there's been any update on this behind the scenes?

Thanks!
Dan

2018-05-16, 16:51:59
Reply #13

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12709
  • Marcin
    • View Profile
Sorry for the delay. We will eventually get to it. It's just a super busy period right now.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-05-16, 16:53:33
Reply #14

ferrarod

  • Active Users
  • **
  • Posts: 16
    • View Profile
No worries! Just curious

Thanks