Acrionx CG Arts and Animations

Home | Tutorials | Freebies | Gallery | Links | Contact | Register | Login

How to Render Shadows Over Background Images in 3ds Max Using Matte/Shadow/Reflection Material

In this tutorial, I will show you how to render objects against a background image in 3ds Max with proper shadows. Here is the end result we are trying to achieve.

A box rendered against a background image.

The box and a plane were the only geometry in the scene. Everything else you see was from a background image. This is rendered using the mental ray renderer.

Let's get started!

1. First, go to Render-->Render Setup and make sure that mental ray is the selected renderer.

Select mental ray as the renderer

2. Save this image to your computer.

Lamborghini Reventon

3. Back in 3ds Max, go to View -->Viewport Background-->Viewport Background. Click on File and select the file you saved from step 2. Make sure Match Bitmap and Perspective are selected. Then click OK.

Load background image.

4. Create a box and a plane and align the Perspective view so that it matches the background image.

Create a box and a plane

5. Create a Target Light from the Photometric Lights group.

Create a photometric light

6. Click yes if you get this.

Photometric light dialog box

7. On the Top viewport, click to the left of the box and drag to the box to create a target light. Right-click on get out of the light creation mode.

Create a target light

8. In the front viewport, move the light up so that it is slightly higher than the box.

Move light up

9. With the light still selected, go to its properties and make sure Shadows are on under General Properties and set the Resulting Intensity to about 40 under Dimming in the Intensity/Color/Attentuation menu.

Light Properties 10. Do a test render to make sure you get a shadow. Move the light up higher if the shadow extends out beyond the plane. Make sure that all of the shadow falls within the plane.

Test render for shadow

11. Now go to Rendering-->Environment. Click on the None button, choose Bitmap, and choose the image you saved from step 2.

Select background image

12. With the Environment and Effects dialog box still opened, press M on your keyboard or click on the material editor button to open up the Material Editor window.

Material Editor Button

13. Drag and drop the loaded image to one of the empty material slots and choose Instance in the pop-up dialog box.

Drag and drop to empty material slot

14. Drag and drop another empty material slot on to the plane.

Drag and drop empty slot on to plane

15. Select the plane material and click on the Standard button and choose Matte/Shadow/Reflection in the pop-up window. This material allows you to render only shadows on an object when a shadow is cast on that object.

Change plane material

16. Make sure you have the second slot still selected. Drag and drop the material from the first slot to the button next to Camera Mapped Background and choose Instance at the pop-up dialog box.

Assign background image to matte shadow material

17. Do a test render. As you can see, since we applied the Matte/Shadow/Reflection material to the plane just the cube's shadow and reflections are rendered. The rest of the plane is gone.

Test render

The light seems to be too bright.

18. Select the light and bring its Resulting Intensity down to 5 the way you changed it settings in step 9.

Light properties

Do another test render.

Test render

That looks better. Now we need to adjust the background image to make it brighter.

19. Select the slot containing the background image and go down to the Output rollout. Change the Output Amount to 10, RGB Offset to -0.05 and check Enable Color Map.

Adjust background image

20. In the Color Map section, make sure RGB is selected, click on the Add Point button, click in the middle of the sloping line. Switch back to the Move button and in the coordinate boxes, type in 0.507 and 0.184 as shown.

Adjust background image

21. Do another test render.

Test render


22. Now you can adjust your viewport to adjust the positioning of the cube as the finishing touch. I also adjusted the light position and changed the background image's Output Amount to 8 (see step 20). Below is the final result.

Final result

Well, that wraps up the tutorial. If you find this tutorial helpful to you, please show me some love by making a donation.

Terms of Service | Privacy Policy

Copyright © 2012 All Rights Reserved