Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: mike_kennedy on 2017-07-06, 15:50:31

Title: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-06, 15:50:31
Hi Everyone, We are baking an interior and the bake maps lack contrast compared to the Vray ones we were doing before.
The Corona renders are looking a little flat in the Web GL engine we use.

The App for reference:


https://playcanv.as/b/Yv6PuECE/



Would anyone have some good recommended settings for baking pure light maps that have good contrast and aren't too over blown ion the lighter parts of the render?

I attached my settings, please let me know if I am off some where, new to baking in Corona :)





Title: Re: Bake maps lacking contrast
Post by: maru on 2017-07-13, 16:59:00
Sorry for the lack of response, but could you tell us more about what you are doing?
How exactly are you baking the maps, and what kind of maps?
What results are you getting, and what results you would like to get?

Title: Re: Bake maps lacking contrast
Post by: sprayer on 2017-07-15, 08:07:42
because you are using wrong gamma as you attached in another topic, all errors write to you how to solve them, just read it
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 15:18:35
I'd would love to use Gamma 2.2, but render to texture doesn't seem to respect it.

Is there a way to fix that, here are the proper Corona settings, the wrong image was attached before. We have the workflow for compenstating for the Gamma switch in Vray, exposure control *.45 and it seems to works well, little to much contrast.

With baking in Corona the contrast seems reduced compared to the renders, migth be user error though :)



Also, even with padding of 32 pixels, there are a lot of seams in Corona bakes compared to Vray:


http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=3975I_Mulbury_WebGL_Cor_BM_LM_073-WEBGL%20&username=mikek&date=7-20-2017&version=V1


(Bakemaps and lightmaps both have the issue)


The bleed seems to go to black a few pixels early, where as in Vray it takes the last light pixels and bleeds them out 32 pixels.

Attached is a light map with the UV's super imposed

We are completely new to baking in Corona so there might be stuff we are missing.





Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-21, 15:57:08
AFAIK RTT respects gamma settings just fine. Use override settings instead of automatic, if you want to be sure.

As for the bleeding seams. I think it's not paddings fault, but the way you've constructed your geometry. If you made your walls and floors overlapping each other, then obviously there will be completely black regions in your lightmaps, and when mipmapping those areas will bleed. I've attached overpainted one of your screens, where i marked problematic area in red colour. Hope it helps.
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 16:03:23
Hi There,
It's a problem for sure in terms of baking, but I can't remodel every interior we do and sort of have to live with that modeling setup unfortunately.

I don't have the same issue with Vray, and that's the bake map, a straight Png, not mip mapped yet, seems to be an error in terms of the bake, that's using Corona 1.5

Mike
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 16:05:14
because you are using wrong gamma as you attached in another topic, all errors write to you how to solve them, just read it

Sprayer, could you link me back to that post?
I can't find it in my forum profile.
Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-21, 16:27:51
Can you show problem free lightmap from Vray for comparison?
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 16:52:20
Here is the Vray lightmap and Corona lightmaps to compare. You can see the Corona Lightmaps are off compared to the Vray in terms of padding.
I attached 2 images.
I can upload the files so you can take a look at the before and after.





Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 17:31:29
The lightmap bakes to compare as a whole;

Vray:

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=Vray_PlayCanvas_Simple_Room_Exponetial_Bake_065-WEBGL%20&username=mikek&date=7-17-2017&version=V1


Corona:

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=Corona_PlayCanvas_Simple_Room_CR_079-WEBGL%20&username=mikek&date=7-17-2017&version=V1


You can see the seams around the trim and window frames the most, the walls and ceiling are one complete models and have welded verts in the Unwrap.



Another example of Corona only, I haven't gotten to go ahead to relight this with Vray.

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=3975I_Mulbury_WebGL_Cor_BM_LM_073-WEBGL%20&username=mikek&date=7-20-2017&version=V1

Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-21, 19:12:35
Here is the Vray lightmap and Corona lightmaps to compare. You can see the Corona Lightmaps are off compared to the Vray in terms of padding.
I attached 2 images.
I can upload the files so you can take a look at the before and after.

As far as i can see, both Corona and Vray gives perfectly good padding. Your problem is not in padding, as i said earlier it's in those black regions that lies inside UV shells in Corona baked map. You can see that in Vray map there are darker regions too, but they aren't completely black and bleeding isn't noticeable. I suspect that this happens because Corona gives very precise GI and if there's overlapping meshes in your model, light simply cannot reach it. If Vray bakes the same model with much lighter overlapping regions, it's probably because your render settings in it are tuned for speed and not for precision and it gives more lousy GI with light bleeding where it shouldn't. I'd say it's not Corona does a bad job, it's Vrays bad GI coincidentally cancels out bad modelling and gives you inacurate, but "seamless" result :]
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 19:19:21
That's the intent to a degree :) We can't remodel everything, would there be a setting to get this to happen with Corona?
Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-21, 19:29:47
I don't think so. If you want lousy GI, there's little sense to abandon Vray :]

What you could try, is to colour select completely black areas in photoshop and fill it with surrounding colours. That could help to eliminate seams bleeding.
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-21, 20:08:17
I tried a few things to do that, it's a ton of work either way, remodel everything or rework all the seams in Photoshop.
The seamless meshes it does work with, here is a simple room thats seamless in terms of the mesh being tight walls to ceiling

https://playcanv.as/b/Up5C9xPy/


Vray, bit less seams in most areas. But the cheat is a tiny bit obvious.


https://playcanv.as/b/5koJkl6r/



Title: Re: Bake maps lacking contrast
Post by: maru on 2017-07-24, 09:48:12
I can see wrong gamma setup here, and Corona is even warning you about it: https://forum.corona-renderer.com/index.php?action=dlattach;topic=16749.0;attach=67758;image

Here is the solution: https://coronarenderer.freshdesk.com/support/solutions/articles/5000515647
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-25, 14:44:53
This is the thing though, you can't basically bake lightmaps with 2.2 gamma, they go super dark.

I did the test, you can compare the results here:

Using 2.2 Gamma

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=3975I_Mulbury_WebGL_Cor_BM_LM_2point2_gamma_092-WEBGL%20&username=mikek&date=7-21-2017&version=V1


This is 2.2 Gamma, the bake maps look fine, the lightmap results are a lot darker, you can switch using the UI in the Web GL App to compare.


Using 1 Gamma

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=3975I_Mulbury_WebGL_Cor_BM_LM_1_gamma_098-WEBGL%20&username=mikek&date=7-21-2017&version=V1


This is the same file rendered using 1 gamma that is not supposed to work. Obviously i'd like to stay with 2.2 because I don't have to rework the lighting, but the light maps
look like their supposed to when using 1 Gamma

Now this is not an issue with Corona, with Vray you have to set the Gamma to 1 (Off typically) to get the lightmaps to not be dark.
Mike

Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-25, 15:11:55
You should configure your gamma properly, like maru suggested and override gamma to 1 in RTT save dialog.
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-25, 15:21:16
The bake maps are looking good, so we have to set up that only for lightmaps?
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-25, 15:33:58
Re Lightmap accuracy,

I don't think Corona is accurate, yes it's is tighter, but the lighting is off by at least a pixel in terms of over laps.

That affects the padding in the mips for sure,
look at these images.




Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-25, 15:36:40
For the Gama, I can do internal tests, but our script guy can't touch this for a while, it's a big change in terms of if / then sort of stuff I guess in the workflow.
, the seams issue is the bigger problem buy far, we can't remodel everything, we have hundreds of interiors that would need that done.
Title: Re: Bake maps lacking contrast
Post by: romullus on 2017-07-25, 16:28:02
Re Lightmap accuracy,

I don't think Corona is accurate, yes it's is tighter, but the lighting is off by at least a pixel in terms of over laps.

That picture says nothing if we can't see how geometry is created.

, the seams issue is the bigger problem buy far, we can't remodel everything, we have hundreds of interiors that would need that done.

Well, too bad. Apparently you can't expect to cut corners in real time apps as easily as you can do that in off-line renderers. Maybe there is some solution appart from remodelling everything, but i'm not aware of it.
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-25, 16:34:07
The walls and ceilings are separate objects like all of our interiors and most peoples I would imagine.
I can upload a Max file for Devs if they would like to take a look.

This link allows you too click on objects and turn them on and off if that would help.

http://vdcdemo.aareas.com/vdc3d/modelpreview.html?modelname=3975I_Mulbury_WebGL_Cor_BM_LM_2point2_gamma_092-WEBGL%20&username=mikek&date=7-21-2017&version=V1




Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-26, 16:19:39
I welcome any suggestions if some one has an answer not seen here, will stop beating the dead horse for now though:)
FYI,
This is being looked by support, will update here again if there is a solution not mentioned here.

Thanks to all that posted, super appreciate the help, we have a tight deadline to figure out something very new in terms of workflow to us.
Mike
Title: Re: Bake maps lacking contrast
Post by: Ondra on 2017-07-26, 17:29:57
sorry, we are moving our offices this week, I have almost no time for development :/
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-07-26, 17:41:36
I took that into account for the project, any help after would be fantastic though :)
Mike
Title: Re: Bake maps lacking contrast
Post by: Ondra on 2017-08-18, 14:45:50
I looked into it, and the dark seams are caused by overlapping geometry, that is rendered black (see attached) - part of the geometric object is inside another object, so RTT correctly renders it as black. These black pixels then get blended into the result because of the finite resolution of baked texture. I really dont know what we could do about this or why vray puts light even where it should be black - I cannot imagine how to do this without losing contact shadows
Title: Re: Bake maps lacking contrast
Post by: mike_kennedy on 2017-08-18, 15:45:11
Thanks :) We ended up remodeling someone else's model to be seamless. That worked and will have to be costed in
Unfortunately that can't be done in all cases so we'll use Vray for those cases or live with seams.



Does anyone know a way in Photoshop to cheat this? maybe render a mask that can make the black pixels be shifted slightly?