PDA

View Full Version : Render shadow only! How hard is it meant to be?



jaxtone
06-03-2015, 05:50 AM
I have spent some hours to figure out what I did three years ago when I needed to render the shadow separated from the object to have more freedom in After Effects to affect the shadow!

I tried to learn from people who have been so kind to share their knowledge in tutorials but since many of them are extremely long and shoot over the target this minor problem seems to have been forgotten!

I have used the node Shadow Catcher for the floor object and chosen Shadow in the Buffer Export window but still the image that finally are rendered out confuses me because it just look like usual when I import it into After Effects, a man and his shadow in the same layer.

What in Gods name am I doing wrong here?

The window that shows the layer options to the right in the attached window just tells me there are a lot of settings but nowhere information about how I can save the shadow in an image only!

Jack

Sensei
06-03-2015, 06:45 AM
Watch my video tutorial
https://www.youtube.com/watch?v=8vXIwUyrupo

jaxtone
06-03-2015, 10:00 AM
I have watched but have a few questions!

1. Does this mean I need a plugin that has to be purchased to make it work?
2. The video certainly contains a lot of valuable information but tell me which part describes where the rendered surface is defined, ending up and in what format it should be saved?

Sensei
06-03-2015, 10:03 AM
It's using TrueArt's Node Library Split Material, it's free.
As showed on video, you plug it to Diffuse Shading when there is no other settings in surface,
then save to PNG for example.
And you have your shadow only pass.

jaxtone
06-03-2015, 10:08 AM
Wow! Thanks for the information. I'll try it at once. Is it ok if I have questions if I get stucked?

jeric_synergy
06-03-2015, 10:17 AM
While it's, IMO, poorly/confusingly documented (This may have changed), the PSD exporter should allow you to save a layered PS file with the shadow buffer as one of the layers.

Throw away all the other layers, and WALLAGH! You may find it convenient to create a PS 'Action' (aka macro) to automate stripping out the extraneous layers.

jaxtone
06-03-2015, 11:20 AM
Sensei! (and of course anyone else...)

Please see the attached image!

SteveH
06-03-2015, 11:20 AM
Jack,

Try this. In layout go to Windows>Image Processing>Add image filters - choose Compositing Buffer Export.
Under Buffers click on Shadow. Hit f9 - and see if that gives you what you need.

jaxtone
06-03-2015, 11:22 AM
Jeric_synergy!

About the PSD which would be a great alterantive but I couldn't find out how to make Lightwave render out the image with different layers so it all just ended up in one layer which didn't separate the shadow from the character!

Do you know how to make Lightwave render out the different PSD layers to After Effects?

jaxtone
06-03-2015, 11:35 AM
Hi SteveH!

Please look at the image I attached to when I started this thread! That was exactly what I did but since I do not understand how or why about 40-50 different alternative renders popped up afterwards I couldn't get any further. I thought if I did just as you suggested chosen "shadow" as the alternative, only shadow should appear, but instead all these layers came up. But still not one of them with a shadow to present.

jaxtone
06-03-2015, 11:40 AM
Sensei!

One thing more that confuses me is that the Chess board is black and white from the beginning and only contain these two options. My character hasn't even have a single black or white surface colors in it.

How can I get around this problem without a enormously exhausting effort in changing every surface to black and white first!

Sensei
06-03-2015, 11:46 AM
When using Shadow Catcher, you will receive something like here:
http://forums.newtek.com/attachment.php?attachmentid=128479&d=1433353352

http://forums.newtek.com/attachment.php?attachmentid=128480&d=1433353407

I made Modeler Tools > Ground Plane,
then
Modeler Tools > Sphere,
activated Backdrop gradient.
And added Shadow Catcher to Ground Plane surface.
Done.
I have just shadow and the rest of ground plane is transparent, showing backdrop..

I have just Shadow in Composite Buffer Export tool:
128481

jeric_synergy
06-03-2015, 11:54 AM
#aflw

PSD BUFFER EXPORT (or whatever it's called) saves the PSD file completely separately from the 'normal' saving process. IIRC, you don't even have to have ANYthing entered in the regular SAVE IMAGE fields and it will still Save.

Just RENDERING the Scene will cause PSD files to be generated. (I think there's even an option to PREVENT F9 files from being saved.)

Hit the books man.

jaxtone
06-03-2015, 12:18 PM
Sensei!

I notice a bid difference between your examples and my character that confuses me a bit. You use two basic surfaces to interact whit the ground plate but when I look at my little 3D guy he as at least least 25 just in the shape layer for his body! How can I reach the same result as you under these conditions?

jaxtone
06-03-2015, 12:24 PM
Jeric_Synergy!

Ok, I know it save "the file" completely separately from the normal saving process. Don't need books for this! But I am more interested in what "that file" contains compared to if it can be saved.

Meaning that I have no use for it if it renders out both the 3D guy and the shadow in the same layer. The 3D guy and the shadow are stuck to each others and cannot be separated... so what's the point?

jaxtone
06-03-2015, 12:29 PM
Where is this function in After Effects? If it exists at all?

Watch from 14:12

Script - Load Files Into Stack etc...

That would've made things easier!

https://www.youtube.com/watch?v=m4sVez6aC5E

jaxtone
06-03-2015, 12:44 PM
Sensei! I might have missed something here. But why is the Backdrop Gradient necessary? Couldn't it be a background image like the one I used from start that is connected to the film I am about to create?

Sensei
06-03-2015, 12:49 PM
Sensei! I might have missed something here. But why is the Backdrop Gradient necessary?

It's not necessary. Just to show there is shadow on some background..


Couldn't it be a background image like the one I used from start that is connected to the film I am about to create?

But you didn't provide scene to play with, so I had to use something instead, and used backdrop, as it's the easiest to set up..

- - - Updated - - -

You mean there is plentiful of surfaces? I see 28..

Ahh..

See the end of my video tutorial (bathroom example) where I am using Global Materials (http://globalmaterials.trueart.eu) and applying Shadow Catcher to global override.. That's how I am doing such stuff..

jaxtone
06-03-2015, 01:06 PM
Sensei!

I really appreciate your help and I will definitely watch the bathroom sequence directly after this. I just have to step back and explain that I totally have failed in explaining what I was looking for in the first place

All these examples and tutorials show one thing and that's not what I need. They all save the shadow and the character or object in the very same layer. No no no, I want the shade layer separately rendered without the main object that cast the shadow. Its impossible for me to create post work on the shadow if the character or object is in the same layer.

Its great to know how the node with Shadow Catcher works, but that's just half way to the goal!

What I do not understand is why the rendered images even if they are in psd, exr, alpha, png or otherwise and I have only marked the shadow tic in the buffer export still renders out the main character merged to the shadow in the same layer?

jaxtone
06-03-2015, 01:09 PM
Ok! I tried to activate "Unseen by Camera" for the 3D guy but that didn't take affect, and maybe that is why this thread has become so long. That is the way I used to solve problems when the main object that cast shadows shall not be rendered. Don't have a clue off why this doesn't work on the 3D guy?

SteveH
06-03-2015, 01:21 PM
This video helped me - maybe it will help you as far as rendering out different passes (including shadows). It's a very easy to follow tutorial.

https://www.youtube.com/watch?v=m4sVez6aC5E

jaxtone
06-03-2015, 01:51 PM
SteveH!

Thanks!

If you look at message #16 in this thread you'll see that I already have mention this tutorial!

Are you really sure you have used this tutorial as a reference to create compositions with film and animated characters in a video or film editing software, in that case which? Meaning that Photoshop is a nice program but it would kill anyone of us if we try to use it as an editor for film shots.

The nice guy who have produced this tutorial is doing a great job but how would it help anyone who works with film if the import functions are totally different? I work with film and 3D in a combination and especially look for solutions to help me in that matter.

Watch from 14:12 and tell me where these functions are in After Effects? If they exists at all in that environment!

They are mentioned as "Script - Load Files Into Stack" in Photoshop and would've made things a lot easier even in After Effects!

SteveH
06-03-2015, 02:01 PM
I apologize - I admit I just kind of skimmed what the problem was. I only used the steps in his tutorial with still images - not animations. You can export out pngs for each layer though - so the shadow layer - sequence - can be used in after effects right?

jaxtone
06-03-2015, 03:11 PM
Nope! Unfortunately I have tried that for a couple of days now but it seems almost insanely rough to get this done in an easy way!

I had to solve this in an old fashioned way by render layers one by one.

1. The layer with the main object was rendered without any shadows connected to the spotlights.

2. The reflection layer was rendered with only the ground plane layer visible and no shadows connected to the spotlights. The settings to make only the reflection visible was to set the surface settings for reflection and transparency to 100%

3. The shadow layer was rendered with only the ground plane active and the main character "not seen by camera." I also used the node Shadow Catcher on the Ground Plane to only make the shadow visible.

Now I have three separate layers just as I wanted from the beginning but it feels like an ancient way of solving this. There must be better ways that not craves a scientific education to make that happen!

jeric_synergy
06-03-2015, 03:58 PM
128512
Jeric_Synergy!
Ok, I know it save "the file" completely separately from the normal saving process. Don't need books for this! But I am more interested in what "that file" contains compared to if it can be saved.
Meaning that I have no use for it if it renders out both the 3D guy and the shadow in the same layer. The 3D guy and the shadow are stuck to each others and cannot be separated... so what's the point?
See attached PSD file (above). Note the layers. I've turned off all the layers but the one with the Shadow buffer in it.

This was using "Photoshop PSD Export".

- - - Updated - - -

Followup:

Turned off SELFSHADOW on hovering object: this is full render, then Shadow Buffer.

128513 128514

Cageman
06-03-2015, 04:02 PM
Use the Shadow Catcher Material for the floor. Make sure that the shadow casting object is Unseen by Camera. Open up the processing tab and make sure to output the Shadow Buffer.

OR

Do it the oldschool way... Do not use nodes (but this is harder). On the floor object/surface that is supposed to catch the shadow, go to Advanced tab, change the Alpha Channel to Shadow Density. Now you will have an Alpha channel representing where the shadow is. This Alpha channel can be used in AE or any compositing software to create a shadow. The same applies to the Shadow Buffer; the difference is that the shadow buffer makes the Alpha channel an RGB Value instead of being an Alpha (if that makes sense?).

In both of these examples though, it is IMPORTANT that the shadowcasting object (your character in this case) is Unseen by camera. If you can not make that happen, you've done something very sinister. Because that _should_ work (maybe not allways in VPR though in very, very odd circumstances).

jaxtone
06-03-2015, 08:22 PM
Cageman!

Thanks, that's exactly the way I planned doing this but of some reason the shadow casting object didn't react on the "unseen by camera" action. Now it does and I haven't got a clue why it didn't want to cooperate from the scratch!

Now it works but I still experience the "buffer export" as incredibly unwilling to do what its expected to do!

Cageman
06-04-2015, 01:39 PM
Ok... so the buffer exporter is not working properly for you?

Do you have exrTrader by any chance?

EDIT: Ok.. so we are back at your initial post; the thing is that now the object can be hidden from camera, but you still need to get the buffersaver to work... Cool. I'll look into it and possibly whip together a quick and dirty content for you to examine. :)

Cageman
06-04-2015, 02:54 PM
Tutorial (https://www.youtube.com/watch?v=QL_8rXjEdg8) on Compositing Buffer Export and a quick and dirty content. :)

jeric_synergy
06-04-2015, 03:07 PM
Still waiting to find out why PSD export wouldn't work.

jaxtone
06-04-2015, 07:50 PM
Cageman!

I take a look at it tomorrow!