Author Topic: Corona Shadow Matte rough solution  (Read 12987 times)

2013-06-21, 12:15:35

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
Hi everyone. I'm new with Corona and completely in love with it. I got some solution for Shadow Matte problem. It's good just for static scenes, while shadow plate is light and color sensitive.
I share my scene max 2011 Corona alpha5 to show how i came up to it.
Environment HDRI is from http://www.hdri-hub.com/hdrishop/freesamples/freehdri/item/85-hdr-container-fee
Place container_free_Ref.hdr file to C:\Corona Shadow Matte Test\Textures
It would be much easier solution, if Corona could support  Falloff map type Shadow/Light.
« Last Edit: 2013-06-21, 14:36:47 by Richardas »

2013-06-21, 14:25:51
Reply #1

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
Here another try. This time scene has no lights. Shadows come from sun captured in hdri image.

2013-06-21, 22:39:51
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9978
  • Marcin
    • View Profile
Crazy but works more or less well. I was trying to use Corona AO to fake shadow/matte but never achieved such results. :)

2013-06-22, 04:07:31
Reply #3

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
 I also first of all tried with Corona AO map drive shadows, but  Falloff map type Shadow/Light not supported, so this is good just for subtle shadow addition.
« Last Edit: 2013-06-22, 05:08:13 by Richardas »

2013-06-22, 05:06:19
Reply #4

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
And another try :) This time i tried get setup simple as possible. To achieve effect used environment hdri, two color correction nodes and one material.
Shadow plate material refraction value controls shadow intensity.
« Last Edit: 2013-06-22, 05:58:30 by Richardas »

2013-06-24, 18:04:32
Reply #5

APrather

  • Active Users
  • **
  • Posts: 18
    • View Profile
Richardas

Awesome... Thanks for sharing with us.

2013-06-25, 07:04:48
Reply #6

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
You're welcome. I'm glad if it helps for somebody :)

2013-06-25, 21:12:31
Reply #7

ous_gt

  • Active Users
  • **
  • Posts: 47
    • View Profile
It works great man. If you increase the sun size, you can get smooth shadows. And if you adjust sun intensty correctly, you don't need to use color correction. Thanks, this helped a lot to me.

2013-06-25, 21:48:24
Reply #8

Richy

  • Active Users
  • **
  • Posts: 43
    • View Profile
:) Ok! i'll try your suggestion.

2013-07-22, 19:18:37
Reply #9

Alan

  • Active Users
  • **
  • Posts: 26
    • View Profile
Thx Richy!!

One question, can I render the plane shadows projected in a separate pass? I want to render just the objects to plate in another scene for example.

2013-10-09, 18:13:26
Reply #10

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • Cover Image Snc
Try to set "shadow catcher" on in plane material, so your plane alpha channel describe the shadow. You can use alpha channel as mask to override objects and shadowed part of the plan to the background only rendered in post.
My Ducati or a render with Corona.....mmm, hard question!
http://www.coverimage.it

2014-01-28, 10:33:07
Reply #11

davidlecardinal

  • Active Users
  • **
  • Posts: 10
    • View Profile
shadow catcher is always disable,... why?

2014-03-27, 15:20:16
Reply #12

Three D

  • Active Users
  • **
  • Posts: 5
    • View Profile
thanks for the scene richy and for getting the matte debate started.  i've always struggled to get this to work properly with vray so i hoped corona might make it easier.  i was a bit disappointed when i realised there wasn't a proper corona matte shader/workflow to get it working so i was delighted to see richy's posts on this issue.  anyway i took richy's scene and tried to get it to work so that there would be no need for an additional corona sun, hoping that the hdri would do all the work  -  lighting, environment and correct looking (soft) shadows.  the benefit of this being that hdri images can be dropped in and out of a scene without having to go back and match up the sun every time you use a different hdri image.  i used a trick which i learned from Bertrand Benoit and Peter Guthrie where you adjust the gamma of the hdri image to something less than 1.0 to get sharper, darker, better shadows from the hdri. to do this you have to use the VrayHDRI shader and not the standard Bitmap as richy has used.  you then adjust the gamma to get better shadows  -  Peter Guthrie suggested 0.75 but of course that varies depending on the hdri.  in this instance i used 0.50 to try and match the shadows with the shadows cast by the containers in the hdri image.  as a result of adjusting the gamma to something so low you then have to use the same hdri image with more normal gamma settings (1.00) for the background image  -  so for this scene i used one version for the lighting with a gamma of 0.50 and one version for the background with a gamma of 1.00.  i then set up a standard CoronaMtl with a CoronaAO map in the diffuse slot and put the background hdri image in the unoccluded slot and applied this to the groud matte material. the Object Properties of this plane were left unchanged.

the first image was rendered using the same exposure and colour mapping settings that richy used but the subsequent images were rendered with my own settings (6500K for example to match more accurately the lighting in the hdri image used).  i think the results are not too bad, particularly the quality of the shadows in the mirrored ball reflection which look more like whats actually happening on the ground, however the scene needs more work to better hide the ground plane which can be see very slightly in all of the images, especially the last image.

not sure what happened to the render stamp.  any ideas?

very impressed with corona so far.

2014-03-27, 15:49:09
Reply #13

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • Cover Image Snc

not sure what happened to the render stamp.  any ideas?


use "R" button on the right of render stamp to reset it.
Try to correct (or delete) file .conf in
"C:\Users\<username>\AppData\Local\Autodesk\3dsMaxDesign\2014 - 64bit\ENU\en-US\plugcfg\corona"
the right text is:
string renderStamp      = "Corona renderer | %c | Time: %pt | Passes: %pp | Primitives: %si | Rays/s: %pr"

btw, thx for sharing your test ;)
My Ducati or a render with Corona.....mmm, hard question!
http://www.coverimage.it

2014-03-27, 16:19:15
Reply #14

Three D

  • Active Users
  • **
  • Posts: 5
    • View Profile
thanks Alessandro