Author Topic: Using Shdow catcher mtl in complex interior scene  (Read 1369 times)

2017-01-11, 22:18:58

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hello, everyone,

I'm working on interior scenes, where the furniture and other objects are separated from walls, floor and ceiling. When working on a single render I used "Viewport selection" to render the separate objects, but to create realistic transperent shadows, I copied the scene, applied the ShadowCatcher Mtl onto the ceiling, floor and walls and rendered only the shadows through alpha channel. I got solid black shadows as a result, after that I combined the objects and shadows, using Photoshop to make the shadows transperent. That works for a single render, but now I have to make the objects (including their shadows) separated from the walls, floor and ceiling in a video. That means, that I won't be able to use Photoshop in every render frame. I'm working on this project with a team of guys and we already tried everything we came up to get transperent realistic shadows in the interior, not having a backplate, as our environment is actually a room.

The purpose is to get the same result for composing, as in this video tutorial, but not having a backplate and having the objects placed in the room.

We tried to use the textures of the floor/walls/ceiling as the backplate, but instead of becoming transperent, the shadow begun to shine, also, if we put the object into the room, fully covered with shadowcatcher, the material affected the look of the object - the shadow in Alpha channel was rendered, as it should, but the object became dark, as it was set into the grey or black room.

Of course, it would be amazing to find a way to render the objects and their realistic transperent shadows in the same file, but if only rendering the tarnsperent shadows is real - we'll be more than happy.

Looking forward for your advice and help
Kindest regards
Halina


2017-01-11, 23:28:00
Reply #1

mferster

  • Active Users
  • **
  • Posts: 175
    • View Profile
Really confused about what you are trying to achieve but... if are working with video as your final output why not just composite the shadow layers in Adobe After Effects. It's like photoshop, but for video.

edit* Are you trying to render just the objects' shadow without the object itself being visible? If that's the case right click the object > object properties > then toggle off visible to camera when you are rendering your shadows.
« Last Edit: 2017-01-11, 23:46:55 by mferster »

2017-01-12, 00:42:47
Reply #2

cecofuli

  • Active Users
  • **
  • Posts: 1297
    • View Profile
Is this?

2017-01-12, 10:57:03
Reply #3

Misha

  • Active Users
  • **
  • Posts: 37
    • View Profile
Great! we need like you do, but  separate objects with transparent shadows? not object and shadow in different files, object with transparent shadows in same file from framebuffer,
We need to render animation and it's mean if we have 100 objects and 100 shadows  we will spend a lot of time for compositing, that is why we need to render object and shadow in same file.
We try to test like in tutorials but shadows black, we need shadows grey like you do.
« Last Edit: 2017-01-12, 11:01:04 by Misha »

2017-01-12, 11:29:48
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6101
  • Marcin
    • View Profile
Hi guys,

I would like to help you, but first I need to understand the issue. Please answer on the questions below:

1. Misha and Kucheriavyi - are you experiencing the same problem?

2. What is the main goal here? Do you want to render an animation of the background only (room interior), and then be able to render another animation of different furniture sets + their shadows only, and then combine the two animations together so that the furniture set is on top of the room with its shadows, and reflections?

2017-01-12, 11:35:03
Reply #5

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hello, guys,

1. Misha is helping  Kucheriavyi to solve the problem.

2. Yes, that's the main goal.

what we're trying to achieve is to get a realistic object and it's shadow in the same render, but for now I can't get it. The files, that I attached are the previous method, when the shadows and the objects where rendered separately and I combined them in Photoshop. The thing is, that the shadows are black and solid and aren't transperent, which is not realistic. To make them them realistic, I need to edit every single shadow in Photoshop, or After Effects, or whatever, but if I need to make 30 rooms, 5 such layered objects with shadows in each room - I need to work on 150 objects, and if I have to create 3 videos per room, 60 frames each, that means, that I need to edit 27 000 frames (or shadows of the objects). That's why I'm trying to find the way to get realistic transperent shadows instead of solid black, that I get for now. And I'm trying to find the way to render the shadows together with the objects.

The method, that is used in the video tutorial works well with the environment backplate, but I don't have such beckplate, my environment is a room. Also, that method works well in a simple environment, like 3 boxes and a teapot, but when I try to apply it in a room, I get unrealistic objects and unrealistic shadows.
The attachtments in the first post are the examples of how I worked previously, I wasn't able to add more in the same post. I'll attach the results that I got in a few next posts.

We're using Corona 1.5.2
« Last Edit: 2017-01-12, 11:40:08 by kucheriavyi »

2017-01-12, 11:49:49
Reply #6

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
I tried to use different object properties of the walls/floor/ceiling and the surfases with the shadowcatcher.
Attachtments:

1. Object properties of the floor/walls/ceiling
2. Object properties of shadowcatcher surfaces, that cover floor, walls, ceiling
3. Shadowcatcher mtl
4. The result I got in PNG
5. The result put onto the empty room render

Concerns:
Unchecking "cast shadows" in walls/floor/ceiling affects the object rendered - it is lit only by environment and looks unrealistic. Also, for some reason the shadows of the shelves on the wall are yellow instead of being dark, solid, not transperent shadows under the bed.

2017-01-12, 11:50:55
Reply #7

Misha

  • Active Users
  • **
  • Posts: 37
    • View Profile
Brief description
we have several rooms, each room has furniture
we need to render accessories so that you can rearrange accessories from one room to another
and also we need to do animation (flying camera) and  change accessories from room to other

but the problem is that the shadow rendering incorrect and  render method is not suitable accessories and shadows separately, we need to make every object  with a transparent shadows and we could easily do compositing

2017-01-12, 11:59:01
Reply #8

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
Second option - "Cast shadows" checked in floor/walls/ceiling object properties, as they should affect the shading of the object.
Attachtments:

1. Object properties of the floor/walls/ceiling
2. Object properties of shadowcatcher surfaces, that cover floor, walls, ceiling
3. Shadowcatcher mtl
4. The result I got in PNG
5. The result put onto the empty room render

Concerns:
Checking "cast shadows" in walls/floor/ceiling object properties affects the object rendered - it becomes realistic, but it also affects the shadowcatcher surfaces, that become not transperent.

2017-01-12, 16:41:54
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6101
  • Marcin
    • View Profile
Sorry for the delay. I was trying to get it working, but no success so far. It is possible that while it makes perfect sense to use the shadowcatcher with backplates (like in the tutorial OP posted), it may be impossible to get it working with more complex scenes, like in this case. I am attaching the results of my tests, and will try to look into it further.
(left: empty room + added objects; right: original rendering with the objects in the room)

What I did was:
1. Render the room with objects inside it (for reference)
2. Render the room with no objects inside (to be used as the background)
3. Apply shadowcatcher material to the room, then load the background as its backplate, with the help of CoronaOutput map to prevent doubling the exposure
4. Switch to "for compositing" mode, set directly visible enviro to black
5. Render objects in the shadowcatcher room and save this in .tif format along with the alpha channel

Generally it works, but there are some problems such as:
1. Shadowcatcher does not reflect other shadowcatchers in it, so for example the blue wall is not reflected in the floor
2. The bright light from the window is visible, so there is no way the teapot can occlude it
3. There is no way to reproduce the GI generated by the invisible part of the room, so this has to be guessed (I used some dark grey color). It would not work in case of some glowing elements, or colored walls. (unless a spherical enviro is rendered ;) )

2017-01-12, 16:54:25
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6101
  • Marcin
    • View Profile
Update: instead of using full rendering as the backplate, I used CShading_Components with diffuse only checked:

2017-01-12, 17:05:54
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6101
  • Marcin
    • View Profile
RaySwitch could help here, but currently I cannot use it since I am using multi/sub map. Will try with it as the next step...

2017-01-12, 21:03:36
Reply #12

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
Another option that I tried:

Rendered the panoramic view of the room, made HRDI of it, deleted walls, ceiling and floor, left only the bed and the planes with Shadowcatcher. I made everything same, as in the Video tutorial, attached in the first post, but I couldn't get the same result, as in the tutorial. The object isn't shaded properly - you can compare it with the bed, rendered in the room (attachtment #4)


Attachtments:
1. Panoramic view, that is used for HDRI
2. HRDI map
3. Bed with the shadows in .exr format (The shadows under the bed look ok, but the object looks not realistic enough
4. Realistic bed render, that was rendered inside the room - for comparing with the bed in .exr format.
5. The Sadow catcher mtl, Environment, HDRI
6. The result that I got, combining the exr file, the walls and the realistic object on top of the exr file
« Last Edit: 2017-01-13, 10:58:39 by kucheriavyi »

2017-01-13, 11:14:14
Reply #13

kucheriavyi

  • Active Users
  • **
  • Posts: 8
    • View Profile
Found some more bugs, when rendering with the HDRI on Environment and backplate.

I added one more object on the right. The area, where the reflective legs of the chair contact with the shadowcatcher mtl, there are some odd bright reflections instead of shadows.

Attachtments:

1. Panoramic view with the bed and the objects on the right (combined 3 pictures - panoramic render of the room with the bed, exr layer with shadows, but again the objects don't look realistic, realistic objects on top of exr layer)
2. exr file on top of panoramic render (you can see, that the objects don't look right)
3. realistic objects on top of exr file (rendered in the room, in the right environment and lighting)
4. Reflections, that look odd
5. Render of the room with realistic shadows, made in a room with walls, floor, ceiling, with Corona sky environment and Corona sun (How the shadows should look)

Rendering the shadows this way solves only a part of our problem.
As the object, rendered in HDRI environment and with HDRI backplate in Shadowcather MTL doesn't look realistic enough, we can't use it, we can only use the shadows, but need to render the objects in the room (the realistic environment) and combine them. That can work, but the bright reflections around the reflective objects, like on the samples attached still don't look fine.

Also, this way doesn't work for video production unfortunately. I'll post the examples in the next post.
« Last Edit: 2017-01-13, 11:21:34 by kucheriavyi »

2017-01-13, 17:09:02
Reply #14

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 6101
  • Marcin
    • View Profile
I tried to solve this again today, but with no success yet. I will do my best to create something next week, and also get familiar with the new issues you reported.
Does anyone know workflow to do this in some other renderer?