Author Topic: Workflow tips for compositing- maybe Multi Pass?  (Read 462 times)

2022-11-25, 04:56:24

caspian

  • Active Users
  • **
  • Posts: 111
    • View Profile
I feel I'm doing more work than I need to for this project and hope someone can shed light on a more efficient way.
I've created a number of static scenes that will and up being A1 prints. As the backgrounds are all this companies brand colour, and to save render time I decided I don't need to render the entire poster, just the region with the objects. So the challenge is to separate the object from the background, but include the shadow. I have a shadow catcher on a floor plane, but when I render it (without the floor) my floor shadows are black, not the red/orange that they are visually. So instead I've been rendering the file three times to mask in photoshop properly
- once of the entire scene including background,
- once with the  background with a composting tag set to not be seen by camera but with a plane on the floor with a shadow catcher material
- and once with just the object alpha.

When I composite the file I use the layer with the floor shadows set to multiply to create nice red shadows on the solid background.

I feel there is a smarter way of doing this rather than render three times! Looking at mulitpass it wasn't obvious how I could solve it. Any advice gratefully received!
« Last Edit: 2022-11-25, 05:09:41 by caspian »
C4D 2023 / Corona 9 / Mac 12.6

2022-11-25, 11:51:17
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 11882
  • Marcin
    • View Profile
Render the whole scene once:
- beauty will be the object standing on top of the shadowcatcher, the shadowcatcher should be set to "for compositing" and have orange color
- alpha will contain the object+shadow information from the shadowcatcher
- additionally use a masking element to get the object mask

Maybe I am missing something, but it should work.
Marcin Miodek | chaos-corona.com
Chaos Corona Support Team Lead | contact us

2022-11-25, 19:50:03
Reply #2

caspian

  • Active Users
  • **
  • Posts: 111
    • View Profile
Your answer is how I expected to do it, but I must be doing something else wrong because it just doesn't work like that for me.
The shadow catcher is set to 'For compositing' but it creates artefacts where it intersects the floor in the Beauty pass. And when I use a mask it isn't a string mask but a multi coloured thing.

Dropbox link to project (32MB)
https://www.dropbox.com/sh/qfbh33f4s279i64/AACWURM0udyQN4_zCVsLGJ-Oa?dl=0

UPDATE: Just realised I set an Object ID and not a Mask in the MultiPass setting. So have the Glass mask sorted. But the contact shadows still escapes me.
« Last Edit: 2022-11-25, 19:55:17 by caspian »
C4D 2023 / Corona 9 / Mac 12.6

2022-11-25, 22:41:28
Reply #3

caspian

  • Active Users
  • **
  • Posts: 111
    • View Profile
I just realised I add the shadow catcher as a second material on top of the background material. Not sure where I was when I was supposed to be learning that!
C4D 2023 / Corona 9 / Mac 12.6

2022-11-25, 22:52:05
Reply #4

davetwo

  • Active Users
  • **
  • Posts: 216
    • View Profile
Shadowcatcher is generally used for images using backplates AFAIK. In your case I'd expect you to use a solid colour in the Direct Visibility override slot and to add the same colour into the Environment slot of the shadowcatcher material.

If you have a real floor/cove in the scene etc then I'm not sure it will work properly or of that is the purpose of the shadowchatcher.

I'm happy to be informed otherwise tho'

2022-11-25, 23:40:58
Reply #5

caspian

  • Active Users
  • **
  • Posts: 111
    • View Profile
Adding the Floor material to the Shadow Catcher's Environment is something I missed. But I'm still not getting quite the right result. It's getting closer, but the single output file doesn't have the scene alpha.
C4D 2023 / Corona 9 / Mac 12.6

2022-11-26, 21:02:18
Reply #6

BigAl3D

  • Active Users
  • **
  • Posts: 721
    • View Profile
I use a Shadow Catcher material on a plane all the time with masks and alphas. If you set it up correctly, you can get all the layers separately, or you can even save an After Effects project file with everything already stacked.

I've attached a scene you can pick apart. You need to set your Shadow Catcher to Environment and Compositing. You must also drag a material into the slot provided, because if you had a white box sitting on that orange background, you would get some color spill. By making a material that matches you final background color for the poster ensures you will have the correct color that may be reflected on the surface of your box.

I've also enabled the Multi-Pass function. In the render settings, I also set it to save a Multi-pass image. This scene will give you 2 PSD files. You will have to do a little work, but not much. Just load the alpha channel as a selection and use the Float command to make a new layer based on your selection. You now have a perfect object(s) layer with a built-in shadow. The second PSD will have a clean mask just for the box in case you need to adjust the shadow.

As another option, if you select PNG as the output format, you will get all these layers as separate files. The only advantage to using the PSD format is that you could go up as high as 32-bit if you have very complex and subtle shadows and transparent areas.

Hope I didn't confuse you. Ha. That was a little rambling on my part.

https://www.dropbox.com/s/mqb39mpi1na9a2g/CompositingSetup.zip?dl=0

« Last Edit: 2022-11-27, 04:51:57 by BigAl3D »

2022-11-27, 04:22:34
Reply #7

caspian

  • Active Users
  • **
  • Posts: 111
    • View Profile
Thanks for your help and explanation, but I think you have shared the wrong file with me. That JB scene doesn't have any multi passes set up
C4D 2023 / Corona 9 / Mac 12.6

2022-11-27, 04:52:28
Reply #8

BigAl3D

  • Active Users
  • **
  • Posts: 721
    • View Profile
My apologies. I have updated the link.

2022-11-28, 16:05:40
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 11882
  • Marcin
    • View Profile
It looks like there is some overlapping geometry here, it's even visible in the viewport.

The shadowcatcher should be a single object. It should not overlap with any additional background object. The color of the shadowcatcher should be the same as the color of the usual background that you would use instead of the shadowcatcher (some orange hue in your case).
Marcin Miodek | chaos-corona.com
Chaos Corona Support Team Lead | contact us

2022-11-29, 09:26:48
Reply #10

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 2883
  • Bengamin
    • View Profile
    • Cormats