Author Topic: Jagged Edges and AA trouble  (Read 5356 times)

2016-12-20, 08:51:15

walterfog

  • Active Users
  • **
  • Posts: 94
    • View Profile
hello... i try to fix the problem of Jagged Edges and AA in c4d - corona on OSX but the problem still very heavy.
i follow this tutorial
and other thread found in internet but nothing... the problem is solved only if we use image filter width to 2 and clamping to 2... but all the lighting of the scene it is weird... the light don't work in a normal way...

i attach an example of what i mean...  there, there is a backlight that compromise all the AA filtering... and bigger it is the resolution, bigger is the problem.
what we could do to avoid this situation in backlight situation??

2017-04-21, 19:02:33
Reply #1

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
Did you try the highlight clamping solution? It works for me. See the attached image.

2017-04-26, 18:29:14
Reply #2

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
I had some discussion with Ondra about this. Basically, the problem is inherent to any HDR renderer and all of them either show aliased high contrast lines or somehow "fake" it so that they are not so visible.

The problem is that Corona internally has float HDR values that are practically unlimited. So even after exposure transformation, most of the pixels will have a value between 0 and 1 (let's suppose a greyscale image just for the simlicity's sake), but there will be a few super-bright pixels - highlights. These typically appear in specular highlight points or if you look directly into a light object. Now, let's say that these pixels have a value of 1000 and you are doing anti-aliasing on the border between this light and pitch-black background. No matter how many samples you do, your averaged antialiasing values will be mostly higher than 1, which makes them white in the final image. So while the antialiasing is perfect in the original data, it looks jaggy in the transformed image.

The way to fix this is either get rid of the high values - this is what highlight clamping and compression does - or apply some postprocessing to the image. You can either try bloom and glare (after all, looking into such a bright object will produce such effects either in a camera or in your eyes) or the sharpening/blurring post-effect. Look at the attached image to see how it worked for me in a simple scene.

Hope this helps you :-)

2017-04-26, 18:38:23
Reply #3

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
I am not a fan of highlight clamping, it kinda takes the kick out of the boots, in other words: it makes an image more dreary, monotonous. Well, possibly what most archviz guys have to be looking for. In general, I prefer post solutions other than highlight clamping.

Could this blurring be made "contrast aware" or be adaptive to very bright areas, maybe?

2017-04-26, 19:02:46
Reply #4

walterfog

  • Active Users
  • **
  • Posts: 94
    • View Profile
I am not a fan of highlight clamping, it kinda takes the kick out of the boots, in other words: it makes an image more dreary, monotonous. Well, possibly what most archviz guys have to be looking for. In general, I prefer post solutions other than highlight clamping.

Could this blurring be made "contrast aware" or be adaptive to very bright areas, maybe?

for post solution what you mean??? please... explain better... thanks....

2017-04-26, 19:54:24
Reply #5

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
I am not a fan of highlight clamping, it kinda takes the kick out of the boots, in other words: it makes an image more dreary, monotonous. Well, possibly what most archviz guys have to be looking for. In general, I prefer post solutions other than highlight clamping.

Could this blurring be made "contrast aware" or be adaptive to very bright areas, maybe?

for post solution what you mean??? please... explain better... thanks....

I usually use bloom/glare, which is basically a post effect. Or I blur the areas in an image processing app to make my own AA there. Clamping highlights is kind of a post effect, too, but it is "dulling" the image in general - IMHO.
I have not used the blur in the "Sharpening" section a lot, maybe I should try this more often, but I am afraid to blur the image in general with this too much, therefore my question if it would be possible to blur high contrast areas only, kind of a "blur bloom/glare".