返回列表 回复 发帖

配合3dsmax和Vray使用HDRI

'Using HDRI Maps with V-Ray and 3ds Max'--配合3dsmax和Vray使用HDRI
'Using HDRI Maps with V-Ray and 3ds Max'

by HDR Mill

原文链接:http://www.3dtotal.com/team/Tutorials_3/using_hdri/using_hdri_01.htm


For most of my rendering work, I use 3ds max 8 and V-Ray 1.5. Although Mental Ray, Brazil, and finalRender all support rendering with HDRIs, I have found V-Ray to be the most intuitive and manageable. However, I will be writing tutorials in the future regarding the use of HDRIs with all the major rendering engines.
(在我的大部分渲染工作中,我使用3dsmax8和Vray1.5。尽管Mental Ray,Brazil和finalRender都支持HDRIs,但我觉得vray是最直观,最易管理的。但是,我将在不久后考虑编写在所有主流渲染引擎中HDRIs的使用教程。)

So let’s get started. First, create or import the model that you would like to render. In our case we went to www.turbosquid.com and downloaded a free model of an F-5E Tiger II (a model from the www.meshfactory.com collection - a great resource). The next thing we need to do is create an invisible ground plane onto which our object's shadows can be cast, and from which our object can receive additional reflected light. The "VRayPlane" is the perfect primitive for this job. It will stretch to infinity when rendered, while only taking up a small amount of space in the viewport.
(让我们开始吧。首先,创建或导入一个你准渲染的模型。就我而言,我到www.turbosquid.com 下载了一个免费的 F-5E虎Ⅱ型战斗机的模型(一个来自www.meshfactory.com 集合的模型)。下一步我们要做的是创建一个不可见的地面以接受物体投射的阴影,我们的物体也能因此接受来自地面的反光。“vrayplane”是充当这一角色的绝佳人选。渲染时它会无限延伸,但在视窗里只占一小块空间。)



Under the Create tab's Geometry section, choose VRay from the drop-down list. Select the Object Type called VRayPlane. Click near the origin in your viewport and you will see a small square plane with a vertical arrow at its center. This visible object actually represents a plane that extends in all directions to infinity. The plane resizes as you zoom in and out of the view, and always appears to be the same size. Right-click on the VRay Plane and select V-Ray Properties. In order to make this primitive work for us, we will need to change a few settings:
(在创建面板的几何体栏,从下拉菜单选择vray。选中名为VrayPlane的物体类型。在靠近视窗原点的地方单击,你将看到一个小的方形平面。这个可见物体实际上代表着在所有方向都无限延伸的一个平面。这个平面随着你缩放视图而变化,并一直保持着相同的大小。右击VrayPlane,选择Vray属性。为了让它按我们想的那样发挥作用,我们需要修改一些设定。)


I occasionally reduce the Generate GI setting if the VRayPlane is reflecting too much light on the underside of my model. Do this if you need to, and then close the dialog. Although this object is invisible in your renderings, it will still reflect light. For this reason, it is a good idea to assign a material to the VRayPlane that is similar in color and reflectivity to the ground above which your model "appears" to sit in relation to its environment map or background plate. In our case we used a dull grey to imitate the carrier flight deck.

(如果vrayplane反射了太多的光线到模型的底部,我就需要降低产生GI的设定。如果需要的话就这么做,然后关闭对话框。尽管这个物体在渲染中是不可见的,但它仍将反射光线。因此,你最好给vrayplane指定一个跟模型所在的环境背景地面相近颜色和反射的材质。在此,我用了一个深灰色来模拟飞行甲板。)

Next, we need to go to the Render Scene dialog and make sure that the VRay renderer is selected under the Assign Renderer rollout. Then, under the Renderer tab in the Global Switches section, turn off "Default Lights". Then, change the GI settings as follows:
(下一步,我们需要进入渲染场景对话框,确保在指定渲染器一栏选择使用的是vray渲染器。然后在渲染面板的全局控制一项中,关闭“Default Lights(默认灯光)”。然后,按下图更改GI设置。)

For test renders, you will want to set your Irrandiance Map preset to Medium and HSph. subdivs: to 20. The key here is to make sure that you have turned on your GI. Otherwise, the HDRI will not be able to contribute light.
(为了测试渲染,我们将采用光子贴图的中等预设值,HSph. 细分为20。这里的关键是确保你打开了GI,否则,HDRI无法提供灯光照明。)

Now that the scene is prepared and the basic lighting parameters are set, we will finally start to work the the HDR image. The first thing we need to do is assign our HDRI to the GI Environment and Reflection/Refraction Environment Override slots:
(现在,场景已经准备好了,基本的灯光属性也设置好了,我们终于要开始对HDRI图像进行工作了。首先要做的是将我们的HDRI指定到GI环境和反射折射环境的样本槽中:)


Turn on both the GI Environment override, and the Reflection/refraction Environment override. Click on None in the map slot for the GI Environment and select VRayHDRI as the map type. Drag an instance of this map to the Reflection/refraction map slot beneath it. Now, in order for us to be able to manipulate this map, we will need an instance of it in the Material Editor. Drag from one of these two map slots to an empty material slot in the material editor. Click on the Browse button for your new map, and navigate to the HDR image that you would like to use. Now you will see a thumbnail of your HDRI map, as well as a number of new parameters to work with.
(打开GI环境控制和反射折射环境控制。单击GI环境右侧的NONE 贴图样本槽,然后选择VrayHDRI贴图类型。将这个贴图拖动关联复制到下面的反射折射贴图样本槽。现在,为了能操控这个贴图,我们需要它在材质编辑器中的一个实例。拖动这两个贴图样本槽中的一个到材质编辑器里的空材质球上。点击你新贴图上的浏览按钮,找到你要使用的HDRI图像。现在你将看到你HDRI贴图的一个缩略图,以及一些新的属性。


The first thing you will need to do if using the Rectilinear/Spherical style HDRI map employed by HDR Mill is to select the Spherical environment map type. The next item to address is the Gamma setting. Depending on the method of image capture, some images will look fine at the default 1.0 gamma setting, while others will look dark and oversaturated. If your image appears incorrect, then its gamma has not been pre-adjusted for viewing on monitors. The setting of 2.2 is the typical correction used for viewing these images in monitor color space.
(如果你要使用的是通过HDR球制造的直线或球面类型的HDRI贴图,你要做的第一件事就是选择球面环境贴图类型。下一个要修改的项目是Gamma值的设定。依据获取图像方式的不同,一些图像在默认的1.0设置下表现的很好,但也有些看起来欠曝或是过曝。如果你的图像显得不合适,那就是你的gamma值没有依据监视器上的表现进行校正。在监视器的色彩空间里,为了观看这些图片,将它设置为2.2是一个典型的校正使用。)
Now, if you do a quick test render you will see that your model is nicely lit, but that the background is still your default Max environment color. We could simply drag an instance of the HDR image from the material editor into the Environment Map slot of the Environment dialog. However, in order for the background map to look decent, you would need to use a very large hdr image. This would consume a large amount of your computer's resources, and slow down the rendering process. Instead, we can use a larger low dynamic range (ldr) image such as a .jpeg to fill this slot. This ldr image will usually be a tonemapped version of the hdr image, but with higher resolution.

(现在,如果你做一个快速的测试渲染,你将看到你的模型是漂亮的浅灰色,但是背景还是默认的max环境色。我们要简单的从材质编辑器里将HDRI图像拖动关联复制到环境对话框里的环境贴图样本槽中。但是,为了让背景的比例合适,你需要一个非常巨大的HDRI图像。这将消耗你计算机大量的资源,拖慢渲染的进程。取而代之,我们可以使用一张大的低动态范围图像(IDR),利润.jpeg图像来填充这个样本槽。这个IDR图像通常将是HDR图像一个有相同色调的版本,但有更高的分辨率。)

Go to your Rendering>Environment dialog and click on "None" in the map slot. Choose Bitmap map type and navigate to the regular image that matches the scene in your hdr image. Then, drag an instance of this map from the Environment map slot to another empty material slot in your Material Editor (select "instance" when prompted). In this new material's Coordinates rollout, make sure and select Environ mapping, and Spherical Environment type.
(进入你的渲染》环境对话框,然后单击贴图样本槽中的“None”。选择位图类型,浏览到匹配你HDR图像场景的普通图片。然后从环境贴图样本槽拖动它关联复制材质编辑器里一个空的材质球样本槽上(选择“instanse)。在新的材质坐标卷展栏,确保你选择的是环境贴图,并且是球型环境类型。)

Now, if you are using an hdr and ldr of the same scene, you would expect the two respective thumbnails to match. They do not, so go into the Parameters rollout for your VRayHDRI map and enter a horizontal rotation of 90 degrees. This rotation amount works nine times out of ten, however, if it does not, you may have to experiment a little.

(现在,如果你正在使用同一个场景的HDR和LDR,你会期望他们各自的缩略图能匹配上。但是他们不会,所以进入你VrayHDRI图像的属性卷展栏,然后键入90度的水平旋转角度。这个旋转数量按10的9被五来计算,如果不是这样,你不得不一点点的尝试。)
If you do another render, you will see that the lighting on your model very closely matches the lighting of your background environment. You may find that your model appears to be unnaturally placed, such as having a car sitting in a treetop. You will need to rotate, pan, and tilt your camera around your model to get a good match between your background map and your model. The easiest way to do this is to go to the Views menu and select Viewport Background.
(如果你再次渲染的话,你会发现模型上的照明跟背景环境的光线非常接近。你也许会发现你的模型显得有些不自然,像一辆小汽车停在树梢。你需要旋转,移动,倾斜你的摄像机,以便让你的模型更好的匹配背景图像。简单的方法是进入视窗菜单,然后选择视窗背景。)



Using the settings above, the background of your perspective viewport will show the ldr environment map. In this way, you will be able to see your models relationship to the background in real time, and adjust camera position accordingly.  
(使用上图的设置,透视图中的背景将显示环境图片。用这种方法,你可以实时看见你的模型跟背景之间的关系,并据此调整摄像机的位置。)

One issue with hdri lighting is that when using a background scene taken in full sun, the hdr lighting appears to be too dim. This is caused by the fact that the sun is up to seventeen stops brighter than the rest of the sky. It is extremely difficult to capture an hdri with such a broad range of light. Another issue is that hdr images do not cast hard shadows. Fortunately, there is a simple solution to both of these issues, if you don't mind cheating a little. The use of a direct light with a low multiplier and hard VRay shadows, positioned to match the sun in the hdr image, will solve both issues with little effect on the realism of the output. The hdr will still provide most of the direct light and all of the reflected color from the image, and the direct light will provide the hard shadows and the extra direct light for added realism. In addition, you can use the Multiplier in the VRayHDRI maps rollout to increase the level of light added by your hdr map to the scene. I hope this is helpful. If you have any usage tips that you think would add value to this tutorial, please email them to info@hdrmill.com.

(使用HDRI照明的一个问题是当背景场景是在烈日下采集时,HDR会显得过于黯淡。这是因为太阳要比天空中其他地方至少亮17倍。要在如此宽广的亮度范围采集HDRI是非常困难的。另一个问题是HDR图像无法投射硬阴影。幸运的是,有一个简单的方法来解决这两个问题,如果你不介意欺骗观众一点的话。在HDR图像太阳的位置上,使用一个低强度的平行光,投射硬的Vray阴影,就可以在轻微影响真实度的情况下解决这两个问题。HDR仍然提供主要的直射光线,和所有图像中的反射色彩,而平行光则提供硬阴影和额外的直射光线。另外,你可以使用VrayHDRI贴图卷展栏中的倍增值来提高HDR图像提供给场景的亮度级别。我希望这对你有所帮助。如果你有任何意见或建议,请email至info@hdrmill.com。)

If you would like to add this tutorial to your website, please give us proper credit and a link to www.hdrmill.com. Thank you.
(如果你希望添加这篇教程到你的网站中,请给我适当的报酬,并链接到hdrmill.com,谢谢。)

The Staff at HDR Mill.  

来源:译文3D网
不错不错
返回列表