This was brought up in the Free Topics section, but I thought it may be more useful here. This is a quick breakdown of how I integrate CG objects onto backplate lit by a HDRI in Vray Domelight. I in no way claim that this is the best or correct way, however i seems the simplest to get results commensurate with other render engines. This is not a Perspective Match tutorial, there are plenty of help docs for that. For this example, I downloaded the free scene from HDR-Sets.com, so if you want to follow along you can download it for free. The download will come with everything you need, including pre-aligned cameras with matching backplates. That is why I am using their assets for this.
Step 1: Open 3ds Max, make sure Vray is your render engine, and create a V-Ray Domelight. Open the material editor, and load a VrayHDRI map. Load the HDR map you have, or if you have the free one, it is called "env_domelight.exr". Instance that map into the Vray Domelight texture slot, and make sure the domelight is "Invisible". You may also wish to tick it to Full Dome, but since this is used for lighting only, it is up to you.
Step 2: If you downloaded the free set to follow along, import the .fbx file with default settings. This will import all of the cameras that are already aligned with their corresponding backplates. For this example I am using Camera 17. If you have your own HDRI and Backplates, you will need to align a camera to the backplate using the Perspective Match tool.
Step 3: Press [8] on your keyboard, and load the 3ds Max environment dialog. Copy the HDRI map into the background slot. Also, turn on Vray exposure control, and set it to an EV of -3. This will depend on the HDRI map you are using.
Step 4: Load Camera 17 into 2 viewports, and locate them on top of each other. In the top viewport, press [Alt+B] to bring up the Viewport Config. In the Background tab, change the background for the top viewport to “By File” and locate the corresponding backplate. Close the Viewport Config, and make the lower viewport active. Press [Alt+B] again, and this time, set the viewport background to “By Environment”. This way you will be looking at the HDRI map on the bottom, and the backplate on the top. If the resolution of the environment on the screen is too low, go to the Display Performance tab of the Viewport Config, and set the resolution of the Viewport Background/Environment to something high enough that you can see the HDRI clearly.
Step 5: Load the material editor, and select the HDRI map. Now, watching the two viewports, rotate the HDRI map until it is aligned with the top viewport. You may have to mirror the HDRI horizontally. Once they are aligned, you can disable the background from both viewports if you wish. Now, press [8] again, and switch the environment background from the HDRI to the Backplate, and make sure the backplate is set to environment mapping in Screen Mode. In later versions of 3ds Max, it sometimes switches on you when you apply the backplate to certain slots, so after you move it into the Environment slot, double check it is set to Screen, not Spherical.
Step 6: At this point, you can position your CG objects how you please. In this case, I am using some simple shapes with different materials, for illustration purposes. The cylinder has a chrome shader applied, to illustrate some pitfalls of merging CG object into a backplate, but more on that later.
Step 7: Now, create a plane on the ground to capture the shadows of your CG objects, making sure it is large enough to not clip the shadows. Open the material editor, and create a material that represents how reflective your ground plane should be. This is how Vray handles reflectivity for the ground, not in the MtlWrapper. Then, put that into the base material slot of a VRayMtlWrapper Material. In the MtlWrapper dialog, set it to be a matte surface and also matte for reflection/refraction. Put the alpha contribution at -1, and enable shadows and affect alpha. Next, set the GI contribution to reflect the approximate Albedo of the ground in your backplate. This will affect how much GI shows up in the shadows and any illumination of your matte surface. The default is 1, and if you render it with that setting, you may notice a tone of GI spill on the surface, because that would represent a pure white plane, which is obviously much more reflective for GI rays than most surfaces.
Step 8: Open the Render Settings dialog, and in the Common tab, set the resolution to be that of your backplate. In this case, that is 1080x720, with a ratio of 1.5:1. I will not go into any additional render settings, as the defaults will work, except that we need to set some additional things up in the Environment Tab of the Vray settings.
Step 9: Load the Environment section of the Vray settings, and enable the GI Environment override. Set the color to pure black, and make sure there are no maps in that slot. This is to ensure that the backplate does not contribute additional GI to the matte plane you made, causing it to show up in the render. There are several forum threads here about this topic should you wish to know more.
Step 10: At this point, you could hit render, and the results would be as the first render image. Note, in this first image, I have not changed the GI contribution of the matte plane, which is why you see so much reflection spill around the cylinder. You may also notice that another thing that seems strange. If, like this example, you have a flat plane, or cylinder that has a mirrored surface, you may notice that you appear to be able to see through the object in the reflections. This is due to Vray trying to reflect an environment that is not actually there, if you recall, your backplate is set to screen mode. So, the secondary reflection rays are simply returning the environment, which is just your image. You will probably also be able to see where your matte plane is returning the proper reflections, and then it will be cut off, because, again, the image that the material is reflecting cannot travel off the screen. In order to get around these limitations, in a perfect world, you would have a HDRI that is taken at the exact spot as your backplate, so that when you align them, where the backplate reflection in the matte object ends, your HDRI would pick up. However, this is not always the case, and sometimes you have obvious edges. Depending on your CG element, this may not be a problem, but I wanted to try and explain why you might see this. It is not wrong, just Vray returning the information it has.
Step 11: To correct this, or at least provide a more accurate reflection/refraction, under the Environment section of the Vray Settings, below GI Environment there is a Reflection/Refraction override. If you copy your HDRI map into this slot from the material editor, you will then have the final render as shown. I have also attached the Alpha channel so you can see that you will be able to use this technique for compositing purposes in a more traditional workflow.
That’s it. Again, I am in no way saying this is perfect, and in fact, somebody may chime in with a better way, but for me this works, and at least helps some to understand what things are. It also does not rely on ray-switchers or any other complex workaround, nor does it contain the camera-map-per-pixel map that many dread. It will also return the exact result that you would get if you followed the Corona tutorials for shadow catchers.
Thank you
Step 1: Open 3ds Max, make sure Vray is your render engine, and create a V-Ray Domelight. Open the material editor, and load a VrayHDRI map. Load the HDR map you have, or if you have the free one, it is called "env_domelight.exr". Instance that map into the Vray Domelight texture slot, and make sure the domelight is "Invisible". You may also wish to tick it to Full Dome, but since this is used for lighting only, it is up to you.
Step 2: If you downloaded the free set to follow along, import the .fbx file with default settings. This will import all of the cameras that are already aligned with their corresponding backplates. For this example I am using Camera 17. If you have your own HDRI and Backplates, you will need to align a camera to the backplate using the Perspective Match tool.
Step 3: Press [8] on your keyboard, and load the 3ds Max environment dialog. Copy the HDRI map into the background slot. Also, turn on Vray exposure control, and set it to an EV of -3. This will depend on the HDRI map you are using.
Step 4: Load Camera 17 into 2 viewports, and locate them on top of each other. In the top viewport, press [Alt+B] to bring up the Viewport Config. In the Background tab, change the background for the top viewport to “By File” and locate the corresponding backplate. Close the Viewport Config, and make the lower viewport active. Press [Alt+B] again, and this time, set the viewport background to “By Environment”. This way you will be looking at the HDRI map on the bottom, and the backplate on the top. If the resolution of the environment on the screen is too low, go to the Display Performance tab of the Viewport Config, and set the resolution of the Viewport Background/Environment to something high enough that you can see the HDRI clearly.
Step 5: Load the material editor, and select the HDRI map. Now, watching the two viewports, rotate the HDRI map until it is aligned with the top viewport. You may have to mirror the HDRI horizontally. Once they are aligned, you can disable the background from both viewports if you wish. Now, press [8] again, and switch the environment background from the HDRI to the Backplate, and make sure the backplate is set to environment mapping in Screen Mode. In later versions of 3ds Max, it sometimes switches on you when you apply the backplate to certain slots, so after you move it into the Environment slot, double check it is set to Screen, not Spherical.
Step 6: At this point, you can position your CG objects how you please. In this case, I am using some simple shapes with different materials, for illustration purposes. The cylinder has a chrome shader applied, to illustrate some pitfalls of merging CG object into a backplate, but more on that later.
Step 7: Now, create a plane on the ground to capture the shadows of your CG objects, making sure it is large enough to not clip the shadows. Open the material editor, and create a material that represents how reflective your ground plane should be. This is how Vray handles reflectivity for the ground, not in the MtlWrapper. Then, put that into the base material slot of a VRayMtlWrapper Material. In the MtlWrapper dialog, set it to be a matte surface and also matte for reflection/refraction. Put the alpha contribution at -1, and enable shadows and affect alpha. Next, set the GI contribution to reflect the approximate Albedo of the ground in your backplate. This will affect how much GI shows up in the shadows and any illumination of your matte surface. The default is 1, and if you render it with that setting, you may notice a tone of GI spill on the surface, because that would represent a pure white plane, which is obviously much more reflective for GI rays than most surfaces.
Step 8: Open the Render Settings dialog, and in the Common tab, set the resolution to be that of your backplate. In this case, that is 1080x720, with a ratio of 1.5:1. I will not go into any additional render settings, as the defaults will work, except that we need to set some additional things up in the Environment Tab of the Vray settings.
Step 9: Load the Environment section of the Vray settings, and enable the GI Environment override. Set the color to pure black, and make sure there are no maps in that slot. This is to ensure that the backplate does not contribute additional GI to the matte plane you made, causing it to show up in the render. There are several forum threads here about this topic should you wish to know more.
Step 10: At this point, you could hit render, and the results would be as the first render image. Note, in this first image, I have not changed the GI contribution of the matte plane, which is why you see so much reflection spill around the cylinder. You may also notice that another thing that seems strange. If, like this example, you have a flat plane, or cylinder that has a mirrored surface, you may notice that you appear to be able to see through the object in the reflections. This is due to Vray trying to reflect an environment that is not actually there, if you recall, your backplate is set to screen mode. So, the secondary reflection rays are simply returning the environment, which is just your image. You will probably also be able to see where your matte plane is returning the proper reflections, and then it will be cut off, because, again, the image that the material is reflecting cannot travel off the screen. In order to get around these limitations, in a perfect world, you would have a HDRI that is taken at the exact spot as your backplate, so that when you align them, where the backplate reflection in the matte object ends, your HDRI would pick up. However, this is not always the case, and sometimes you have obvious edges. Depending on your CG element, this may not be a problem, but I wanted to try and explain why you might see this. It is not wrong, just Vray returning the information it has.
Step 11: To correct this, or at least provide a more accurate reflection/refraction, under the Environment section of the Vray Settings, below GI Environment there is a Reflection/Refraction override. If you copy your HDRI map into this slot from the material editor, you will then have the final render as shown. I have also attached the Alpha channel so you can see that you will be able to use this technique for compositing purposes in a more traditional workflow.
That’s it. Again, I am in no way saying this is perfect, and in fact, somebody may chime in with a better way, but for me this works, and at least helps some to understand what things are. It also does not rely on ray-switchers or any other complex workaround, nor does it contain the camera-map-per-pixel map that many dread. It will also return the exact result that you would get if you followed the Corona tutorials for shadow catchers.
Thank you
Comment