原文:http://www.mrbluesummers.com/3510/3d-tutorials/3dsmax-mental-ray-sub-surface-scattering-guide/2
最近用到次表面散射,
但是一直沒有對它有認真的研究,
然後中文的資料,
小弟不才真的沒有看到太多有完整介紹的,
只有看到陰文的,
這篇解釋滿多又附圖,
可惜是它是陰文,
除了毒品,
陰文也殘害不少華人,
所以我要用我的破陰文來幫忙它變成偉大的正體中文,
開始....
In this epic tutorial we're going to take a deep look at how you can use mental ray's Sub-Surface Scattering (SSS) tools in order to make your renders more realistic. This technique is often misused, misunderstood, and- if implemented wrong- can seriously affect your render times. After reading this tutorial you'll walk away with a broad understanding of both the concepts behind SSS and how to implement it effectively in 3d Studio Max and mental ray.
在這篇偉大的教學中,我們將會仔細探討您要如何使用MR的SSS(次表面散射)工具以便您算出更真實的作品.這項技術很常被錯誤的使用跟不正確的了解,而且錯誤的使用會嚴重的影響您算圖時間.再看完這篇教學,您可以比較輕易的廣泛了解SSS的概念和在3dsmax中更有效的去使用MR製作SSS材質。
I'll be explaining things from the perspective of a beginner/intermediate user. You should know what mental ray is, how to enable it, and how to create new materials. I'll provide you with downloadable source files along the way so you can have a starting point.
We'll begin by getting a strong understanding of what options are available in the 3dsMax implementation of mental ray, followed by detailed guidance on each material and shader type. Finally we'll put these concepts into practice by manipulating renders step-by-step.
作者會用初學與中級使用者的角度去解譯,您將會了解MR是什麼、如何使用它,還有如何創建新的材質.作者也提供教學素材檔案下載.
我們將會了解3dsmax提供哪些MR的選項給我們使用,跟著材質教學,最後我們把這些觀念一步一步的加入在實作上。
In part 1 of this tutorial we'll discuss
Then, in Part 2 of this tutorial we'll discuss
You can download my starter scene here, though I'm not including the texture files because they're copyrighted so you may get an error message. Any complex materials I create will be provided through a scene file, too.
在part1的教學我們將會討論
什麼是sss材質
fast sss材質 和 fast sss skin 材質
然後 part2我們討論
sss physical 材質 和 parti-volume材質
您可以從上面download my starter scence here的連結下載教學檔案,
但是檔案沒有包含貼圖,因為有版權問題,所以當您打開檔案的時後可能會出現錯誤,
一些複雜的材質,作者也會透過這個檔案,提供您如何創建
What is Sub-Surface Scattering
什麼是 "次表面散射 SSS "
If you're already familiar with what SSS is you can safely skip this section.
Wikipedia really does the best job of explaining what subsurface scattering is:
如果您己經熟悉什麼是sss,您可以跳過這個段落,
維基百科己經對sss材質有很好的解譯了。
Subsurface scattering (or SSS) is a mechanism of light transport in which light penetrates the surface of a translucent object, is scattered by interacting with the material, and exits the surface at a different point. The light will generally penetrate the surface and be reflected a number of times at irregular angles inside the material, before passing back out of the material at an angle other than the angle it would have if it had been reflected directly off the surface. Subsurface scattering is important in 3D computer graphics, being necessary for the realistic rendering of materials such as marble, skin, and milk.
SSS主要的原理是光穿透帶有一點透明物件表面的光傳遞,
散射是基於材質與光的作用,再不同的地方透出表面,
光通常穿透表面和反射不同角度的內部材質,
再回傳某個角度次表面材質回來之前,會先反射最直視的材質,
3s對3dcg來說很重要,
尤其是在計算真實的材質像大理石、皮膚、年奶等
You've probably seen this effect before- like when you hold a flashlight over your fingers or the sun shines through your eyelids. The light travels through your skin and gets scattered, taking on a reddish color.
When enabled in a render it can have a subtle but dramatic impact on how your renders look. Direct light sources will shine light on your object and, when configured correctly, mental ray will be able to scatter and color that light the same way that light would behave in real life. Consider the images below.
在之前您應該己經看過類似的效果,當手電筒光穿過手指頭或太陽光穿過眼皮,
當光穿透您的皮膚和散射出一點微紅色.
當使用3s算圖時,它會在外觀產生微妙而巨大的影響,
光源直接將照在你的物件上,並正確設置時,
mr能夠真實的表現在現實生活中的樣子。
看看下面的圖片。
What Sub-Surface Scattering Options Are Available
次表面散射有什麼選項可以使用
mental ray in 3d Studio Max 2009 has four material-based sub-surface scattering modes and one 「faked」 mode. These are:
max2009的mr有4種基本sss模式與一種「假的」sss模式
- SSS Fast Material
- SSS Physical Material
- SSS Fast Skin Material
- SSS Fast Skin Material + Displace
- Parti-Volume Material
For the purposes of this tutorial, we'll be considering the SSS Fast Skin Material and the SSS Fast Skin Material + Displace as virtually identical. They're only differentiated by the ability to add a displacement map. Examples of each are shown below at default settings appropriate for the scene size. We'll go over material settings later in this tutorial.
在這個教學中, 將會考慮到Fast Skin Material 和 SSS Fast Skin Material + Displace
基本上是一樣的,下面每個測試的範例都是默認設置的場景大小,
我們將會在教學中複習材質的設定.
Sub-Surface Scattering Examples
A Deep Dive into the SSS Fast Material
深入sss fast 材質
Let's begin with the simplest SSS material- the SSS Fast Material. I'll use a gradient ramp, a rainbow map, and a single render to demonstrate the effect of various parameters. Note that I won't render all of them because many of these parameters have to be pretty extreme in order to change the render. Besides, 99.9% of the time you won't have to alter parameters like Lightmap size or Falloff strength.
那我們先從sss fast 材質開始,我將用gradient ramp貼圖與彩虹貼圖, 和渲染各種參數所代表的效果,我不會渲染每一個參數,有些參數對渲染的影響相當極端的,而且大部份時間您不會去修改像lightmap size 或 falloff strength等參數
Parameters that take color maps- like unscattered color- will be tested using the 「rainbow map」 you see along the bottom of the image below. Parameters that take numerical maps- like front-surface scatter weight- will be tested using the 「black-to-white」 gradient ramp above the rainbow map. Wherever I state values below an image, it's referring to the gradient ramp and is read from left to right. I.E. 「Values are 0.0 to 1.0〞 means that the left side of the image is 0.0 and the right side of the image is 1.0.
使用顏色貼圖的參數像unscattered color 將使用「rainbow map」來測試,您看到下圖的底部,使用數質貼圖參數像front-surface scater weight 就使用「black to white」 gradient ramp貼圖來測試,無論他的狀態值,左到右值是0.0到1.0,表示圖片的左側是0.0右側是1.0。
SSS Fast Material Parameter Definitions
快速次表面散射參數定義
Below are definitions for each parameter in the SSS Fast Material rollout.
SSS Fast Material (mi) Parameters
The SSS Fast Material (mi) Parameters give you high-level control over the quality of the SSS effect.
Scatter Group
散射群組
All objects that should scatter light into each other should be in the same scatter group. To conserve memory, use as few scatter groups as possible. A person's hands, face, etc. can use the same scatter group; even hands and faces of different people. In general, different scatter groups should be used only when using the same group would cause visible problems due to objects incorrectly scattering into each other. Two characters shaking hands, for instance, would need to have their hands in different scatter groups.
所有物件會受到光散射互相影響的都應該是同一個散射群組.
為了減少記憶體的使用,盡可能減少散射群組,一個人的手、臉 等等
可以使用相同的散射群組,就算手和臉是不同的人的,
一般來說, 不同的散射群組應該被使用只有當用相同的群組,因為物件在不正確的互相散射影響會引起明顯問題。
兩個人物在握手的時後,就需要不同的群組
Lightmap Size
Lightmap size is the size of the lightmap as a percent of the total render size. The lightmap is based on screen space and 50% or less is usually enough (and it's the default), but if edge artifacts start to appear, you can increase this value. You'll rarely need to alter this value and it's tough to get a change in your render while altering this parameter.
lightmap 尺寸是依整個算圖尺寸的lightmap百分比.
基本lightmap在螢幕空間50%或更少通常都是足夠的(預設),
但是如果邊緣開始出現偽影,你可以增加此值.
你很少會去調整這個值,在算圖時調整這個參數也是很難去改變
Number of Samples
Number of samples sets how many samples from the lightmap are used (maximum) per rendered ray. Ideally this should be a power of two. 32 is probably the lowest useful value and 128 is plenty of resolution. However, if the scattering radii are really large then you may need to increase the samples in order to avoid any noisy artifacts.
number of samples 是設置每個算圖光線從lightmap有多少採樣值可以使用.
觀念上最低值設32最高值128算解析度應該是足夠,
但是散射半徑太大那需要增加此值去必免產生雜點.
Bump Shader
This should already be familiar to you. You can apply a bump map to your material in order to add detail to your material. One important thing to note is that bump mapping does not affect how your sub-surface scattering is calculated. It only affects the color and specularity of the material. You should already know what bump mapping would do to this model so I think we're good without a render.
對你來說這應該很有名了,
你可以在你的材質設置凹凸去增加你材質的細節.
一個重點提醒,凹凸貼圖不會影響sss的計算.
只會影響材質顏色和高光.
(持續更新中....)
Diffuse Sub-Surface Scattering
This parameter group is responsible for controlling the color and spread of light through the material.
Ambient / Extra Light
The ambient light controls is the ambient component as though it were an ordinary Standard material. This light will also be included in the lightmap and get scattered like any other light source which makes it the perfect place to add any HDRI light. Here're some good HDRI maps you could use.
Overall Diffuse Coloration
All diffuse colors below are multiplied with this global color to yield the final result. This parameter is useful for coloring the final color of the material or to apply maps that change all light that hits the material. Moles on a character's skin, for example, will block almost all underlying light (even scattered) and would make sense applied here.
Unscattered Diffuse Color
This is pretty straightforward. Adding color to this map will only affect unscattered light and will color the model but less-so than overall diffuse coloration. Compare the image above with the one below.
Unscattered Diffuse Weight
The weight control handles how significant the unscattered diffuse color should be in the final material. In the image below, the low weights on the left reveal a material almost exclusively made up of sub-surface scattering. On the right the material has a high weight and is mostly the 「white」 color we used in the diffuse color swatch.
Front-Surface Scatter Color
Front-Surface Scatter Weight
These control the color and weight for the front surface scattering. Front-surface scattering affects surfaces that are facing the light source and are directly illuminated. Other than that, the controls are very similar to the ones we used on the unscattered component above. Notice that when the weight parameter is very low (left side of the lower image), the material becomes almost an ordinary Standard material except for the back-scattering component.
Front-Surface Scatter Radius
The scatter radius controls how deeply the light should be scattered along the surface for light-facing areas of your material. This value is in scene units so if you're working in feet like the downloadable example then .5′ means 6 inches of spread. Remember that this will get multiplied by the scale conversion factor discussed in the advanced parameters section.
Back-Surface Scatter Color
Back-Surface Scatter Weight
These are the color and weight for the back-surface scattering. Back-surface scattering affects surfaces that aren't facing the light source but are being indirectly illuminated through the surface of the object.
Back-Surface Scatter Radius
Back-Surface Scatter Depth
These are the scatter radius and depth for light that reaches the back surface from an illuminated front surface. Normally, the radius and depth are set to the same value (and if the depth is not specified, it defaults to the radius). I'll include an extra render below. Note that it's difficult to get this parameter to invoke a change in the render- the default is 0.03′ and these renders go to 1 foot. If you're setting radius/depth to really high values you should consider changing the scale conversion factor instead!
Specular Reflection
Specular Color
Shininess
The color and shininess control a regular Phong shader for the material specularity. This should be pretty familiar to you from working with Standard materials. The higher the shininess parameter, the higher the glossiness of your final material. The specular color generally doesn't need to be edited but there are some cases when it can be useful.
Advanced Options
Lightmap Gamma Curve
The lightmap gamma curve is the gamma of the lightmap. If this is 1.0, normal diffuse light is stored. If it is less than 1.0, the curve is 『flattened' causing the light to spread out towards areas not directly facing the incoming light. If it is higher than 1.0, the curve is 『narrowed' causing the light to concentrate in areas directly facing the light source. In most cases, a value between 0.4 and 0.8 is fine.
Scatter Indirect Illumination
If this checkbox is checked then the material includes any indirect lighting (photons, final gathering, etc) in the lightmap to be scattered. This takes additional render time and one should judge on a case-by-case basis if the indirect light is significant enough that seeing it scattered or not makes a big difference to justify the extra rendering time. You also must turn this on in order to have your SSS material react to HDRI lighting via Final Gather or to caustics being cast by other objects.
Scale Conversion Factor
The scale conversion factor is the first place you should go when creating a new material. It's a simple multiplier for all distances in the material. Scattering is distance dependent so loading a material designed for a model made in inches will not work on a model where the unit is meters, and vice versa.
Scatter Bias (+/- 1.0)
If this is set to 0.0 the scattering is completely uniform. Positive values favor forward scattering, and negative values favor back scattering. Backscattering is where light begins traveling through a surface but then turns around and bounces back the way it came.The allowed range is -1.0 to 1.0, but the useful range is much smaller. A value of 0.1 (a slight bias toward forward scattering) is a good start.
Falloff Strength
This parameter sets the shape of the distance falloff along the scatter radius. Higher values will give you a more sudden falloff and lower values give a less sudden falloff. Lower values will also make the scatter distance look shorter, so you might want to compensate by increasing the actual scatter distance for a 『softer' look. For high values (1.0 to 10.0), almost all of the samples in the scatter radius are equally weighted. For low values (0.1 to 1.0), the samples near the edge of the scatter radius are weighted less.
『Screen' (soft) Compositing of Layers
When this is turned on the system will choose a softer compositing of the sub-surface scattering layers. This must be turned off for photometric lights & photographic exposure control to look correct!
Looking into the SSS Fast Skin Material
That was intense. Now that we have a good hold on the basics of sub-surface scattering, let's take a deeper look at the other material types and what makes them unique and useful. The SSS Fast Skin Material is very similar to the SSS Fast Material that we just learned about. This is because the SSS Fast Skin Material is like two materials layered on top of each other.
The displacement map in the SSS Fast Skin Material + Displace is a simple 3d Displacement shader. There isn't much information about what this shader does so I've written a quick post about the 3d displacement shader here.
For the sake of keeping this tutorial as short as possible we're going to look at the SSS Fast Skin Material + Displace because it's a more functional version of the original Fast Skin Material.
SSS Fast Skin Material Diffuse Layers
The first major difference between the SSS Fast Skin Material and the SSS Fast Material is the extra front-surface scatter layer. If you remember from earlier, the front-surface scattering has to do with light-facing surfaces and how light spreads across that surface rather than through it. The reason for this extra layer is because skin and flesh diffuse light in a unique way compared to more homogeneous materials like stone or milk.
Let's have a look at what each of these layers looks like independently (without changing the defaults).
Epidermal (Top) Layer Scatter
Good values for the epidermal layer are a slightly yellowish color, a weight of 0.5, and a radius of around 0.2 to 0.4 inches. Notice what a huge impact the epidermal layer has on the overall coloration of this material! It's pervasive but the default scatter depth is so low that much of the detail in the dragon's scales is still there.
Subdermal Layer Scatter
The subdermal layer operates in pretty much the same way as the epidermal layer (and the original SSS Fast Material). This tends to be a deeper, reddish scattering effect. A reddish/orangeish color with a weight of around 0.5 and a radius of 0.4 to 1.0 inches would be a good place to start experimenting. Remember that if you're setting the scatter radius unusually high or low, you may need to adjust your scale conversion factor!
Notice in this render how much detail we've lost due to this component's high scatter radius. This is probably one of the biggest color components in the material.
Back-Surface (Through) Scatter
As with the SSS Fast Material, this scattering represents light going entirely through the material. You can set this scattering as deep as you need, but generally light doesn't go through flesh very far. In the image below you can see that the back-surface scattering isn't a very heavy part of this example. We could increase the weight manually in order to get more scattering in the dragon's tail and claws.
SSS Fast Skin Material Specularity
Primary Specularity
The skin specularity functions are two-layered, allowing simulation of both the broad soft specularity of skin and any near-reflective specularities of top layer oiliness and wetness. Notice that this layer is inherently blue-ish and is less glossy than the secondary specular layer.
Secondary Specularity
For skin, a good start is to have the primary specular layer with a very low shinyness (3.0 to 8.0) and a low level (0.1 to 0.3) and a slightly blueish color. Then the secondary layer should have a high shinyness (20 to 100) and a medium level (0.3 to 0.6). Introducing mapping into the specularity channels can significantly enhance realism, too!
Whenever possible you'll want to use the SSS Fast Material, yielding to SSS Fast Skin Material whenever you're working on actual skin. These materials are highly optimized for working with day-to-day needs like candle wax, soap, or stone. In part 2 of this sub-surface scattering tutorial we'll take a look at the SSS Physical material and shader, followed by how you can use Parti-volume to create more specialized effects. You'll want to advance to those materials for highly refined renders like close-up products or more scientific renders or visualizations.
留言列表