# Cast 2d image shadow on to my 3d object

Is it even posible? Hello everyone! I have placed a background image to my project and also a plane with an image as its material.

As you may see in the picture I attached (it is not in camera view), that the tree that you see next to a path I modeled has a the shadow I need to project (somehow) to my object.

Thank you so much for your time.

• This could be done by duplicating the path, switching the original invisible while you trace the shadow's shape with the duplicate path. This will then be used as a shadow object (plane) to lay over the path but a whisker higher. Switch the path back to visible and make the shadow plane semi-transparent. Colour it to match the shadow or even texture it with the original shadow section of the image. Clear as mud? If so, leave a comment and I'll have a go at this myself, am tied up at the mo. There are other methods also. One being to organise a texture to apply to the path itself. – Edgel3D Jan 19 at 5:40
• Hello, Thank you for your reply. I am going to try the duplicate object then trace shadow method you mentioned. – efani Jan 19 at 6:05
• Good luck with that - I'll watch this space in case you're stuck at some point. – Edgel3D Jan 19 at 6:07
• Hello Edgel, if I am using different layers on my compositor and (for example) I only have one camera that appears in the first layer, will that be the camera rendering at my other layers? Because I will always have to add a new camera at whatever layer I want to render from? right? – efani Jan 20 at 7:33
• I ask because I don't see a camera in the layer I am working and when I press cero I can see my background image and the objects where I want them to appear on the render perfectly, but once I render the background image it appears in some other random side. – efani Jan 20 at 7:40

A footpath (pink) plane is laid over the background image to hide and replace the original path at the left side of the water.

Two shadow-shaped masks are then laid over that which cut through it to reveal the background image's shadows once more.

The masks are not fully transparent so they can be tinted pink. The shadows then appear to be on the added pathway when in fact, they're on grey concrete.

Because the masks are to be selective, in that they cut through the added path-plane but don't affect the background image-plane, we render in OpenGL. (See footnote)

If the masks do cut through the background, parent both to the background plane, then unparent them immediately. (use "keep transform" option in both cases)

-=============-

Footnotes -

An alternative would be to texture the masks with the background image and use the UV editor to scale and align the respective shadows.

-==============-

Another, is to use Blender's internal masking which will cut a hole through everything and require post processing.

Render the holed image (or lossless video) in .png format with an alpha layer. (the RGBA button at extreme right in the rendering properties' output tab)

Note that the output still includes the background image-plane.

Save the project and exit. Fire up Blender again and use the 'Video Sequence Editor' this time.

Lay the holed image/video over a COPY of the background image which is tinted pink to match the overlaid path.

The holed image will only allow the tinted shadows through.

-===========-

The post processing could also be performed using the Compositor.

All up, the easiest by far was to render in OpenGL and use it's masking, do it all in one go.

enter code here

• Thank you. Did you read this question: .. if I am using different layers on my compositor and (for example) I only have one camera that appears in the first layer, will that be the camera rendering at my other layers? Because I will always have to add a new camera at whatever layer I want to render from? right? I ask because I don't see a camera in the layer I am working and when I press cero I can see my background image and the objects where I want them to appear on the render perfectly, but once I render the background image it appears in some other random side. – efani Jan 21 at 1:37
• I did actually answer that in a comment you may not have seen. (you have to click on "Show 1 more comment" to view it) In that I mentioned that you can only have one camera active. That's the viewpoint that will be rendered from. Can I ask why you're using the compositor? Your question is only asking if the original shadow can be laid across the added path, the short answer being - yes, it can. – Edgel3D Jan 22 at 3:06
• Your welcome - hope you managed the result you were after :) – Edgel3D Feb 7 at 1:07