Browse Source

Docs: Update material pages. (#24482)

Michael Herzog 3 years ago
parent
commit
5bf1ad121d

+ 59 - 7
docs/api/en/materials/MeshLambertMaterial.html

@@ -16,13 +16,7 @@
 
 
 			The material uses a non-physically based [link:https://en.wikipedia.org/wiki/Lambertian_reflectance Lambertian]
 			The material uses a non-physically based [link:https://en.wikipedia.org/wiki/Lambertian_reflectance Lambertian]
 			model for calculating reflectance. This can simulate some surfaces (such as untreated wood or stone) well,
 			model for calculating reflectance. This can simulate some surfaces (such as untreated wood or stone) well,
-			but cannot simulate shiny surfaces with specular highlights (such as varnished wood).<br /><br />
-
-
-
-			Shading is calculated using a [link:https://en.wikipedia.org/wiki/Gouraud_shading Gouraud] shading model.
-			This calculates shading per vertex (i.e. in the [link:https://en.wikipedia.org/wiki/Shader#Vertex_shaders vertex shader])
-			and interpolates the results over the polygon's faces.<br /><br />
+			but cannot simulate shiny surfaces with specular highlights (such as varnished wood). [name] uses per-fragmet shading.<br /><br />
 
 
 			Due to the simplicity of the reflectance and illumination models, performance will be greater
 			Due to the simplicity of the reflectance and illumination models, performance will be greater
 			when using this material over the [page:MeshPhongMaterial],	[page:MeshStandardMaterial] or [page:MeshPhysicalMaterial],
 			when using this material over the [page:MeshPhongMaterial],	[page:MeshStandardMaterial] or [page:MeshPhysicalMaterial],
@@ -79,6 +73,16 @@
 		<h3>[property:Float aoMapIntensity]</h3>
 		<h3>[property:Float aoMapIntensity]</h3>
 		<p>Intensity of the ambient occlusion effect. Default is 1. Zero is no occlusion effect.</p>
 		<p>Intensity of the ambient occlusion effect. Default is 1. Zero is no occlusion effect.</p>
 
 
+		<h3>[property:Texture bumpMap]</h3>
+		<p>
+			The texture to create a bump map. The black and white values map to the perceived depth in relation to the lights.
+			Bump doesn't actually affect the geometry of the object, only the lighting. If a normal map is defined this will
+			be ignored.
+		</p>
+
+		<h3>[property:Float bumpScale]</h3>
+		<p>How much the bump map affects the material. Typical ranges are 0-1. Default is 1.</p>
+
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
 		<p>[page:Color] of the material, by default set to white (0xffffff).</p>
 		<p>[page:Color] of the material, by default set to white (0xffffff).</p>
 
 
@@ -91,6 +95,28 @@
 			blend between the two colors.
 			blend between the two colors.
 		</p>
 		</p>
 
 
+		<h3>[property:Texture displacementMap]</h3>
+		<p>
+			The displacement map affects the position of the mesh's vertices. Unlike other maps
+			which only affect the light and shade of the material the displaced vertices can cast shadows,
+			block other objects, and otherwise act as real geometry. The displacement texture is
+			an image where the value of each pixel (white being the highest) is mapped against,
+			and repositions, the vertices of the mesh.
+		</p>
+
+		<h3>[property:Float displacementScale]</h3>
+		<p>
+			How much the displacement map affects the mesh (where black is no displacement,
+			and white is maximum displacement). Without a displacement map set, this value is not applied.
+			 Default is 1.
+		</p>
+
+		<h3>[property:Float displacementBias]</h3>
+		<p>
+			The offset of the displacement map's values on the mesh's vertices.
+			Without a displacement map set, this value is not applied. Default is 0.
+		</p>
+
 		<h3>[property:Color emissive]</h3>
 		<h3>[property:Color emissive]</h3>
 		<p>
 		<p>
 		Emissive (light) color of the material, essentially a solid color unaffected by other lighting.
 		Emissive (light) color of the material, essentially a solid color unaffected by other lighting.
@@ -110,6 +136,11 @@
 		<h3>[property:Texture envMap]</h3>
 		<h3>[property:Texture envMap]</h3>
 		<p>The environment map. Default is null.</p>
 		<p>The environment map. Default is null.</p>
 
 
+		<h3>[property:Boolean flatShading]</h3>
+		<p>
+		Define whether the material is rendered with flat shading. Default is false.
+		</p>
+
 		<h3>[property:Boolean fog]</h3>
 		<h3>[property:Boolean fog]</h3>
 		<p>Whether the material is affected by fog. Default is `true`.</p>
 		<p>Whether the material is affected by fog. Default is `true`.</p>
 
 
@@ -125,6 +156,27 @@
 			[page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest]. Default is null.
 			[page:Material.transparent .transparent] or [page:Material.alphaTest .alphaTest]. Default is null.
 		</p>
 		</p>
 
 
+		<h3>[property:Texture normalMap]</h3>
+		<p>
+			The texture to create a normal map. The RGB values affect the surface normal for each pixel fragment and change
+			the way the color is lit. Normal maps do not change the actual shape of the surface, only the lighting.
+			In case the material has a normal map authored using the left handed convention, the y component of normalScale
+			should be negated to compensate for the different handedness.
+		</p>
+
+		<h3>[property:Integer normalMapType]</h3>
+		<p>
+			The type of normal map.<br /><br />
+
+			Options are [page:constant THREE.TangentSpaceNormalMap] (default), and [page:constant THREE.ObjectSpaceNormalMap].
+		</p>
+
+		<h3>[property:Vector2 normalScale]</h3>
+		<p>
+			How much the normal map affects the material. Typical ranges are 0-1.
+			Default is a [page:Vector2] set to (1,1).
+		</p>
+
 		<h3>[property:Float reflectivity]</h3>
 		<h3>[property:Float reflectivity]</h3>
 		<p>How much the environment map affects the surface; also see [page:.combine].</p>
 		<p>How much the environment map affects the surface; also see [page:.combine].</p>
 
 

+ 1 - 7
docs/api/en/materials/MeshPhongMaterial.html

@@ -16,13 +16,7 @@
 
 
 			The material uses a non-physically based [link:https://en.wikipedia.org/wiki/Blinn-Phong_shading_model Blinn-Phong]
 			The material uses a non-physically based [link:https://en.wikipedia.org/wiki/Blinn-Phong_shading_model Blinn-Phong]
 			model for calculating reflectance. Unlike the Lambertian model used in the [page:MeshLambertMaterial]
 			model for calculating reflectance. Unlike the Lambertian model used in the [page:MeshLambertMaterial]
-			this can simulate shiny surfaces with specular highlights (such as varnished wood).<br /><br />
-
-			Shading is calculated using a [link:https://en.wikipedia.org/wiki/Phong_shading Phong] shading model.
-			This calculates shading per pixel (i.e. in the [link:https://en.wikipedia.org/wiki/Shader#Pixel_shaders fragment shader],
-			AKA pixel shader)	which gives more accurate results than the Gouraud model used by [page:MeshLambertMaterial],
-			at the cost of some performance. The [page:MeshStandardMaterial] and [page:MeshPhysicalMaterial]
-			also use this shading model.<br /><br />
+			this can simulate shiny surfaces with specular highlights (such as varnished wood). [name] uses per-fragmet shading.<br /><br />
 
 
 			Performance will generally be greater when using this material over the	[page:MeshStandardMaterial]
 			Performance will generally be greater when using this material over the	[page:MeshStandardMaterial]
 			or [page:MeshPhysicalMaterial], at the cost of some graphical accuracy.
 			or [page:MeshPhysicalMaterial], at the cost of some graphical accuracy.

+ 3 - 9
docs/api/en/materials/MeshStandardMaterial.html

@@ -20,18 +20,12 @@
 			[link:http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017 3D Studio Max].<br /><br />
 			[link:http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017 3D Studio Max].<br /><br />
 
 
 			This approach differs from older approaches in that instead of using approximations for the way in which
 			This approach differs from older approaches in that instead of using approximations for the way in which
-			light	interacts with a surface, a physically correct model is used. The idea is that, instead of
+			light interacts with a surface, a physically correct model is used. The idea is that, instead of
 			tweaking materials to look good under specific lighting, a material can	be created that
 			tweaking materials to look good under specific lighting, a material can	be created that
 			will react 'correctly' under all lighting scenarios.<br /><br />
 			will react 'correctly' under all lighting scenarios.<br /><br />
 
 
-			In practice this gives a more	accurate and realistic looking result than the [page:MeshLambertMaterial]
-			or [page:MeshPhongMaterial], at the cost of being somewhat more computationally expensive.<br /><br />
-
-			Shading is calculated in the same way as for the [page:MeshPhongMaterial], using a
-			[link:https://en.wikipedia.org/wiki/Phong_shading Phong] shading model.	This calculates shading
-			per pixel (i.e. in the [link:https://en.wikipedia.org/wiki/Shader#Pixel_shaders fragment shader],
-			AKA pixel shader) which gives more accurate results than the Gouraud model used by
-			[page:MeshLambertMaterial], at the cost of some performance.<br /><br />
+			In practice this gives a more accurate and realistic looking result than the [page:MeshLambertMaterial]
+			or [page:MeshPhongMaterial], at the cost of being somewhat more computationally expensive. [name] uses per-fragmet shading.<br /><br />
 
 
 			Note that for best results you should always specify an [page:.envMap environment map] when using
 			Note that for best results you should always specify an [page:.envMap environment map] when using
 			this material.<br /><br />
 			this material.<br /><br />

+ 41 - 4
docs/api/zh/materials/MeshLambertMaterial.html

@@ -13,11 +13,8 @@
 
 
 		<p class="desc"> 一种非光泽表面的材质,没有镜面高光。<br /><br />
 		<p class="desc"> 一种非光泽表面的材质,没有镜面高光。<br /><br />
 			该材质使用基于非物理的[link:https://en.wikipedia.org/wiki/Lambertian_reflectance Lambertian]模型来计算反射率。
 			该材质使用基于非物理的[link:https://en.wikipedia.org/wiki/Lambertian_reflectance Lambertian]模型来计算反射率。
-			这可以很好地模拟一些表面(例如未经处理的木材或石材),但不能模拟具有镜面高光的光泽表面(例如涂漆木材)。<br /><br />
+			这可以很好地模拟一些表面(例如未经处理的木材或石材),但不能模拟具有镜面高光的光泽表面(例如涂漆木材)。 [name] uses per-fragmet shading。<br /><br />
 
 
-
-			使用[link:https://en.wikipedia.org/wiki/Gouraud_shading Gouraud]着色模型计算着色。这将计算每个顶点的着色
-			(即在[link:https://en.wikipedia.org/wiki/Shader#Vertex_shaders vertex shader]中)并在多边形的面上插入结果。<br /><br />
 			由于反射率和光照模型的简单性,[page:MeshPhongMaterial],[page:MeshStandardMaterial]或者[page:MeshPhysicalMaterial]
 			由于反射率和光照模型的简单性,[page:MeshPhongMaterial],[page:MeshStandardMaterial]或者[page:MeshPhysicalMaterial]
 			上使用这种材质时会以一些图形精度为代价,得到更高的性能。
 			上使用这种材质时会以一些图形精度为代价,得到更高的性能。
 		</p>
 		</p>
@@ -67,6 +64,13 @@
 		<h3>[property:Float aoMapIntensity]</h3>
 		<h3>[property:Float aoMapIntensity]</h3>
 		<p> 环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
 		<p> 环境遮挡效果的强度。默认值为1。零是不遮挡效果。</p>
 
 
+		<h3>[property:Texture bumpMap]</h3>
+		<p> 用于创建凹凸贴图的纹理。黑色和白色值映射到与光照相关的感知深度。凹凸实际上不会影响对象的几何形状,只影响光照。如果定义了法线贴图,则将忽略该贴图。
+		</p>
+
+		<h3>[property:Float bumpScale]</h3>
+		<p> 凹凸贴图会对材质产生多大影响。典型范围是0-1。默认值为1。</p>
+
 		<h3>[property:Color color]</h3>
 		<h3>[property:Color color]</h3>
 		<p> 材质的颜色([page:Color]),默认值为白色 (0xffffff)。</p>
 		<p> 材质的颜色([page:Color]),默认值为白色 (0xffffff)。</p>
 
 
@@ -77,6 +81,20 @@
 			[page:Materials THREE.AddOperation]。如果选择多个,则使用[page:.reflectivity]在两种颜色之间进行混合。
 			[page:Materials THREE.AddOperation]。如果选择多个,则使用[page:.reflectivity]在两种颜色之间进行混合。
 		</p>
 		</p>
 
 
+		<h3>[property:Texture displacementMap]</h3>
+		<p> 位移贴图会影响网格顶点的位置,与仅影响材质的光照和阴影的其他贴图不同,移位的顶点可以投射阴影,阻挡其他对象,
+			以及充当真实的几何体。位移纹理是指:网格的所有顶点被映射为图像中每个像素的值(白色是最高的),并且被重定位。
+		</p>
+
+		<h3>[property:Float displacementScale]</h3>
+		<p> 位移贴图对网格的影响程度(黑色是无位移,白色是最大位移)。如果没有设置位移贴图,则不会应用此值。默认值为1。
+		</p>
+
+		<h3>[property:Float displacementBias]</h3>
+		<p>
+			位移贴图在网格顶点上的偏移量。如果没有设置位移贴图,则不会应用此值。默认值为0。
+		</p>
+
 		<h3>[property:Color emissive]</h3>
 		<h3>[property:Color emissive]</h3>
 		<p> 材质的放射(光)颜色,基本上是不受其他光照影响的固有颜色。默认为黑色。
 		<p> 材质的放射(光)颜色,基本上是不受其他光照影响的固有颜色。默认为黑色。
 		</p>
 		</p>
@@ -92,6 +110,10 @@
 		<h3>[property:Texture envMap]</h3>
 		<h3>[property:Texture envMap]</h3>
 		<p> 环境贴图。默认值为null。</p>
 		<p> 环境贴图。默认值为null。</p>
 
 
+		<h3>[property:Boolean flatShading]</h3>
+		<p> 定义材质是否使用平面着色进行渲染。默认值为false。
+		</p>
+
 		<h3>[property:Boolean fog]</h3>
 		<h3>[property:Boolean fog]</h3>
 		<p>材质是否受雾影响。默认为*true*。</p>
 		<p>材质是否受雾影响。默认为*true*。</p>
 
 
@@ -107,6 +129,21 @@
 			或[page:Material.alphaTest .alphaTest]。默认为null。
 			或[page:Material.alphaTest .alphaTest]。默认为null。
 		</p>
 		</p>
 
 
+		<h3>[property:Texture normalMap]</h3>
+		<p> 用于创建法线贴图的纹理。RGB值会影响每个像素片段的曲面法线,并更改颜色照亮的方式。法线贴图不会改变曲面的实际形状,只会改变光照。
+			In case the material has a normal map authored using the left handed convention, the y component of normalScale
+			should be negated to compensate for the different handedness.
+		</p>
+
+		<h3>[property:Integer normalMapType]</h3>
+		<p> 法线贴图的类型。<br /><br />
+			选项为[page:constant THREE.TangentSpaceNormalMap](默认)和[page:constant THREE.ObjectSpaceNormalMap]。
+		</p>
+
+		<h3>[property:Vector2 normalScale]</h3>
+		<p> 法线贴图对材质的影响程度。典型范围是0-1。默认值是[page:Vector2]设置为(1,1)。
+		</p>
+
 		<h3>[property:Float reflectivity]</h3>
 		<h3>[property:Float reflectivity]</h3>
 		<p> 环境贴图对表面的影响程度; 见[page:.combine]。默认值为1,有效范围介于0(无反射)和1(完全反射)之间。</p>
 		<p> 环境贴图对表面的影响程度; 见[page:.combine]。默认值为1,有效范围介于0(无反射)和1(完全反射)之间。</p>
 
 

+ 2 - 4
docs/api/zh/materials/MeshPhongMaterial.html

@@ -13,10 +13,8 @@
 
 
 		<p class="desc"> 一种用于具有镜面高光的光泽表面的材质。<br /><br />
 		<p class="desc"> 一种用于具有镜面高光的光泽表面的材质。<br /><br />
 			该材质使用非物理的[link:https://en.wikipedia.org/wiki/Blinn-Phong_shading_model Blinn-Phong]模型来计算反射率。
 			该材质使用非物理的[link:https://en.wikipedia.org/wiki/Blinn-Phong_shading_model Blinn-Phong]模型来计算反射率。
-			与[page:MeshLambertMaterial]中使用的Lambertian模型不同,该材质可以模拟具有镜面高光的光泽表面(例如涂漆木材)。<br /><br />
-			使用[link:https://en.wikipedia.org/wiki/Phong_shading Phong]着色模型计算着色时,会计算每个像素的阴影(在[link:https://en.wikipedia.org/wiki/Shader#Pixel_shaders fragment shader],
-			AKA pixel shader中),与[page:MeshLambertMaterial]使用的Gouraud模型相比,该模型的结果更准确,但代价是牺牲一些性能。
-			[page:MeshStandardMaterial]和[page:MeshPhysicalMaterial]也使用这个着色模型。<br /><br />
+			与[page:MeshLambertMaterial]中使用的Lambertian模型不同,该材质可以模拟具有镜面高光的光泽表面(例如涂漆木材)。[name] uses per-fragmet shading。<br /><br />
+
 			在[page:MeshStandardMaterial]或[page:MeshPhysicalMaterial]上使用此材质时,性能通常会更高	,但会牺牲一些图形精度。
 			在[page:MeshStandardMaterial]或[page:MeshPhysicalMaterial]上使用此材质时,性能通常会更高	,但会牺牲一些图形精度。
 		</p>
 		</p>
 
 

+ 1 - 6
docs/api/zh/materials/MeshStandardMaterial.html

@@ -18,12 +18,7 @@
 			这种方法与旧方法的不同之处在于,不使用近似值来表示光与表面的相互作用,而是使用物理上正确的模型。
 			这种方法与旧方法的不同之处在于,不使用近似值来表示光与表面的相互作用,而是使用物理上正确的模型。
 			我们的想法是,不是在特定照明下调整材质以使其看起来很好,而是可以创建一种材质,能够“正确”地应对所有光照场景。<br /><br />
 			我们的想法是,不是在特定照明下调整材质以使其看起来很好,而是可以创建一种材质,能够“正确”地应对所有光照场景。<br /><br />
 
 
-			在实践中,该材质提供了比[page:MeshLambertMaterial] 或[page:MeshPhongMaterial] 更精确和逼真的结果,代价是计算成本更高。<br /><br />
-
-
-			计算着色的方式与[page:MeshPhongMaterial]相同,都使用[link:https://en.wikipedia.org/wiki/Phong_shading Phong]着色模型,
-			这会计算每个像素的阴影(即在[link:https://en.wikipedia.org/wiki/Shader#Pixel_shaders fragment shader],
-			AKA pixel shader中), 与[page:MeshLambertMaterial]使用的Gouraud模型相比,该模型的结果更准确,但代价是牺牲一些性能。<br /><br />
+			在实践中,该材质提供了比[page:MeshLambertMaterial] 或[page:MeshPhongMaterial] 更精确和逼真的结果,代价是计算成本更高。[name] uses per-fragmet shading。<br /><br />
 
 
 			请注意,为获得最佳效果,您在使用此材质时应始终指定[page:.envMap environment map]。<br /><br />
 			请注意,为获得最佳效果,您在使用此材质时应始终指定[page:.envMap environment map]。<br /><br />
 			有关PBR概念的非技术性介绍以及如何设置PBR材质,请查看[link:https://www.marmoset.co marmoset]成员的这些文章:
 			有关PBR概念的非技术性介绍以及如何设置PBR材质,请查看[link:https://www.marmoset.co marmoset]成员的这些文章: