Sitemap
Brian Mayrose

Brian Mayrose

Putting 3d Objects Into 2d Images Using Blender

4 min readOct 12, 2017
Press enter or click to view image in full size
The three cups are the 3d objects, the table and fruit is a 2d image
Press enter or click to view image in full size
  1. Set your scene to cycles renderer.
  2. We are using a cup made earlier. You can get the scene here: https://github.com/intoro/Blender_object_in_photo/
  3. We remove everything except the cup. Press 0 on the numpad to enter camera view.
  4. press n to open the menu if not already open. Check the background image box. Open your counter top image. Set the axis option to camera. Increase opacity to 1 brightening the image.
  5. Switch to the render panel and adjust the resolution to match the images height and width.
  6. Select the camera from the outline and adjust the focal length in the data object menu.
  7. Move and pan the cup adjusting it so it lines up with the background.
  8. Now make a mesh plane. Press shift+a > mesh > plane. Scale by pressing s then 10 on the number pad. Press 1 on the number pad and line the mesh plane up with the bottoms of the cups. Press 5 to get back to the camera view.
  9. With the plane selected add a new material. Keep the default diffuse texture and click the small white circle next to the color and select image texture. Open the same image chosen for the background.
  10. With the plane still selected tab into edit mode. From the tool menu on the left press the subdivide option.
  11. Press a twice to make sure you have the entire plane selected. Press u to unwrap and select the project from view option. You will see the image nicely lined up with the back ground image. Press tab to enter back into object mode and save your file.

12. When rendering the image you will not be able to see the background image, it is just a reference for now. While the plane image and background image are visible is a good time to match the lighting.

Get Brian Mayrose’s stories in your inbox

Join Medium for free to get updates from this writer.

13. switch to rendered view, Under the rendering tab under film check the transparent box and the background image shall appear. Select one cup and apply the principal shader as the material and set the transmission to 1 to make the cup appear to be glass.

14. Select the lamp and set it to sun. Set it to a strength of 5 to begin with. adjust the size of the lamp. A larger lamp will make a softer shadow while a smaller lamp size will make a sharper shadow. Change to the object tab (the orange cube) And adjust the shadow’s size and direction with the rotation values. After making adjustments you might need to back and adjust the strength setting some more.

15. Now select the plane while in camera view, 0 on the numpad.
press s to scale the plane big enough to fill in the total visible background.
If the perspective of the camera does not allow for the plane to fully cover the background, tab into edit mode with the plane selected

16. From the tool plane, click subdivide a few more times till you have the plane divided into small squares. Turn on proportional editing (while in edit mode the circle next to the face selector) and set its proportional drop off to sharp

Press enter or click to view image in full size

17. hold down alt and right click a subdivision line going from left to right near the far end of the plane. Press g and pull the edge up, covering the background, also use the scroll wheel to smooth out the transition.

18. Once the background is covered by the plane, hit a twice selecting the whole plane. Press u and select ‘project from view’.

Press enter or click to view image in full size

19. You can now render your image. I checked the denoise option from the layers tab and set the sample rate to 1170.

Alot of thanks goes out to tutor4u and his awesome video tutorial

--

--