For the fourth instalment of look dev lessons, we looked at matching a background image with the correct perspective and lighting. Learning to match the 3D camera perspective to that of an image is a very important skill since it allows you to embed 3D models into images whilst matching them to the correct perspective of the floor. Without this aspect, they wouldn’t feel like part of the scene and in turn, the combination wouldn’t look seamless or realistic. Mastering this skill can open up the doors to more complex techniques such as camera mapping. This refers to the projection of an image onto 3D models, all of which match the footage and create a 3D environment that can be rendered in.
This demo reel showcases the technique in effect. It is most often used in film & tv because of the need for slight camera movement in order to achieve the 3D feel. From the videos that we were shown, I also gathered that a LUT is often used at the end, or some form of colour grading in order to make any new elements blend in better with the background and make the image more cohesive when rendered in 3D. In terms of structure, the build-up reminds me very much of matte painting, however, the considerations are slightly different in a three-dimensional space. More than one perspective needs to be considered; depth is no longer an illusion that is painted on-screen but something real that needs to be achieved and made to fit the desired atmosphere.
Matching Cam. Perspectives in Maya – Demo
In Maya, when we were shown how to do this, three different images were provided for us, as well as an environment HDR file specifically for skydome (which is used for lighting in Maya). I imported this in as usual, by going into ‘Arnold’, ‘Lights’, ‘Skydome’ and then finding said file in the ‘image name’ folder of the colour checkered box.
Once the skydome was set up, it looked like this, which I had never actually done before. Zooming out in perspective mode to see it fully whilst an image is applied looks super cool!
Next, we had to create a camera (obviously). I had done these steps many times before and had one generated in no time, after which I moved it off the grid and pushed it back so that it was looking towards the lines. There was also an optional step that I decided to do, which was to tap ‘D’, hold ‘X’ and move the origin to the centre of the grid, making it slightly easier to rotate and find the right angles later on.
Now it was time to bring in the image. As I mentioned previously, we were given three options to choose from: all of the same location but from a high, mid and low angle. I chose the middle one and went to ‘camerashape1’ in the attribute editor. Under the ‘environment’ tab, I clicked on ‘create’ and chose the JPEG I wanted in the image name.
We wanted to be able to see through the camera’s perspective in order to match it to that of the image so, of course, I then went to the image plane properties and ticked ‘looking through camera’. This is where the main part of the lesson came in – by using the grid as a reference point, I began to match the perspective of the camera to that of the image. I adjusted the height and rotation until the lines of the grid matched those of the bricks (which were actually a very good guide). If it wasn’t working out no matter what we tried, we were advised to change the focal length under the camera’s properties but surprisingly, I had no issues here and I found the alignment process very easy to do! It was all about tweaking and I did so until I felt mine was perfect. After this, so that I could ensure the camera wouldn’t move, I selected all of the values in the channel editor and locked them.
I think that this was the most crucial step since the accuracy and realism of the renders depended entirely on it. Any object now generated appears on the grid according to the perspective that is locked in place – the more accurate this is, the more that object will look like it belongs in the scene. I added a poly plane and cube as my test subjects and sure enough, I didn’t even have to move them (before scaling), they appeared exactly as I wanted, following the brickwork. There was one step further that we could take this before the final render. After assigning a new material to both the plane, I went to ‘Arnold’ and ‘aishadowmatte’. When this is applied, it takes into account all of the lighting and made a shadow for whatever object is on top, which in this case was the cube.
This is called a shadow catcher and it looked quite grainy at first but it helped massively in the render view in terms of cohesiveness. Before rendering, I also selected the HDRI and turned the ‘camera’ to 0 under ‘visibility’ (in the attribute editor).
Since my test render came out quite well, I decided to bring in a previous model of mine that I hadn’t used yet, which is my second plant. After applying materials and adjusting the position slightly, I was ready for my second render.
Extra Tips
I didn’t end up using these but I wanted to include them. Firstly, if you don’t have an HDRI of an image, you can also use the image itself as the skydome. It won’t be 100% accurate but it is an option. Secondly, if you are using a glass shader when rendering, the shadow catcher will not give you a shadow because the program sees it as a translucent object, therefore already being physically correct as it is. By turning the transmission down, this can be remedied or at least make the object more visible.
•,¸,.·’ ‘·.,¸,••,¸,.·’ ‘·.,¸,•
Horray – this lesson ran so smoothly for me! I usually experience so many hiccups with Maya and sometimes don’t even manage to complete the task properly, but I think that I did really well this time. Matching perspectives is probably much harder with a different image since we had bricks to help us and act as guidelines. However, I think that I have the fundamental skills down and I got some cool renders out of the process as well. I can see how this can be applied to a film or game with further technical ability since it can really speed up the process of bringing in 3D objects and making them look realistic in terms of the scene. With worldbuilding, for example, you don’t have to worry about things like trees and rocks when using this technique and can focus on hero assets, which may require more detail.