包含38節(jié)視頻教程
關(guān)注52.3萬(wàn)次
當(dāng)一個(gè)軟件有新版本的時(shí)候你會(huì)想到:朱峰社區(qū)!當(dāng)你不知道新版本的新功能的時(shí)候:朱峰社區(qū)!當(dāng)你遇到問(wèn)題不好解決的時(shí)候:朱峰社區(qū)!沒(méi)錯(cuò)!新功能!朱峰社區(qū)!
在本教程中,我將指導(dǎo)您完成我們?cè)谏弦黄谥薪5能囕v資產(chǎn)的紋理化過(guò)程,并將其導(dǎo)出到Marmoset工具包 2以為我們的最終渲染設(shè)置一個(gè)場(chǎng)景。 如果你不熟悉Marmoset工具包2,它是一個(gè)實(shí)時(shí)物理基礎(chǔ)渲染(PBR)解決方案,是一個(gè)獨(dú)立的程序。 它主要用于游戲行業(yè),但我想表明它可以與高聚模型一起使用,并提供一些夢(mèng)幻般的圖像實(shí)時(shí)。 它允許我們使用物理正確的表面,結(jié)合HDR照明,給我們一個(gè)真實(shí)感的專業(yè)最終結(jié)果。
In this tutorial I will guide you through the process of texturing the vehicle asset we modeled in the previous issue, and exporting it to Marmoset Toolbag 2 to set up a scene for our final renders. If you're not familiar with Marmoset Toolbag 2, it's a real-time physically based rendering (PBR) solution that is a standalone program. It's mainly used in the games industry to display assets for portfolios, but I wanted to show that it can be used with a high-poly model and provide some fantastic-looking images in real-time. It allows us to use physically correct surfaces that, combined with HDR lighting, give us a photorealistic professional end result.
In 3ds Max, apply an Unwrap UVW modifier to the asset before the TurboSmooth modifier so we're only dealing with the simplified mesh. I use planar mapping for the top and bottom geometry, and apply the Relax tool to smooth out any folds in the UVs that would cause kinks in the texture. I organize the UV islands to maximize the space used for the most important parts of the asset; in this case, the bonnet top would need more space than the underside, so we can have more texture resolution on the visible geometry.
在3ds Max中,將TurboSmooth修改器之前的Unwrap UVW修飾符應(yīng)用于有用的東西,因此我們只處理簡(jiǎn)化網(wǎng)格。 我使用平面映射為頂部和底部幾何,消除任何褶皺的UV會(huì)導(dǎo)致紋理中的扭結(jié)。 我組織了紫外線島嶼,以最大限度地利用資產(chǎn)最重要部分的空間; 在這種情況下,發(fā)動(dòng)機(jī)罩頂部將需要比底部更多的空間,因此我們可以在可見(jiàn)幾何體上具有更多的紋理分辨率。
Tires can be quite tricky to UV map because of the curvature of the wheel. I map the tread of the tire using simple cylindrical mapping and scale it to match the rest of the car. The wall of the tire is more tricky; if you want to apply detail textures to the wall of the tires (such as writing or logos) then we ideally need the wall to be completely flattened out, but the usual projection mapping techniques won't work for us. Instead, we can use the Wrap tools, specifically the Spline Wrap tool. To create the correct shape, use the Edit Poly modifier and select an edge of the wall and loop select to form a circle of selected edges. Then click 'Create Shape' to add a spline that perfectly matches the edge selection.
Now back to the UV modifier. Select the Spline Wrap tool and pick the new spline, use planar mapping, then select and scale the cross-section in the viewport until they just about encompass the wheel. Once you commit the tool, you can then scale and rotate the UV island to fit correctly in the UV space.
輪胎可以是相當(dāng)棘手的UV地圖,因?yàn)檐囕喌那省N沂褂煤?jiǎn)單的圓柱映射繪制輪胎的胎面,并縮放以匹配汽車的其余部分。輪胎的墻更棘手;如果你想對(duì)輪胎的墻壁(如寫(xiě)作或標(biāo)志)應(yīng)用細(xì)節(jié)紋理,那么我們理想地需要墻完全展平,但是通常的投影貼圖技術(shù)對(duì)我們來(lái)說(shuō)不起作用。相反,我們可以使用Wrap工具,特別是Spline Wrap工具。要?jiǎng)?chuàng)建正確的形狀,請(qǐng)使用“編輯多邊形”修改器,然后選擇墻的邊緣并循環(huán)選擇以形成所選邊的圓。然后單擊“創(chuàng)建形狀”以添加完美匹配邊緣選擇的樣條線。
現(xiàn)在回到UV修改器。選擇樣條包裝工具并選擇新的樣條線,使用平面映射,然后選擇并縮放視口中的橫截面,直到它們圍繞滾輪。一旦提交該工具,就可以縮放和旋轉(zhuǎn)UV島,以正確地適應(yīng)UV空間。
Because the shell of the car will be using a paint material, it's best practice to join all these meshes together so they share the same material. This also makes it easier for us to texture on one map later on. Attach all the shell elements that will have the painted material and apply a new Unwrap UVW modifier. You'll probably now have overlapping UVs, so move them all out of the UV space and bring each island back in. Remember to keep the scaling of the outer geometry roughly the same, so that the texture resolution is consistent. Once the UVs are packed into the UV space, continue with the process with the rest of the asset.
因?yàn)槠嚨耐鈿⑹褂糜推岵牧希宰罴炎龇ㄊ菍⑺羞@些網(wǎng)格連接在一起,以便它們共享相同的材料。 這也使我們以后更容易在一個(gè)地圖上紋理。 連接所有具有涂漆材料的外殼元件,并應(yīng)用新的Unwrap UVW修飾符。 你現(xiàn)在可能有重疊的UV,所以將它們?nèi)恳瞥鯱V空間,并將每個(gè)島帶回來(lái)。記住保持外部幾何的縮放大致相同,以使紋理分辨率是一致的。 一旦UV被包裝到UV空間中,繼續(xù)該過(guò)程與資產(chǎn)的其余部分。
In this image you can see I have split the mesh into its individual material IDs, represented here by the different-colored meshes. All the red meshes are going to be the car paint material, purple will be chrome, gray will be the tires, and so on. The reason I've done this is to make the process easier once I'm in Marmoset Toolbag 2. Now when I export this mesh, it's split up and I can apply multiple materials to the asset in Marmoset.
在此圖像中,您可以看到我已將網(wǎng)格劃分為其各自的材質(zhì)ID,此處由不同顏色的網(wǎng)格表示。 所有的紅色網(wǎng)格將是汽車漆材料,紫色將是鉻,灰色將輪胎,等等。 我這樣做的原因是為了使過(guò)程更容易一旦我在Marmoset工具包2.現(xiàn)在當(dāng)我導(dǎo)出這個(gè)網(wǎng)格物體,它的分裂,我可以應(yīng)用多種材料的資產(chǎn)在Marmoset。
With the car paint shell ID selected in the Unwrap UVW window, select Tools > Render UVW template. In the dialog box I change the size to 8192 x 8192 (this is a very large texture in the games industry and should be good enough resolution for our needs). You can adjust this size depending on the element you've selected; I know this element will have text and detail in the texture, so I need it to be higher resolution. Hit 'Render UV Template' and you're presented with an image of the UV space with all our UVs as we unwrapped them. Save this image and we'll bring it into Photoshop as a guide for texturing.
在Unwrap UVW窗口中選擇汽車漆殼ID,選擇工具>渲染UVW模板。 在對(duì)話框中,我將大小更改為8192 x 8192(這是一個(gè)非常大的紋理在游戲行業(yè),應(yīng)該是足夠好的分辨率為我們的需要)。 您可以根據(jù)所選的元素調(diào)整此大小; 我知道這個(gè)元素將在紋理中有文本和細(xì)節(jié),所以我需要它更高的分辨率。 點(diǎn)擊'渲染UV模板',你會(huì)看到一個(gè)UV空間的圖像與我們打開(kāi)它們的所有UV。 保存這個(gè)圖像,我們將它帶入Photoshop作為紋理的指南。
Bring the rendered UV template into Photoshop, duplicate the layer and name it UV. Create a new layer and place it between the UV and the background layers - this will be the car paint base layer. Use the Paint Bucket tool to flood-fill this layer with the color you would like the vehicle to be (in this case, a deep red). Select the UV layer and change its layer mode to Screen, which removes all the black from the image, leaving only the white and green wireframe outlines of the UVs. If these lines are still too distracting, change the opacity to get a level you are comfortable with.
將渲染的UV模板帶入Photoshop,復(fù)制圖層并將其命名為UV。 創(chuàng)建一個(gè)新層,并將其放置在UV和背景層之間 - 這將是汽車漆基礎(chǔ)層。 使用顏料桶工具來(lái)填充這個(gè)層,你想要的車輛的顏色(在這種情況下,一個(gè)深紅色)。 選擇UV層并將其圖層模式更改為屏幕,從圖像中刪除所有黑色,只留下UV的白色和綠色線框輪廓。 如果這些線仍然太分散,改變不透明度以獲得一個(gè)你很舒服的水平。
Using the UV wireframe as a guide, I'm able to draw in white racing-stripe decals that match the curves of the bodywork. I'm also able to precisely place the number text and logos for the rear of the vehicle. I draw in a simple design for the door to match the concept reference. I add a layer of dust to the bonnet of the vehicle just so it doesn't look too clean. I don't want to go too complicated with the diffuse texture as I want the materials to do a lot of the work for us.
使用UV線框作為指導(dǎo),我能夠繪制符合車身曲線的白色賽車條紋貼花。 我還能夠準(zhǔn)確地放置車輛后部的數(shù)字文本和標(biāo)志。 我在一個(gè)簡(jiǎn)單的設(shè)計(jì)中畫(huà)出門(mén)來(lái)匹配概念參考。 我給車輛的發(fā)動(dòng)機(jī)罩添加了一層灰塵,所以它看起來(lái)不太干凈。 我不想因?yàn)槁瓷浼y理而變得太復(fù)雜,因?yàn)槲蚁胍牟牧蠟槲覀冏隽撕芏喙ぷ鳌?/p>
As the trims are mainly a chrome material, the shader will be doing the work, so again it's best not to add too much detail here. I want the exhaust pipes to have a rainbow-colored effect that you sometimes see on sports cars - I thought it would be a nice touch on our vehicle. I add a little dirt and grime on the white suspension caps but keep the detail very subtle. I also add a red trim, just to keep with the color scheme of the vehicle.
由于修剪主要是一個(gè)鉻材料,著色器將做這項(xiàng)工作,所以再次最好不要在這里添加太多的細(xì)節(jié)。 我想要排氣管有彩虹色的效果,你有時(shí)看到跑車 - 我認(rèn)為這將是一個(gè)很好的感覺(jué)我們的車。 我在白色的懸掛帽上添加了一點(diǎn)污垢和污垢,但保持細(xì)節(jié)非常微妙。 我還添加了一個(gè)紅色修剪,只是為了保持車輛的配色方案。
The tires' diffuse texture is mainly a dark-gray, but I paint in subtle shade changes to break it up a little. New tires are usually quite clean, so no need to go overboard with the detail as it may become distracting. I add a white line which again reflects the vehicle's color scheme. I add logos to the wall of the tire, which are the same color as the base tire but with an added drop shadow to give a fake ambient occlusion effect and simulate some depth in the texture. I also add some small black lines to show weld points on the tire.
輪胎的擴(kuò)散紋理主要是深灰色,但我涂在微妙的陰影變化,打破了一點(diǎn)。 新輪胎通常是相當(dāng)干凈,所以沒(méi)有必要去細(xì)節(jié),因?yàn)樗赡軙?huì)分散注意力。 我添加一條白線,再次反映車輛的配色方案。 我在輪胎的墻上添加了標(biāo)志,它們的顏色與基本輪胎相同,但是添加了陰影,給出假環(huán)境遮擋效果,并模擬紋理中的一些深度。 我還添加一些小黑線,以顯示輪胎上的焊點(diǎn)。
The tires' normal map is created by first converting our diffuse texture into a height map in Photoshop. Remove all the shading detail so we have a flat gray background color, because we don't want the variations in color to affect our normal map; it will be quite a smooth surface, and the shading detail would create weird normal map details that'd look really bad in our renders. I keep the lines and logos in the height map but convert them to white, to indicate that they'll be raised above the main tire surface.
輪胎的法線貼圖是通過(guò)首先將我們的漫反射貼圖轉(zhuǎn)換成Photoshop中的高度貼圖來(lái)創(chuàng)建的。 刪除所有陰影細(xì)節(jié),因此我們有一個(gè)平坦的灰色背景顏色,因?yàn)槲覀儾幌M伾淖兓绊懳覀兊姆ň貼圖; 它將是一個(gè)相當(dāng)光滑的表面,陰影細(xì)節(jié)將創(chuàng)建奇怪的法線貼圖細(xì)節(jié),在我們的渲染看起來(lái)真的很糟糕。 我在高度圖上保留線條和標(biāo)志,但將它們轉(zhuǎn)換為白色,以表示它們將在主輪胎表面上升起。
Open the height map in CrazyBump and the software automatically starts to convert the height data into a normal map for us. The default settings aren't what we're looking for, so I turn them all down to zero to begin with. As a further aid, export the wheel from 3ds Max as an OBJ and CrazyBump can import this model so we can see exactly how the normal map will look on our asset. I also apply the diffuse texture. Changing the intensity to 50, 'Fine Detail' to 99 and 'Medium Detail' to 22 gives me the result I want for the tires' surface. I leave 'Larger Details' at 0 because they create edges that are too rounded; they're more used for organic surfaces like rock, but we need a harder edge for the tire details.
在CrazyBump中打開(kāi)高度圖,軟件會(huì)自動(dòng)開(kāi)始將高度數(shù)據(jù)轉(zhuǎn)換為法線貼圖。 默認(rèn)設(shè)置不是我們正在尋找的,所以我把它們都降到零開(kāi)始。 作為進(jìn)一步的幫助,導(dǎo)出車輪從3ds Max作為OBJ和CrazyBump可以導(dǎo)入此模型,使我們可以看到正常地圖將如何看待我們的資產(chǎn)。 我也應(yīng)用漫射紋理。 改變強(qiáng)度為50,'精細(xì)細(xì)節(jié)'到99和'中等細(xì)節(jié)'到22給我的結(jié)果,我想為輪胎的表面。 我將“Larger Details”設(shè)置為0,因?yàn)樗鼈儎?chuàng)建的邊緣太圓; 它們更多地用于有機(jī)表面如巖石,但我們需要一個(gè)更硬的邊緣輪胎細(xì)節(jié)。
Back in 3ds Max, make sure you have all of your elements and material IDs as separate meshes and have the TurboSmooth modifier enabled. Select all of the meshes and convert to Editable Poly, which makes sure that our mesh has no modifiers applied that won't be read by Marmoset Toolbag 2. It's also best to reset the XForms of the assets so that they're all in the correct positions when we import them into Marmoset. Choose File > Export and select FBX as the format, and export the mesh using the default settings. With Marmoset Toolbag 2 open in a new scene, choose File > Import Assets and select the vehicle FBX file. Sometimes you may have an occasion when the asset you've imported is not to scale. If this is the case, select the asset, navigate to the Transform settings, and increase or decrease the scale value (usually by whole numbers) until you have the correct scale.
回到3ds Max,確保你有所有的元素和材料ID作為單獨(dú)的網(wǎng)格,并啟用TurboSmooth修飾符。 選擇所有的網(wǎng)格,并轉(zhuǎn)換為可編輯的多邊形,這確保我們的網(wǎng)格沒(méi)有應(yīng)用的修改,不會(huì)被Marmoset工具包2讀取。最好重置資產(chǎn)的XForms,使他們都在 正確的位置,當(dāng)我們將它們導(dǎo)入麝香。 選擇文件>導(dǎo)出并選擇FBX作為格式,并使用默認(rèn)設(shè)置導(dǎo)出網(wǎng)格。 在新場(chǎng)景中打開(kāi)Marmoset Toolbag 2,選擇“文件”>“導(dǎo)入資產(chǎn)”并選擇車輛FBX文件。 有時(shí),您可能有一個(gè)機(jī)會(huì),當(dāng)您導(dǎo)入的資產(chǎn)不按比例。 如果是這種情況,請(qǐng)選擇資產(chǎn),導(dǎo)航到變換設(shè)置,并增加或減小比例值(通常為整數(shù)),直到獲得正確的比例。
The materials window located on the right-hand side is where we can generate our own custom materials or use the preset ones. Click the 'New' button to generate a blank material that we can now plug our textures into. Rename this material to coincide with the element it will be assigned to (in this case, Shell). Plug the albedo/diffuse texture and the normal map. You have the option to use custom gloss and specular maps, but the sliders are just what we need for the car paint. I give the car paint full gloss and a reduced specular, otherwise the diffuse color will be sucked out of the material leaving a more chrome look. You also have the option to plug in ambient occlusion maps which will require baking from 3ds Max. Marmoset has its own screen space AO solution, but if this is not giving the correct results, a baked solution may be better. To apply a material, just drag it onto the desired element (in this case, the body of the car).
位于右側(cè)的材料窗口是我們可以生成我們自己的定制材料或使用預(yù)設(shè)材料的地方。 單擊“新建”按鈕生成一個(gè)空白材料,我們現(xiàn)在可以將紋理插入。 重命名此材質(zhì)以與將分配給它的元素(在本例中為Shell)重合。 插入反照率/漫反射貼圖和法線貼圖。 您可以選擇使用自定義光澤和高光貼圖,但滑塊只是我們需要的汽車涂料。 我給車漆全光澤和減少的鏡面,否則漫射的顏色將被吸出的材料,留下更多的鉻看。 您還可以選擇插入環(huán)境遮擋貼圖,這將需要從3ds Max烘焙。 Marmoset有自己的屏幕空間AO解決方案,但如果這不能給出正確的結(jié)果,烘焙的解決方案可能更好。 要應(yīng)用材質(zhì),只需將其拖動(dòng)到所需的元素(在這種情況下,汽車的車身)。
The terrain was created in 3ds Max using a plane with a high level of subdivisions. In Editable Poly mode, I use Paint Deformation to push and pull parts of the plane to form sand dunes. I don't go too detailed here, as it would be in the background and out of focus - our attentions should be on the vehicle anyway. I use simple planar UV unwrapping, with a little Relax applied to smooth out the UVs, and apply a tileable sandy texture and normal map in Marmoset to finish it all off. I also add two spotlights for the head lights, and two red point lights for the rear brake lights. These help to pick out some of the details on the terrain, but also shine nicely on the rear of the vehicle.
地形是在3ds Max中使用具有高級(jí)別細(xì)分的平面創(chuàng)建的。 在“可編輯多邊形”模式中,我使用“油漆變形”來(lái)推拉平面的部分以形成沙丘。 我不會(huì)在這里太詳細(xì),因?yàn)樗鼤?huì)在背景和焦點(diǎn) - 我們的注意力應(yīng)該在車上。 我使用簡(jiǎn)單的平面紫外解開(kāi),有一點(diǎn)放松應(yīng)用于平滑紫外線,并應(yīng)用一個(gè)花木沙質(zhì)感和正常的地圖在麝香,完成它。 我還為頭燈添加了兩個(gè)聚光燈,為后制動(dòng)燈添加了兩個(gè)紅點(diǎn)燈。 這些有助于挑選出一些在地形上的細(xì)節(jié),但也很好地照耀在車輛的后方。
One you're happy that all of the assets now have the correct material setup applied, it's time to render the final images. If you select the camera in the scene explorer, you'll see a lot of options are available to improve the rendered image; the post-process settings are very powerful and can dramatically change how the image looks. I'll go into more detail in the Top Tip about the settings I use for this image. You also have camera-specific settings such as Depth of Field, which is great for focusing the viewer's eye on the detail of the vehicle rather than the less-detailed environment; it also gives a sense of realism to the image. The viewport quality by default is half the resolution it can be for performance reasons, but when we render an image we need to increase the resolution to get the best possible render. Change the viewport resolution to 2:1 so it's now double in the Render tab. Finally select Capture and save the image out.
一個(gè)你很高興的事,有利條件現(xiàn)在已應(yīng)用正確的材料設(shè)置,是時(shí)候渲染最終的圖像。 如果在場(chǎng)景資源管理器中選擇相機(jī),您將看到很多可用于改進(jìn)渲染圖像的選項(xiàng); 后處理設(shè)置非常強(qiáng)大,可以顯著改變圖像的外觀。 我將在頂部提示更詳細(xì)地介紹我用于此圖像的設(shè)置。 您還擁有相機(jī)特定的設(shè)置,如景深,這非常適合觀眾的眼睛聚焦在車輛的細(xì)節(jié),而不是不太詳細(xì)的環(huán)境; 它也給圖像的現(xiàn)實(shí)感。 默認(rèn)情況下,視口質(zhì)量是性能原因的一半,但是當(dāng)我們渲染圖像時(shí),我們需要提高分辨率以獲得最好的渲染效果。 將視口分辨率更改為2:1,因此現(xiàn)在在“渲染”選項(xiàng)卡中為兩倍。 最后選擇捕獲并保存圖像。
朱峰社區(qū)網(wǎng)頁(yè)版(手機(jī)掃描-分享-添加到屏幕)
朱峰社區(qū)微信公眾號(hào)(微信掃一掃-關(guān)注)
未知用戶
2005-2024 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號(hào)-1
2005-2024 ZhuFeng Community All Rights Reserved
VIP