Rendering an object with shadows

Hi all. I hope this is the right place to post this question. How can I render shadows with transparent background? I’d like to render png image for photoshop with transparent background. The reason why is that I’d like to change background later on. For instance I’ll model a 3d cup and I’ll render it as a png file. Later on I’d like to add a background image in photoshop ( wooden table, plastic board and so on). All new background will at the same distance from the cup.
Is there any way to do so?

Cheers

L.

A. What render engine: Blender Internal or Cycles?
B. If it is the latter, you might want to do a forum search for “shadow catcher”.

A: Cycles
B: I’ll try it. Thanks

I was trying to get the “shasow catcher” work but unfortunatly it doesn’t work as easy as one tick on shadow catcher option in blender so it didn’t sort out my problem. I couldn’t get it work.
Any help please?
Thanks

You’ll need to tell us exactly what you tried!

Conceptually, a shadow-catcher is simply a solid object that will receive a shadow. And then, you use nodes to extract only the “shadow” data for subsequent use. Although the renderer may calculate other things, the only output that you actually use is the shadow.

I prefer to use “shadowless” lights – or to turn-off shadow rendering in lights that have it – because shadow calculations suck up a lot of CPU time. Then, I will use a “shadow-only spotlight” (in BI …) to inject shadows precisely where I want them.

Although a rendering engine will dutifully calculate “perfect shadows,” sometimes I find that I really want “very contrived(!)” shadows that merely look plausible. I want the shadows to be simplified, and there are many places in the scene where I really don’t care about shadows at all. A few well-placed shadows define the 3D effect. Too many shadows can just get in the way, even if they are “correct.”

Another thing to consider is that the shadow-only spot basically tells you where the shadows are. You can manipulate the shadow-channel output “in post” in many ways, and you can use it as a mask. (For example, stirring in a slight “blue from the sky” cast into the areas where the shadow falls, and maybe gently mixing-in a different color where it does not. And, so on.)

Judicious control of shadow calculation – including, perhaps, “getting shadow data from BI and using it in an otherwise Cycles-generated render … you’ve got both, so why not use both?” – can save a lot(!) of time.

wow… thanks for the info sundialsvc4

Great post!

That’s what I was talking about. The simplest tutorial for last two years as I can see in comments :o).