Learning How to Add a Computer Generated Background by Héctor Carcedo a month ago 5 min read What happen when in a shot you need to change something or you need to change the whole background?, how do we fix this situation?, read along if you want to know how.I am a big fan of James Bond movies, I’ve always been. And I always try to do personal projects, because it was always my path to learn. In this case I wanted to practice some rotoscoping (because believe me or not, I love doing rotos) and have a strong piece in my reel.The case was that I was watching the very first James Bond movie, Dr. No. At the beginning, James was assigned a mission in Jamaica and M (Bond’s boss), called him to his office. Watching that, I thought would be cool to do the background replacement as the office looked boring and do it a little bit more modern. The idea was not quite a while in my mind, as I stopped the movie in that moment and tried to find this scene on internet. M's office as appeared in original Dr. No movie.The idea was good enough as a practice, including from rotoscoping James Bond and modeling a new background to color matching. So I got to work.Where to Start?Okay, that was a cool idea, but where do we start? Before starting modeling, the first thing I did was to set up the 3D camera matching it with the reference from the movie. I use 3D Studio Max, so the obvious was to use perspective match utility tool. This is a very useful tool which allows us to set up the camera in the 3D space using a reference. What you need to do is to match the references in axis X (red), Y(green) and Z (blue) and automatically it orients a camera so that its position and field of view match the perspective of the image. Perspective match tool, with references in axis X, Y and Z matching the reference image.Once the camera is set up, the next task was modeling. Nothing very fancy at this stage, just modeling the walls, windows, floor and ceiling. Background basic modeling.Next thing was to import the furniture models, texturing and lighting the scene.Background final model.After a few test I rendered the final background image. I used V-Ray and I saved it in .exr with the render elements as you can see in the picture below.V-Ray render setup window.Now the render is done we can jump to Nuke and start rotoscoping our favourite spy.Let's Move PointsThe first thing I do when I have to rotoscope something is to watch the shot a few times and identify where I could be in trouble. Usually I chop the roto in small parts (hair, head, ears, body, arms, legs, etc) and if I needed, I do separately the parts where motion blur is present. Once everything is setup I start moving points, starting first frame first and last frame next, then I jump to the middle frame of the shot, then I do the middle frames of each part and I keep doing like this until I have everything covered.Rotoscoping James Bond in Nuke.The last part is to check the roto. What I recommend is to check it against a middle gray background (red is good too) as shown in the picture below, so you can check where the roto is out and fix it.Checking the roto.At this point, the roto is done and we are happy with it. Now is time to start compositing.Time to Have FunWhat I do first is to rebuild the render with the render passes I got from the 3D scene. In this case I chose to do it in an additive way as we can see in the picture below.Compositing V-Ray render elements in Nuke.I like to do it this way as I have control over the final look. Once is done this is what we got.Final background image.We need now to color match the background. I like the luminance and saturation from the original shot, so I decided to color correct my background to the original classic look. My advice here is to match black levels, overall luminance and white levels and then go ahead with hue and saturation.Now we merge our hero over the new background.James Bond merged over the new background.It is very important to cast the shadow of our character in the background in order to make the shot realistic.James Bond's shadow added in the background.At this point everything is pretty much done, a couple of final tweaks and we will be ready. That's a WrapBy finishing I like to add some photorealistic touches. First task we need to cover is match grain from the original film. I usually use the node F_ReGrain from Furnace Core tools, because is easy to use and you can achieve great result. Next one is to match chromatic aberration with the original and I also like to add a bit of halation as well.Last but not least I like to defocus the background, soften a bit the black levels of the entire shot and add grain and floating particles.Final image.Shot breakdown.So that’s it, this is the process I have follow to replace the background and create this shot. I hope you’ve enjoyed and maybe learning something new that you could add to your own process. You can check the breakdown in the following link. Thank you very much for reading this. Read more posts by this author Héctor Carcedo VFX Artist.