Topic Rooms Vfx

An online community for Digital compositing artists

Log in

I forgot my password


Big problems in Vfx industry


View results

Social bookmarking
Social bookmarking digg  Social bookmarking delicious  Social bookmarking reddit  Social bookmarking stumbleupon  Social bookmarking slashdot  Social bookmarking yahoo  Social bookmarking google  Social bookmarking blogmarks  Social bookmarking live      

Bookmark and share the address of Topic Rooms Vfx on your social bookmarking website

You are not connected. Please login or register

Topic Rooms Vfx » Conference room » Edge Work » Reddit : Tips on blending real shadows with rendered shadows for compositing

Reddit : Tips on blending real shadows with rendered shadows for compositing

Go down  Message [Page 1 of 1]


link :

Question / DiscussionAny tips on blending real shadows with rendered shadows for compositing? (

submitted 2 days ago by Therathos
28 commentssharepocket

all 28 comments
sorted by: best

[–]skankhunt142 11 points 2 days ago
Try using a min operation.
Take the shadow alpha and invert it so the shadow is black and the rest of the frame is white. Now sample the live action plate shadow value. Set the black value of the cg shadow to this plate value. Now combine the two with a min operation. This will take the minimum value between the two.

[–]fuzzyonion 7 points 2 days ago
In other words, use the "darken" blending mode.

[–]Therathos[S] 1 point 2 days ago
I've tried that but because my shadow isn't pure black there is some white that get through

[–]Therathos[S] 1 point 2 days ago*
I don't have a separate shadow alpha, it's straigth into the shadow png. I guess that's a noob mistake and now I understand why. Any workaround without re-rendering? Also what's the name of the effect that allow to enter a clip board value for the blacks?

[–]had3l 1 point 2 days ago*
My experience is that this rarely works very well. What you are doing is the same mathematical operation as a clamp using the cg shadow as a mask. There is variance in the shadows that will make it not match, some sections will look clamped, detail will be lost and you will never get the same shadow quality as the plate shadow.
I feel that to blend that shadow and make it look good, I usually have to comp it like OP is comping it (by trying to get a key or using a roto to mask the cg shadow with the real shadow), and try to make it match the original shadow as close as I can with color grades and whatnot, and then, after that is done, paint a frame (or more and blend them together) of that small patch of the ground where the CG and real shadow intersect to make it look seamless and track it back on top of the problematic areas.
It is a lot of work, but it always works and it always looks good. (As long as you have decent paint skills).
Another thing that might work, although almost never perfectly but it might save you time and it might look decent enough, is to do the min operation skankhunt142 mentioned but isolate it just to the very limited areas where you are getting a double shadow. It will be faster than painting, and sometimes it gets the job done.

[–]Therathos[S] 1 point 1 day ago
So you paint a frame in like photoshop? Because that's a lot of frame to paint considering the amount of parallax and camera movement I have in this shot I'd need a new painted frame each 10 frames or so... Any video tutorial about that?

[–]had3l 2 points 1 day ago*
The idea is to paint one frame of a big patch of grass that covers all the areas where your cg shadow intersects with your real shadow. Then use your tracked camera to project that frame onto the ground plane. You would then use that as a mask to patch the areas where you are getting double shadows.
Alternatively you could do a planar track to achieve the same result.
If all that is too advanced, try the min operation skankhunt talked about, then use that as a soft mask to apply it only where you need. Don't comp the entire shadow with the min operation though, unless it's a very even featureless ground.

[–]madebyollin 3 points 1 day ago
What I'd do for a static frame (in PS or whatever) is:
Do a rough job like in the OP, but make sure there's an area of overlap between the two shadows (so there's an ugly dark band) and no light gaps. No feathering (you want the band of overlap as small as possible so you can cover it easily).
As a sidenote (for this specific scene) displace the shadow in the grass region; it shouldn't be continuous-edged since it's landing on different parts of the grass blades. If you're rendering the shadow in 3D this should be reasonably easy to do (my paint looks pretty bad and would look extra-fake after a camera move). Worst case just blur the shadow more in that region or 2d displacement-filter it (using the luminance from original plate as displacement magnitude)
Copy the original photo layer into a new seam-hiding layer on top and, in this layer, do a rough job bleeding the actual shadow color over the place the dark band would be.
Set this new layer to lighten only (max) and apply a rough mask to just the band so it doesn't get rid of your composited shadow but still covers the seam.
So, basically, three layers: base, shadow, and seam-cover, with shadow darkening and seam-cover lightening. Sort of like what had3l said, I guess? But I think it can be done without having to manually paint grass blades at any point.

[–]GrandMasterStevey 2 points 2 days ago
The real shadow looks more blue than pure black . Try adding a little blue to the rendered shadow.

[–]Tech_guy3 2 points 2 days ago
Try using some sort of luminance keyer to just get the bits which aren't in shadow already then add the shadow to those bits. This will sort out some of the double shadowing.

[–]Explodicide 1 point 1 day ago
Is it a moving plate? If not, paint the original shadows out, and recast all those shadows in cg so they match.

[–]wescotte 1 point 1 day ago
My immediate reaction was the angle of the shadow looks wrong to me. The light seems to be directed somewhere around -70 degrees but your comp appears something like -20. It could be I just am not properly able to visualize the object you are trying to composite in though...

[–]Therathos[S] 2 points 1 day ago
It's a floating object that's why it looks wrong but the sun is at the right spot/angle or very close to it.

[–]MR_CENTIPEDE 1 point 1 day ago
I use the luminance key on a copy of the original footage, push the key to remove the majority of the darker areas of the image, all the way till it removes the shadows. Use the remaining lighter areas of the image to drive where the shadows will be visible. You could always manually mask out the shadows but that will take much longer, but you will have much more control.

[–]stamstergios 1 point 1 day ago
How about turning the footage into black and white and then creating a luma matte by increasing the contrast. The grass introduces a bit of noise but it's worth the shot, i think.

[–]bluefuze 1 point 1 day ago
Frame hold, paint track? I guess the grass would look weird because of the lack of inconsistent pattern in the grass. Depends how long the shot is.

[–]um3k 1 point 2 days ago
Feathered mask and lots of fiddling with the edges to get it just right.

[–]Therathos[S] 1 point 2 days ago
Tried feathering but it's still not good enough

[–]nhenryberends 0 points 2 days ago
Try for longer?

[–]Therathos[S] 2 points 2 days ago
I meant Ive tried before this obvious comment.

[–]RyanJThompson 1 point 2 days ago
Even though it's obvious your image shows a hard edge so I assume that's why it was suggested

[–]Therathos[S] 1 point 2 days ago
I left hard edge for people to understand what I wanted to do since the mask visibility is off.

[–]RyanJThompson 1 point 2 days ago
Can you upload what it looks like with it feathered?

[–]Therathos[S] 1 point 2 days ago
Here you go

[–]had3l 1 point 1 day ago
Don't use a roto mask, try getting a luminance key to create your mask. Then you can try eroding/dilating/feathering that key to see if that gets you closer.

[–]am_I_a_dick__ 1 point 2 days ago
Replace all the real shadows grass with CG grass and use the shadow lines as the mask between the two. You can create the shadowed grass simply by clone stamping in Photoshop so you have enough and project onto geometry. You then use your rendered shadow as a mask for where the CG grass shows. This is how to do it properly. If you simply darken grass that's currently in sunlight, you'll have hard shadow lines in shadowed grass which is so far away from correct.

[–]had3l 4 points 1 day ago
That is correct (if you have time and resources to do it properly), however, he is asking about the blending of the real and cg shadow, not about the edges of the cg shadows with the grass. And anyway, when it comes to grass usually you can cheat by using a key of the grass to drive a distortion or to create a pattern to rough out your edges.
Even in production for big blockbusters though, I don't think I have ever seen people make geometry for grass for casting shadows. Compositors can just cheat it.

[–]am_I_a_dick__ 1 point 1 day ago
I would have a re-read, I never mention creating geometry for grass. What I said is to use photoshoip and cloone stamp enough of the shadowed grass to create enough grass for your shadow. Project this onto geometry and render and use this for your cg shadow.

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum