Forums » CentiLeo for Cinema 4D
Pages: 1
Shadow catch pass (multi-pass) does not work under any settings
shadow catch never shows up, and I have tried many combinations of settings
 
I cannot get shadows to render at all. I tried shadow multi-pass and it just renders a black screen.
I enabled 'Alpha channel' and added the multi-pass for shadow.
I have tried just about every combination of render settings to try and get shadows to render, but all I get is a solid black image.
What do I need to change to get shadow pass to render, or is this broken?

Also, I see that there are two types of centileo materials: centileo material and material [node]
What is the difference? One only has material editor while the other has node editor. And the centileo material has 'matte' while the material [node] has shadow catcher.
I tried both material types and neither give me shadows in the render.
Edited: ssjenforcer - Nov 17, 2021 19:00
 
Administrator  Posts: 593
Nov 17, 2021 19:36
Hi, this is a sample with shadow catcher setup:
https://drive.google.com/file/d/188S8wvb097fdrAGZp3cqNorji6loOMm2/view?usp=sharing

1. Image 001.png. Make a Ground Plane object (higlighted), assign CentiLeo material to it, in material Diffuse settigns check Shadow Catcher flag as highlighted on the image.
2. Image 002.png. Setup your HDR lighting. Select the file of hdr as shown here. You may optionally override the HDR for couple of contributions (coming from Reflection, Camera or Diffuse, etc). In this example we override the texture for Reflections. They will be drawn from some other Sky Override object. We also override Matte Shadow contribution, it will cast the shadows from "Sky Override" lighting to the Ground Plane object.
Also you can change the strength of shadows that are casted on the Ground Plane. The shadows can be casted from HDR Sky objects as described above and from Sun light source (with CentiLeo light tag) and from Omni light souce (also with CentiLeo light tag). To manage the shadow strength of each light source you may change the "Matte Shadow Weight" as hightlight on 002.png
3. Image 003.png. To get the mask of object and shadows just open the CentiLeo render settings, AOVs/passes Tab, and in that place please enable "Alpha channel" flag as highlighted on the image. This way you be able to select Alpha chanel pass in IPR window as you can see. Also this pass will be provided inside Picture Viewer render together with Beauty image.
4. Image 004.png. To get the image with transparent background and the semi-transparent shadows on top of that just enable "Transparent background" option as highlighted on the image.

The shared sample has this .c4d file with textures.

Kirill
001.png (1.12 Mb)
002.png (1.11 Mb)
003.png (550.27 Kb)
004.png (919.67 Kb)
 
Administrator  Posts: 593
Nov 17, 2021 19:42
Btw the sample above has 2 light sources: HDR Sky and Sun. They cast different shadows on the Ground Plane to the left and right of the object. You may change the shadow strength of each light using Matte Shadow Weight value in CentiLeo light tag of respective light source
 
Administrator  Posts: 593
Nov 17, 2021 19:59
Quote
ssjenforcer wrote:
Also, I see that there are two types of centileo materials: centileo material and material [node]
What is the difference? One only has material editor while the other has node editor. And the centileo material has 'matte' while the material [node] has shadow catcher.
I tried both material types and neither give me shadows in the render.
Just material is the old version of CentiLeo materials that was the only option before Cenima R21. Since then Maxon has added node based materials support for 3rd party renderers and we have made the implementation and exposed it into the main menu instead of just materials. "Matte" and "Shadow Catcher" from both versions mean the same thing, we have just changed name in one place forgetting to change in another one.
You probably don't see shadows if you don't setup HDR lighting. With no any lighting it's black. Just learn from our sample.
 
Quote
Kirgman wrote:
Quote
ssjenforcer wrote:
Also, I see that there are two types of centileo materials: centileo material and material [node]
What is the difference? One only has material editor while the other has node editor. And the centileo material has 'matte' while the material [node] has shadow catcher.
I tried both material types and neither give me shadows in the render.
Just material is the old version of CentiLeo materials that was the only option before Cenima R21. Since then Maxon has added node based materials support for 3rd party renderers and we have made the implementation and exposed it into the main menu instead of just materials. "Matte" and "Shadow Catcher" fr om both versions mean the same thing, we have just changed name in one place forgetting to change in another one.
You probably don't see shadows if you don't setup HDR lighting. With no any lighting it's black. Just learn from our sample.
I was using a centileo sun light to light my scene, and I will try again, but I am pretty sure I tried an HDRi light as well and it didn't work.

Will it not work with simple lights at all, only when using an HDRi?
and which sample do you mean? Wh ere can I find that?
When I used the shadow catcher for the material node and looked at the node editor, there was nothing there about shadow catcher. Is that normal? Shouldn't there be some node reference to it?
Edited: ssjenforcer - Nov 17, 2021 20:22
 
Administrator  Posts: 593
Nov 17, 2021 21:12
The link to sample is https://drive.google.com/file/d/188S8wvb097fdrAGZp3cqNorji6loOMm2/view?usp=sharing
It's in my first reply, read it again.
Quote
ssjenforcer wrote:
When I used the shadow catcher for the material node and looked at the node editor, there was nothing there about shadow catcher. Is that normal? Shouldn't there be some node reference to it?
When you click to the node in the node editor you see the settings of this node in attribute manager as in this screen. See highlighted settings.
Quote
ssjenforcer wrote:
Will it not work with simple lights at all, only when using an HDRi?
The HDR is needed to make a background for engine. If you don't need a background then additionally use HDR Sky setup + transparent background in render settings.
Everything is exposed in render settings.
005.png (390.95 Kb)
 
Sorry, I scrolled fast on my phone and missed the first reply.
I will try this tonight.
Thank you.
And I assume I can render the beauty and shadow passes completely separate and alone on individual renders?
I usually like to render beauty composition first and then shadow once I'm satisfied.

EDIT:
It is not letting me save only the alpha channel.
Every time I try to save it just saves the beauty pass layer for the image and not the alpha.
How do I get it to save JUST the alpha channel to use for shadows in a composition?

These images are what I am trying to do in centileo. One is beauty pass and one is shadow pass. How would I render just the shadow pass?
The only thing I can do that is close is to render a multi-pass and extract the shadows in After Effects, but it doesn't let me have a transparent background because I need to have the HDRi camera brightness set to 1 to get the alpha to render and create a shadow.
Edited: ssjenforcer - Nov 18, 2021 01:36
 
Administrator  Posts: 593
Nov 18, 2021 03:49
Select "Transparent background" option in render settings to make transparent image.
Actually it's a responsibility of Cinema 4D to save the image layers that renderer produces. Maybe PSD will get a separate Alpha pass? Actually PNG when saved has alpha, I think it can be extracted in AE. Currently I can't look into AE.
 
Quote
Kirgman wrote:
Sel ect "Transparent background" option in render settings to make transparent image.
Actually it's a responsibility of Cinema 4D to save the image layers that renderer produces. Maybe PSD will get a separate Alpha pass? Actually PNG when saved has alpha, I think it can be extracted in AE. Currently I can't look into AE.
PSD and PNG did not work; they did not produce alpha layers in the saved file.
OpenEXR did work, and I could extract the shadow in After Effects. I needed alpha channel and transparent enabled as you said.
To get the beauty pass to work I needed to keep alpha and transparent but disable the plane from render view.

I'm just trying to figure out if it is possible to render my beauty pass with the plane object invisible but still have it provide reflections if I have a texture applied to it to simulate the ground I wish to composite the object onto.
I tried the C4D composite tag and disable 'seen by camera', but that did not work, the plane was still visible. I am trying to get lighting and/or reflections cast onto the object from the plane with the plane still invisible in the render.
These images are what I mean. See how with the plane visible it casts the reflections, but with it invisible those reflections are gone. I want to keep those.
is there a centileo compositing tag planned in the future?
Edited: ssjenforcer - Nov 18, 2021 12:01
 
Administrator  Posts: 593
Nov 18, 2021 17:14
The composite tag doesn't work yet in CentiLeo. I know it's needed very much, but still busy on other features.

I think we have missed the Multi Pass checkboxes in render settings. They are enabled automatically when user enables the Light passes or Beauty passes, but it was missed to do so for Alpha channel. But anyway I recommend to select what is highlighted on the image below: the Alpha channel, Diffuse, Reflection, and Multi Pass / Post Effects on the left menu as highlighted.
Then after re-render in PV you will see the image and layers in Layer tab. If you select "Multi-Pass" option in this tab the checkbox "Layers" will be activated in the Save menu for this image (see at the left side). This works for manual saving after render is done.


But really the Alpha channel output can be enabled if we make automatic render image save. This can be enabled using Save Settings (keep attention on highlighted settings):
1) To save the regular image (beauty main of centileo) you use the usual Save file of the Regular Image tab.
2) To save the layers you have to setup the Multi-Pass Image tab settings and setup additional Save filename, also use layer name as suffix.


3) If you enable the flag "Separate Alpha" in Regular Image tab the Alpha Channel will be outputed as a single separate file with "A_xxx" prefix.


4) If you disable the flag "Separate Alpha" then Alpha channel will be embeded to regular image (our beauty image) and it will get transparent background and semi-transparent shadows:
 
Ok.
I think I wasn't using HDR when I tried multipass before. And I kept thinking I needed the shadow multipass added.
I will try to make that work and also the sky override you mentioned.

EDIT:
That does not give good results for me.The beauty pass does not have an alpha and so the background is no longer transparent. So I will just have to not use multipass for my composites.
Also, the alpha layer it gives me has shadow all over the plane and not just where the object shadow should be.

The first image is what I get with your multipass settings, and the second is the one I did before without using multipass. It is better as it only has shadow from the object.
Edited: ssjenforcer - Nov 19, 2021 00:47
 
Administrator  Posts: 593
Nov 19, 2021 08:53
Why you background is red? Why you don't do it with ground plane + shadow catcher that can be transparent with semi-transparent shadows?
 
Quote
Kirgman wrote:
Why you background is red? Why you don't do it with ground plane + shadow catcher that can be transparent with semi-transparent shadows?
this is after I rendered it and put it into AE to see if it was transparent.
I need to be able to change each layer separately so i can reduce shadow opacity and not affect the beauty layer.

When I tried multi pass non of the layers other than the Alpha were transparent backgrounds. Is that because of using separate alpha?
Edited: ssjenforcer - Nov 19, 2021 12:52
 
Administrator  Posts: 593
Nov 19, 2021 16:54
Quote
ssjenforcer wrote:
When I tried multi pass non of the layers other than the Alpha were transparent backgrounds. Is that because of using separate alpha?
Yes, this is because of this. I have tested Cinema 4D exactly for this for several hours. So, it has Alpha channel for rendered image and it's applied on not only for main beauty image. It can have Separate Alpha On/Off:
1) In case it's Off then the Beauty image has transparency, but other passes still don't have (Diffuse, Reflection).
2) But in case it's On we get all images without Alpha channel and Alpha channel itself is stored as a separate image.
I think that case 2 is good, because you can re-apply this Alpha image to any image pass in AE. I don't have AE now, but I think it should be possible, it looks as something basic: the 4-th channel :)

In the future I will make a functionality to determine the images with object masks where you can determine the group of objects that go to any other output mask image. Also render objects or groups of objects separatelly from the other scene in image but with GI influence.
 
Quote
Kirgman wrote:
The link to sample is https://drive.google.com/file/d/188S8wvb097fdrAGZp3cqNorji6loOMm2/view?usp=sharing
It's in my first reply, read it again.
Quote
ssjenforcer wrote:
When I used the shadow catcher for the material node and looked at the node editor, there was nothing there about shadow catcher. Is that normal? Shouldn't there be some node reference to it?
When you click to the node in the node editor you see the settings of this node in attribute manager as in this screen. See highlighted settings.
Quote
ssjenforcer wrote:
Will it not work with simple lights at all, only when using an HDRi?
The HDR is needed to make a background for engine. If you don't need a background then additionally use HDR Sky setup + transparent background in render settings.
Everything is exposed in render settings.
Are you able to change the default settings for the light and sun light objects? It would be good to have them produce light when adding them to the scene initially. The light object begins too small for it to light anything in the scene, and the sun light starts off in a state much too dim as well and in a position where it doesn't light anything at first.
Edited: ssjenforcer - Nov 21, 2021 22:29
 
Administrator  Posts: 593
Nov 23, 2021 11:22
ssjenforcer, as for default light settings it seems you have some non-default Exposure settings or probably scene scale. When you start with a new reset scene in Cinema then CentiLeo light intensity settings produce good lighting for the objects around them without burning them. Also CentiLeo light intensity multiplier is a multiplier in centileo light tag! It just multiplies the Light intensity and color of native cinema light source object.
Pages: 1
Users browsing this topic