Author Topic: Disable Anti-aliasing Against Background  (Read 1884 times)

2018-04-06, 14:56:14

mabulsoud

  • Active Users
  • **
  • Posts: 29
    • View Profile
Hi,

I was wondering if there's a way to do that in corona as you would in the 3ds max scanline renderer so you can easily produce 2d sprites. Any tips would be greatly appreciated.

Thanks,

Marwan

2018-04-06, 16:52:06
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13130
  • Marcin
    • View Profile

2018-04-06, 20:29:13
Reply #2

mabulsoud

  • Active Users
  • **
  • Posts: 29
    • View Profile
Thanks for the response! This disables AA completely. Ideally for sprites you want AA on the within the objects but not against the background. A good way to think about it is everything is rendered as normal but the alpha outline is pixel sharp. I love working with corona and it would be a shame to go back to scanline for this.

2018-04-06, 20:54:32
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5766
    • View Profile
A CMasking_Mask with Enable Filtering disabled, to give a mask with no anti-aliasing which can then be used as a hard edge in post? The Beauty pass would still be anti-aliased to the background at render time though, so best on a neutral grey background.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2018-07-09, 16:47:48
Reply #4

mabulsoud

  • Active Users
  • **
  • Posts: 29
    • View Profile
I tried the above suggestions but they only work on the image globally. using a mask without AA doesn't really work because some of the edge pixel are still "inside" the mask.Which adds a massive amount of work for thousands of frames.

The functionality that I'm asking about is similar to the "Don't Antialias Against Background" check in 3ds Max's preferences. But it only works with the scanline renderer right now.
Blender's Cycles has a similar functionality using different Object ID's you can disable AA for an object, in this case the background.

Perhaps there's a workaround in Corona that's similar to what Cycles does?

2018-07-10, 14:02:34
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13130
  • Marcin
    • View Profile
I don't think this is possible to do in Corona, and also it may be hard to do because of the way Corona works.

But maybe doing it in 2 steps would work for you?
1. Render the beauty normally, with AA
2. Then render alpha with no AA

Update: the beauty should be probably rendered against black direct visibility override...
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-07-10, 19:40:56
Reply #6

mabulsoud

  • Active Users
  • **
  • Posts: 29
    • View Profile
Ok I'll try that. Thank you