Compositing V-ray Render Layers inPhotoshop
在Photoshop里合成vray输出的元素图
作者:Ahmed Fathi
#8@o%%Fd 教程来源:http://cg.tutsplus.com/tutorials/chaos-group-vray/compositing-v-ray-render-layers-in-photoshop/ MkX=34oc^ 感谢人家写了这么好的教程
W$Sc@!M3{
M3Oqto<8" RJ OW#e : 5]~451 Twice a month we revisit some of ourreader’s favorite posts from throughout the history of Cgtuts+. Today we’retaking a look back at Ahmed Fathi’s tutorial on compositing Vray render layersin Photoshop. This tutorial was originally published back in July of 2010, andgenerated a lot of interest. So if you missed it the first time, why not checkit out now.
LsO}a;t5 一直以来,Cgtuts+每月都会有两次回顾读者最感兴趣的帖子。今天我们来看一下Ahmed Fathi的vray 分层渲染并在ps中合成的教程。这个教程最早发布于公元2010年7月,并且引起了很多人的响应。所以,如果你错过了第一次,这次为什么来细细研读呢? ;"|QW?>$D T(
fcE
ip!-~HNwJ In this tutorial Ahmed Fathi takes a lookat how to composite together V-ray render layers using blending-modes and masksin Photoshop. Once completed, this process allows you to change or tweak anyaspect of your image in seconds without having to re-render a thing!
Ahmed also covers a few extra post production techniques suchas Chromatic Aberration and Depth Of Field, as well as how to emulate aCross-processed look. P7\?WN$p
在这篇教程里演示如何将渲染的图层通过Photoshop的图层混合模式、蒙版来合成。一旦渲染完成,你就能分分钟改变或调出你想要的任意结果,而不用重新渲染! CN:z
*g OJ r~iUr
ZQ{-6VCjl Step 1
^.PCQ~Ql As this is a compositing tutorial, not alighting/rendering tutorial, I’ll assume that you have at least a basicknowledge of V-ray, and that you are able to render out your own scenesalready. We’re going jump straight ahead into setting up the different renderelements for the compositing process.
5i+cjT2 In order to make V-ray render out thedifferent layers, we first have to enable them in the V-ray Render Elements tabwithin the Render Settings window. Once in the tab, we want to enable thefollowing render elements as shown :
9;NXzO27 dozC[4mF 这是一个合成教程,而不是灯光或者渲染教程,我假设你有基本的vray知识,并且能渲出你的场景。我直接跳到如何设置vray元素以用于接下来的合成过程。 quRTA"!E 为了能使vray渲染出不同的元素图层,先得在vray渲染设置窗口的Render Elements选项卡启用各个元素,设置如下图 QD%!a{I VrayDiffuseFilter漫反射滤光器 Ub/ZzAwq VrayMtlID材质ID p>B-Ubu VrayObjectID对象ID N(V_P[]"*, VrayRawGlobalIllumination Raw全局照明 w[C*w\A\M VrayRawLighting Raw光照 RL3*fRlb VrayRawShadow Raw阴影 .><-XJ VrayReflection反射 zwz_K!229 VrayRefraction折射 v3]5`&3~ VraySpecular高光 7ug"SV6Hb and VrayZDepth.景深 YmOj.Q& Up6OCF
r)#W`A1{A
L^*f$Balz bv VkN Most of these elements don’t need much work to getthem right, but we are going to need to take a few steps to set up theVrayMtlID, VrayObjectID and VrayZDepth layers.
JJmW%%]i 其中的大部分vray 元素默认设置就能得到不错的元素图,但其中材质、对象ID、景深元素还是需要我们做些工作滴! O-[ 3n)$\aBE
*5.wwV Step 2
mt$rjk= We’ll start with the VRayZDepth element.The ZDepth layer is a black and white map that is used to tell Photoshop howfar each object in our scene sits away from the render camera – the further theobject is from the camera, the darker it will appear in the Zdepth layer.Typically the Min value is used to tell the compositor which objects will be infocus.
ar#73f In order to correctly setup a Zdepth map,we have to adjust the Min & Max distances that V-ray should calculate, andtherefore what appears as white (the Min value) and black (the Max value)within our scene. Select the VRayZDepth item in the elements list. At thebottom you’ll see the zdepth min and zdepth max values we need to adjust.
n}_}#(a 我们从VRayZDepth 元素开始。ZDepth图层是用灰度表示场景中的物体离渲染摄像机的距离,颜色越白离相机越近。为了vray能正确计算景深图,需要测量你想表现景深效果的远近。从元素列表选择ZDepth,在底部有景深最小值和最大值参数,需要你调整。 Vjs'|%P7 Li]96+C$}
`g3AM%3 q&J5(9]O|L Step 3
3>^]r jFw To get a sense of what values you shoulduse for the min and max values, you should use a tape helper object to measurethe distance between the camera and your closest and furthest objects.
,dR.Sacv To simplify things, let’s say sphere #2 in theimage below is the closest sphere we want to be in focus, whilst Sphere #6should be slightly out of focus. We would use two tapes to measure thosedistances and put them in as your Min & Max Values.
a#"orc j 为了得出场景合适的景深最小值和最大值,你会用到helper里的tape对象来测量最近,最远,以及相机之间的距离。 Q"C*j'n 简单起见,下图2号球我们想要它在焦里,并且是最近的(再近一点就会模糊的那种效果),同时6号球是最远的,有一点点出离焦(这一块照着英文意会吧,没译好)。然后用两个tape测量它们之间的距离,以作为min , max值 `WN80d\)& X!K> .r_Dg
Yi?bY
Bh'fkW3
_%=CW'
B n|)((W
uR
:EH.K 上不了图了。。照着原网页看图吧 Y4HN1 9Z!n!o7D
Z::I3 Q Step 4
H^*AaA9- Here’’s what the VRayZdepth render for thiscomposite looked like after setting the Min to 20 and Max to 70 meters
j=irx5: 本例中的值大概min:20 max:70米(是说房子的场景,不是上图的六个球) 9>w~B|/
TPJF?.le
'
u_$4xNmQ UgGa]b[9A Step 5
aE5-b ub c The VrayMtlID render layer creates an imagewith a different solid colour for each material in your scene, and to use it,we need to adjust your material IDs. In your material editor you will find anicon with the number 0 on it (as shown below.) If you click the 0, a grid ofnumbers from 0 to 15 will appear – this is your material ID. Go through yourscene and apply a different number to each material you want to have adifferent color in your MtlID element. As we have 16 numbers, we can have 16different materials appearing in our MtlID render layer.
Bk~C$'x4 材质ID图层是由场景中各种材质对应的实色组成,为了能适用,需要调整材质ID,材质调板上有个0的图标,按下后有个0-15的网格显示出来,这就是材质艾迪。检查场景中的材质,并赋予不同的材质ID,16个数字对应16个不同的材质。 XqmB%g(
?d-w#<AiV
S4_/%~? FSA%,b;U
#
-luE Step 6
b!@PS$BTxq Here’’s how your VRayMtlID element would look likeafter setting up the ID’s for each required material. Your result may have different colors,but the important thing is that they are separate from one another.
>n09K8
A 最终分配了材质ID的元素图会像下图。你得到的成图也许颜色和本案中有所不同,但重要的是,不同材质的物体已彼此分开。 88osWo6rG )*]A$\Oc[
{oqbV#/& =%7drBo D
6]?%1HSi Step 7
*,$5EN VRayObjectID element is just like materialIDs element mentioned above, but it outputs a different colour based on thedifferent objects in your scene – the Materials are irrelevant to it. To setthis up, right click your desired object, select Object Properties and giveeach object a different number in the Object ID field in the G-Buffer section.
F<I*?${[ 对象艾迪元素和上面的材质艾迪类似,对象艾迪的不同颜色是基于场景中不同对象输出的,材质都无关紧要。配置,右键对象——对象属性,在G-Buffer框的材质艾迪上给出不同的数字。 ]#]Z]9w ur}'Y^0iR
\l:R]:w;ZI =
J;I5:J
<!sLfz? Step 8
^L2d%d\5 I only needed to use the VRayObjectIDelement in order to make selecting the cars and the surrounding buildingseasier in post. Here’’s how it looks after rendering.
2PlhnU Q7 我用对象艾迪只是为了能更方便地选出车辆以及周围的建筑。下面是渲出的对象艾迪图 MIZdk'.U l}uZxKuYx
RTc@`m3 M
>N |?>M*
U T\4Xk< Step 9
\V$qAfP) The last element we need to add in is theambient occlusion layer, but as you’ll remember, this wasn’t added to ourrender elements list in V-ray. We actually need to render it separately afteryour initial render has been completed, but don’t worry, there is an easy, fastway to do it!
'.bf88D Apply a VrayLightMtl to your entire scene,and then add a VrayDirt map into the color channel. You’ll then need to go inand tweak the dirt map settings until you get a good, clean result result. Forthis scene, I got a nice looking AO map with a Radius of 2 in my dirt mapsettings.
\\dUp>1= Note: if you use a V-ray Physical Camera inyour scene, (which I highly recommend,) you will need to turn off your Exposureand Vignette options in your camera settings in order to render the AO passproperly.
* 1;4&/93o 最后添加的元素是环境阻塞层,(用AO插件吧,这不译了) Q6HJ+H-Ub 'OA*aQ=K
E]mm^i`|
eNd&47lJ M^Sa{S*? Step 10
kkjugm{D7 After a couple of trials with the dirt mapradius, I ended up with the following AO element. I also increased the dirt mapsubdivs from 8 to about 64 which helped to smooth out the final render, and itstill rendered out relatively fast.
}nlS&gew^ 经过几次不同的污垢半径尝试,我完成了AO 元素,我也将细分从8增加到64来得到更平滑的的结果,AO出图还是很快的嘛 )h}IZSm
=^KgNQ
8s)b[Z5 p^8a<e?f~f
'{ _ X1 Step 11
_f^6F<! Just a couple more steps and we’ll be readyto fire up Photoshop and start compositing! But first, how do we get all ofthese elements out of V-ray? For starters, there is the obvious way of savingthem to file one at a time, however there are infact two techniques used forsaving the different channels to disk and we’ll cover both of them in the nextfew steps.
>`AK'K8{M The first method is really helpful,especially for those who use a Linear Workflow, and that is saving all therender elements out into a single .EXR file. To do that you should first selectEnable built-in Frame Bufferfrom the V-Ray::Frame buffer menu, and then turn onthe “Render to V-RayRaw image file option ”below. With that done, we can click browse.
(,h2qP-;ud 仅仅几步,我们已经准备好启动PS开始合成啦!但是,怎么得到这些vray渲出来的图形文件呢?(接下来就是说通过几步设置,使渲染完成后的图像自动保存到预先设定的磁盘位置上) 7W)W9=&BT
|`o|;A]
>=0]7k; 0#WN2f, <:
^.6yzlY Step 12
ID_4M_G Browse to the place where you want to saveyour file, and enter your file name making sure to add the .EXR extension ontothe end of it. Then select All Files(*.*) as your file type. This will allowyou to save your render as a single .EXR file that contains all your differentrender layers.
\#,2#BmO"E If, however, you try to open your new .EXRfile in Photoshop, you will only see the first render layer. To see the others,you’ll need to install a commercial Photoshop plug-in called ProEXR, and thatis why I prefer the next method!
\8xSfe Note: EXR files burn in any gammacorrection as it assumes you’ll be using a linear workflow. If your imageappears washed out in Photoshop, go to Image > Adjustments > Exposure,and set your Gamma to 0.454, which is the inverse of 2.2 (calculated bydividing 1.0 by 2.2).
\x-2qlZ (这是作者介绍的一个方法,保存成.exr文件,PS读取.exr文件还需要一个ProEXR的插件,貌似收费,作者下文还介绍了一个他首选的方法——Split render channels。) d3c.lD)L9 (}39f
d}Pfj=W
DT`HS/~fH
<J<"`xKL Step 13
qj;i03 +@ The second method (my preferred one) is tosave all your elements out manually as .TGA files. I prefer TGAs to JPGs asthey are 32-Bit, and can hold much more color Information than the normal 8-BitJPG file. Another bonus is that they support having a built-in alpha channe.
K[icVT2v~ Note: if you have never used the V-RayFrame Buffer to render out elements before, you can find all of your elementsin the top left drop down menu that says Diffuse by default.
xeFx!$3 第二种方法(我的首选)是不用再处理的保存方法,像tga文件,jpg和tga我更喜欢tga的原因时32位的tga能保存更多8位jpg不能保存的信息,另一个原因是tga能保存alpha通道。 P4#i]7%
v;\cM/&5
zwV!6xG Note: :%h1Q>F 4*}&nmW
>
'=QBW Step 14
;D~#|CB Now that you have finished our
3Ds Max andV-Ray Part, fire up Photoshop and let’s start playing! First a small tip to help you get all of thedifferent files into layers in one Photoshop document. It is a script builtinto Photoshop that will stack your files as layers and arrange them inalphabetical order. Go to File > Scripts > Load Scripts as Stack, andthen browse for your files, select them all and click Ok. Some people preferbringing in the elements one at a time, however I do prefer this method myself.
=H)]HxEEM 既然咱已经完成了3ds max和vray部分,那就启动Photoshop,一起摇滚吧! w8X5kk
先说一个小窍门帮助你将所有不同的文件用Photoshop打开成一个文件。这是Photoshop的一个自带脚本,将所选的文件以图层的形式并按名称升序排列。 vSHPN|* 步骤:文件>脚本>将文件载入堆栈,然后浏览你需要载入的文件,选择并点击确定。当然,一些人喜欢逐个载入这些文件,但我还是喜欢我的这方法,嘿嘿 Gl>\p i975)_X(
?L0;,
\-t
fJr
EDj4( o:{Sws(=
5)< Y3nU~ Step 15
x[lIib1s This is actually your first step incompositing! We’ll start by turning off the visibility on all layers except forthe Z-Depth. Select all of the contents of this layer (Ctrl+A), copy them(Ctrl+C) and then switch to your Channels tab.
\C$e+qb~{ Some people prefer adding a little bit ofGaussian blur to their Z-Depth before using it, however as most of my clientshate DOF, thinking that it’s a needless loss of detail, I do not do this! Inthe end it is a matter of personal preference.
MtL<)?HQ 这才是合成之路的第一步!首先关闭除ZDepth以外的所有层。Ctrl+a选择这层的所有内容并复制,然后粘贴到通道去。 qfXt%6L 一些人的做法是给ZDepth通道图一点高斯然后再用它,然而我的大部分客户不喜欢景深,认为那会造成细节的不必要损失,我不能这么做!最后,它(DOF)是种个人爱好。 XB!qPh. 02Vfg42
h rSH)LbJ
f#&z