Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => Topic started by: pokoy on 2016-12-06, 13:28:36

Title: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-06, 13:28:36
Let's say you happen to render against a backplate (or example a photograph) and nest the backplate in a CoronaOutput map with 'Affect by tone mapping' set to off to compensate for postproduction settings AND use a LUT. Now if you stop the render and rerender, funny things happen to the backplate because it tries to compensate LUT as well. I think this is absolutely wrong. LUT should always be considered a final grading and should not be considered by CoronaOutput map at all. The current behaviour forces me to switch LUT off when starting a render and enable it only after the rendering has started.

Let me know if you need image examples, it'll make very clear why I think it's wrong.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: maru on 2016-12-06, 13:50:19
There might be some problem here indeed, but just would like to make sure about some things first:

1. Are you referring to the LUTs applied in Corona post processing tab, or the ones which you can apply directly to the CoronaOutput map?
2. Have you seen the "Warning" at the bottom of the CoronaOutput ui?
3. (pretty much mentioned in point 1) You can apply LUT directly to your CoronaOutput map in its settings

If my notes are completely irrelevant to your problem, please post images with explanations.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-06, 13:58:14
There might be some problem here indeed, but just would like to make sure about some things first:

1. Are you referring to the LUTs applied in Corona post processing tab, or the ones which you can apply directly to the CoronaOutput map?
2. Have you seen the "Warning" at the bottom of the CoronaOutput ui?
3. (pretty much mentioned in point 1) You can apply LUT directly to your CoronaOutput map in its settings

If my notes are completely irrelevant to your problem, please post images with explanations.
I mean the LUTs you apply in the VFB, on the final image.

I don't even know why there's a LUT option in CoronaOutput map, I'm using LUTs for final grading so applying the LUT solely to the background wouldn't make any sense anyways.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-06, 15:29:40
So here's what happens, I guess it's way easier to understand with images.
General setup: backplate is nested in a CoronaOutput map, 'Affected by Corona VFB tone mapping' is disabled, used in the Direct Visibility Override slot in the renderer's Scene tab. Pretty much the standard workflow for rendering against backplates.

Image 1 - Original render
Image 2 - LUT applied
Image 3 - Render is stopped and re-rendered (everything is left as it is, nothing has been changed)

This behavior is wrong imo. I should be able to obtain the same result as in image 2, instead the colors get messed up.

In other words, LUT applied in the VFB should never be take into account by the CoronaOutput map so we actually can use it as a final grading step. Whatever the LUT field in the CoronaOutput map does has nothing to do with what happens here.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-15, 16:07:41
Any word on this, Maru?
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: maru on 2016-12-15, 17:01:52
I thought that there was already another thread about this, or a discussion in some other place. Looks like I was wrong, sorry. I'll look into this and return to you a bit later, sorry, there is just so much work to be done!
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-15, 17:20:03
I thought that there was already another thread about this, or a discussion in some other place. Looks like I was wrong, sorry. I'll look into this and return to you a bit later, sorry, there is just so much work to be done!
No worries! I only wondered if I'm the only one thinking this needs to be corrected. I hope it will because working with LUTs is problematic using backplates with the described workflow.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: Ludvik Koutny on 2016-12-17, 21:33:31
Claim that LUT should always be considered as final grading is false.

Actually, LUTs are originally meant only as a means of viewing images in correct color space from image capture devices, such as photo and video cameras. They were never originally intended as postprocessing "looks".

In Corona, LUTs are often used as postprocessing looks, but there may be for example an use case, where you have an image, which was captured with a camera that applies certain correction to it right when it's captured. Then you have that certain correction process reproduced in LUT, and you want to apply it only to your CG objects, leaving backplate alone, so that using a LUT, you will make tones of your CG object match the tones of your backplate.

Making CoronaOutputMap ignore LUT would be equally, if not more wrong then current behavior.

Solution in this case is very simple: CoronaOutput needs to have options on which parameters it should counter. I see it as 3 checkboxes, all of them enabled by default:

Exposure is self explanatory, Tone Mapping includes everything else aside from LUT, and LUT includes, well... LUT :)

The problem here is that somewhere in the process, there was made an unwise decision that CoronaOutput would be also color correction map, so adding these controls would make purpose of the map very confusing for both beginners and users of other renderers. Solution here is to make CoronaOutput strictly a map, that counters VFB color correction, and separate other controls, such as brightness, contrast, saturation and LUT applier into separate map - "CoronaColorCorrect" map.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2016-12-22, 10:01:58
I agree. But since I don't think we'll see an additional color correction map anytime soon (I may be wrong, though), we need the current behavior to be corrected.
Regardless of why the CoronaOutput map is hard to understand for beginners we need it to handle LUTs correctly either way, the example above demonstrates this well, it should *never* produce false colors.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: pokoy on 2017-03-12, 18:36:33
Is this fixed or planned for 1.6? I can't test dailies unfortunately due to heavy workload but would like to see this resolved.
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: Ondra on 2017-04-04, 18:39:40
so, would splitting the output map to "output" and "remove tone mapping" solve the issue?
Title: Re: LUTs and CoronaOutput map - please correct how LUTs are applied
Post by: Juraj on 2017-04-04, 18:54:56
so, would splitting the output map to "output" and "remove tone mapping" solve the issue?

I can second Rawa's suggestion two posts above.

Once split, the additional checkboxes to counter will not appear confusing.

The output than can server as true color-correction node only.