0
$\begingroup$

I'm currently trying to render some assets (in cycles) for an application I'am developing. As I need objects to appear separately the idea is to have object A, shadow A, object B, shadow B and so on so I can draw all shadows first (I'm aware there might be some shadow overlap then) and then the objects on top.

I have a groundplane which I currently have set to be a shadowcatcher. This works fine, the "problem" is the output, as it combines object and shadow and I can't seem to find a way to get them separately.

I also tried moving every object to a different View Layer (currently trying it in 2.8) to get the objects separately later on, turning on shadow in the view layer properties for each layer. This, of course doesn't give me the shadow on the ground plane anymore, as it's on another layer.

I guess I'm just overthinking it and there must be an easy solution to get object|shadow separately for different objects.

Any help would be greatly appreciated!

Cheers, Daniel

$\endgroup$
1
$\begingroup$

Your question is a bit confusing as to what exactly you want. Anyway, here is a way to split basically every object and shadow however you want, if this isn't exactly what you want you can definitely alter it with the methods shown in the nodes.

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for your answer, this should work, though I think this will result in a huge nodetree in my case. Let me clarify my problem / usecase: Top-down view: Cube A, Cube B are placed on the surface. As the user is able to say: Make A visible first B later or vice versa, I need the Cubes separated from the shadows so I can draw: Shadow A, Shadow B and then Cube A and Cube B on top. Otherwise Shadow A could get drawn over Cube B (or vice versa depending on the order) This seems feasible with your setup. My problem I have 30-60 cubes which multiplies the setup above by a lot. $\endgroup$ – Daniel Friedenberger Feb 21 '19 at 22:19
  • $\begingroup$ @DanielFriedenberger It is very feasible to script the node setup, in fact I have done it for hundreds of cars containing a lot of different materials. $\endgroup$ – WhatAMesh Feb 21 '19 at 22:46
  • $\begingroup$ As the task changed internally I can now solve this differently (render all in one pass, funny enough I have to script something different now). But this solution would have worked. I also tried it with cryptomatte, works too, though with more manual work as you have to choose the color of the object you want to mask in the compositor (If I'm not overlooking something with cryptomatte) Thanks! $\endgroup$ – Daniel Friedenberger Feb 25 '19 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.