PDA

View Full Version : AA illumination bug,..



erikals
09-17-2009, 03:18 PM
...is this a bug?
(scene file attached)

http://www.newtek.com/forums/attachment.php?attachmentid=77406&stc=1&d=1253222092

jameswillmott
09-17-2009, 04:10 PM
Most likely the 'bad' aa is simply HDR pixels shown in LDR. Try turning 'Limit Dynamic Range' on in the Render settings and see if it goes away.

erikals
09-17-2009, 04:23 PM
Ah!!! :)
that was it!

thanks james :)

evolross
03-24-2010, 01:59 AM
What does turning on "Limit Dynamic Range" actually do? (I get that it limits the range, but does it actually discard the data?) What if you do need the range information in the render (e.g. you need to save to a Full Precision format)? Will it now longer looked jaggy in that exported render?

Is the toggle, just a hack to make linear renders look right?

Matt
03-24-2010, 04:02 AM
What does turning on "Limit Dynamic Range" actually do? (I get that it limits the range, but does it actually discard the data?) What if you do need the range information in the render (e.g. you need to save to a Full Precision format)? Will it now longer looked jaggy in that exported render?

Is the toggle, just a hack to make linear renders look right?

It forces any pixels over 255,255,255 and I guess any below 0,0,0(?) from the High Dynamic Range they are in to Low Dynamic Range.

So in effect it is sort of throwing away data, well, re-interpreting it.

The reason for the jaggies is thus:

If you had a really bright pixel that was 600,600,600, AA at half-brightness around those pixels would still have values of 300,300,300, which is still over 255,255,255 or pure white in LDR space, that's why really bright HDR areas in LDR space look like no AA has occurred, it has, it's just so bright that all the pixels are above 255,255,255.

At _some_ point in the process you will need to reduce your HDR image to LDR for displaying on screen, whether you do it in LightWave or save to HDR and do it post processing (tone mapping) is up to you.

I suspect limiting dynamic range in LW will probably yield better AA as it has the scene data to play with, whereas tone mapping later only has the final pixels, could be wrong in that though.

Not sure I'd call it a hack, more a very basic tone mapping function!

serge
03-24-2010, 06:11 AM
So if you want to save the render with the HDR-data (for post processing), then you should not use the "Limit Dynamic Range" option. Somebody correct me if I'm wrong, but I believe the only way to fight this aliasing problem and keeping HDR-data, is to render to a (much) higher resolution and downscale it in post.

Question:
Do the other big render engines have the same issue, or is Lightwave behind in this regard?

Lightwolf
03-24-2010, 06:26 AM
So if you want to save the render with the HDR-data (for post processing), then you should not use the "Limit Dynamic Range" option.
Yup.


Somebody correct me if I'm wrong, but I believe the only way to fight this aliasing problem and keeping HDR-data, is to render to a (much) higher resolution and downscale it in post.
It's not only HDR renders, HDR images can show the same effect.

Do the other big render engines have the same issue, or is Lightwave behind in this regard?
Unless they tonemap they'll have the same issue. It's related to the nature of HDRs, not the nature of render engines.

Cheers,
Mike

Tobian
03-24-2010, 10:06 AM
Yeah using the 'Limit dynamic range' is a really bad idea if you want to use the render for anything other than just saving right out. Pixels brighter than 100% are really useful for glows and other effects, and indeed a very simple fix for that is to use a bloom effect, which is often what happens in real photos, for parts of the image too bright for the camera exposure. (Just don't overdo it). It's better to keep the render in HDR colour space, if you want to do stuff like tone mapping, post processing or compositing work. The only problem is you will need to get the application to interpret it as an sRGB or 2.2 gamma image, or it will seriously blow out (this is somewhere LW does fall down, colour space).

I am not sure about the other rendering engines, as they can't really do it any differently. The only thing they could do is have some sort of built-in tone-mapping functions to help mitigate it, or, again, use a bloom effect, or lens artefacts. I've only played a little with the colour space tools inside AE, but it really flattens down the brights into the visible colour ranges, so it's worth not throwing them away, as there can be hidden information in there!

serge
03-24-2010, 11:09 AM
Unless they tonemap they'll have the same issue. It's related to the nature of HDRs, not the nature of render engines.


The only thing they could do is have some sort of built-in tone-mapping functions ...
Yes, that's what I was getting at. 'Smarter' rendering which uses some form of tonemapping before anti-aliasing, but still result in a HDR image.

James Willmott and Matt both said that the aliasing issue in Erikals' example is likely due to HDR shown in LDR space, and not because the AA process couldn't handle it. I don't understand this, because saving the image to LDR didn't solve the issue.

I understand that viewing a HDRI in a LDR space can cause artifacts, but that's something different than the AA process not being able to fix high contrast areas, right?

Lightwolf
03-24-2010, 11:18 AM
Yes, that's what I was getting at. 'Smarter' rendering which uses some form of tonemapping before anti-aliasing, but still result in a HDR image.
For most decent algorithms that would require a pre-pass.
Think of it as an exposure setting in a camera. You can only define the exposure to use if you know what you're actually trying to take a picture of.


James Willmott and Matt both said that the aliasing issue in Erikals' example is likely due to HDR shown in LDR space, and not because the AA process couldn't handle it. I don't understand this, because saving the image to LDR didn't solve the issue.
Just saving HDR to LDR doesn't tone map though. It just cuts off anything higher than 1.0 in the HDR.


I understand that viewing a HDRI in a LDR space can cause artifacts, but that's something different than the AA process not being able to fix high contrast areas, right?
Basically, the AA fixes it, but in a "power range" (in terms of light power) that is beyond what LDR is displaying, as Matt has mentioned.
So the AA is there, but not visible in the LDR.

Cheers,
Mike

Tobian
03-24-2010, 11:21 AM
Well no not really, the tone map would be applied after the render, since the AA is being done just fine, it's just not displaying due to the reasons Matt explained. that's the point. There is AA being applied, and it will be working just fine, it's just outside of the visible range of the viewer in LW. If the AA was being applied as some sort of tone-mapped filter wierdness, then that would make it 'wrong', and if you were then to go on and use the image in HDR colour space, weirdness would happen.

The LW viewer can't show anything other than a 0>255 brightness image, and everything else is just clipped. No tonemapping, and no gamma correction. If you are ONLY using the image buffer for LDR compositing or display, enable the 'limit dynamic range' option, by all means, but unless you are doing some in-LW compositing/tone-mapping work using something like DP's filter or the virtual darkroom filter for example, then it's best to leave the render buffer unmolested. Don't confuse what the image viewer is showing with what is contained within the buffer in HDR space.

serge
03-24-2010, 11:29 AM
Thanks for the info guys.

I remember reading several threads over the years from people having issues with jagged edges or ugly white spots in HDR renders. The solutions offered, as I remember, where either: use the "limit dynamic range" option, or render at a higher resolution and downscale in post. Are you guys saying that tonemapping might very well be the solution to these problems? Mind you, it does make sense, I just don't recall ever seeing this tip. :)

Tobian
03-24-2010, 11:36 AM
Probably because not many people actually understand tone-mapping - it's quite fiddly, and not something you can easily do inside LW :) I don't really understand it enough to explain it, just that it's what you need to do to solve this problem!

serge
03-24-2010, 11:58 AM
Now I would really like to experiment with Dpont's tonemap node, but I haven't downloaded it :(. Denis, please open your website again! (Just a friendly reminder to everyone: DON'T distribute Dpont's plugins!)

Tobian
03-24-2010, 12:03 PM
I am so glad I have all the up to date versions and they are all stable and working (not bugged ones) I really hope he puts his plugins back online :(

If you use compositing software, experiment in that, as it's probably a lot better suited and less weird! :D

serge
03-24-2010, 12:12 PM
I am so glad I have all the up to date versions and they are all stable and working (not bugged ones) I really hope he puts his plugins back online :(
I had an old version of DP filter, deleted it, and decided to download the newest whenever I would need it. :(


If you use compositing software, experiment in that, as it's probably a lot better suited and less weird! :D
I have Photoshop CS and After Effects 6.5 pro, but both don't support HDR as far as I know. Guess I'll have to buy new versions (They were part of a video collection bundle I bought, but Adobe doesn't allow you to upgrade software from bundles :(.)

Tobian
03-24-2010, 12:21 PM
Ahh yeah they introduced it in AE 7.0 - Drat. Check if there's not some free tools out there for working with HDR... and yeah I download all the versions of his plugins, as his site has been so flakey hehehe :)

jrandom
03-24-2010, 03:35 PM
The DPont plugins are gone?? ACK! (Glad I was able to get a few of them when I did! Now I wish I had downloaded all of them.)

As far as AA on bright points, you can also use the bloom or corona image filters since overly-bright parts of an image should glow a little anyhow.

Elmar Moelzer
03-26-2010, 05:00 PM
I usually go with Tobians solution (glow/bloom, etc). It looks very realistic and it helps covering up any bad AA.
Oh, I have seen Aliasing in digitized film footage as well. Same situation... though I do wonder how it came to happen, maybe a bad scaling algo or something was used somewhere in the process.

Lightwolf
03-26-2010, 05:07 PM
I usually go with Tobians solution (glow/bloom, etc). It looks very realistic and it helps covering up any bad AA.
Oh, I have seen Aliasing in digitized film footage as well. Same situation... though I do wonder how it came to happen, maybe a bad scaling algo or something was used somewhere in the process.
I've seen that as well in 2K scans. Which is why 4K scans scaled down even during the scanning process tend to look better in critical areas.

Cheers,
Mike

Tobian
03-26-2010, 05:15 PM
Yeah I guess thinking about it, I can't see why any digital image should be immune to it, it's an issue for any pixels which fall out of the range of the sensor, just like everything, you will notice it less the higher the resolution you go.

Film shouldn't really suffer from this issue in the same way, because it doesn't have square pixels :D

Lightwolf
03-26-2010, 06:57 PM
Film shouldn't really suffer from this issue in the same way, because it doesn't have square pixels :D
No, but it does clip as well.The chemicals react differently though (as do some digital image sensors, thus the bloom due to voltage leaks to neighbouring sensors).

Cheers,
Mike

Tobian
03-26-2010, 07:08 PM
Sure, I just meant it wouldn't cause jagged edges like a digital sensor does, but it can cause clipping just the same :)

Lightwolf
03-26-2010, 07:11 PM
Sure, I just meant it wouldn't cause jagged edges like a digital sensor does, but it can cause clipping just the same :)
Oh, sure, that's how I understood it.

But, whatever you do, you can get screwed over :D

Cheers,
Mike

evolross
05-12-2010, 09:38 AM
What do you do in the case of having a shot with luminous polys used for reflections, for example, and you WANT the really bright white reflections that come from setting the polys' luminosity to a value over 100% (usually for me somewhere between 200% - 500%) but don't want the AA issues that come with it?

Should I be changing the surface materials the lights are reflected in? Or use some kind of reflectivity pass in post?

I'm dealing with several shots like this right now. Where I like the value of the luminous polys in the reflections, but the reflections will not AA properly. Turning on "Limit Dynamic Range" actually makes the reflections look less bright in the render view, which I don't like.

I've found that even saving in a floating point format (and turning "Limit Dynamic Range" off) and looking at the image properly, it still shows bad AA on luminous poly reflections. And that's with AA turned WAAAYYYY up.

Captain Obvious
05-12-2010, 11:52 AM
Limit dynamic range only clamps PRIMARY rays, mind you! Having a 1000 % luminous white object reflect onto a 10 % reflective surface would still yield 100 % white output.

Unless the effect you're after is having the actual final color output to be brighter than white, it shouldn't be a problem. However, highlight limiting can sometimes reduce the effect of small glinting highlights, which might not be desirable. One solution for that is to use DPont's node pixel filter, and set up a node flow like in my attached scene. Just do a 'load from scene' into your scene to see the effect. The 'limiter' node lets you limit the dynamic range to ANY value. By limit it to, for example, 200 %, you can get a nice balance between retained highlights and improved anti-aliasing.

Sensei
05-12-2010, 11:54 AM
How about old AA trick- render with 2,3,4 higher resolution and rescale in Photoshop. It should give you both reflections that you want, and nice AA. Don't use LW AA, so it'll render at the same speed as with AA turned on, just larger file.

Tobian
05-12-2010, 12:33 PM
Ok a couple of things here...

Linear colour space again comes into play. If you have pixels above 100% in LCS, then they will be brought down by the gamma curve, so this might help to clean up your overbright artefacts. With the gamma modification curve pixels below 1 become brighter, but pixels above 1 (100%) become darker, so it can mitigate this issue somewhat...

Further, if you apply a LUT in the likes of AE (the only compositing software I have experience in) the LUT will really clamp off and flatten out the curve, so your super-brights will suddenly not look nearly so strong.

The other thing here is bloom: Put a bloom on anything at 100% or above in your software of choice and it masks the luminosity issues. It's also realistic too, as if it's that bright it should be generating bloom. It doesn't have to be strong to solve it.

Another thing here is you need to start investigating properly Fresnel surfaces with your luminous surfaces. Properly designed Fresnel energy conserving materials + linear colour space + blurry reflections + LUT + a bit of bloom, and you really don't see that much of an issue at all.

Lightwolf
05-12-2010, 01:49 PM
Ok a couple of things here...

Linear colour space again comes into play. If you have pixels above 100% in LCS, then they will be brought down by the gamma curve, so this might help to clean up your overbright artefacts. With the gamma modification curve pixels below 1 become brighter, but pixels above 1 (100%) become darker, so it can mitigate this issue somewhat...

Not quite... what was in the 0..1 range will stay in there, and nothing else enters it. That's what tone mapping does.

Cheers,
Mike

evolross
05-17-2010, 10:57 PM
Cool, thanks for your help guys. A couple of shots I was even rendering at 4K and I still couldn't get the aliasing out, because of really high white values. I'll try some bloom, the node pixel filter, and further-more start working in LCS.

erikals
05-18-2010, 03:36 AM
you can also render out in 400% size, without AA, for then to scale down