MeshPhysicalMaterial.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Material] &rarr; [page:MeshStandardMaterial] &rarr;
  11. <h1>物理网格材质([name])</h1>
  12. <p class="desc">
  13. [page:MeshStandardMaterial]的扩展,提供了更高级的基于物理的渲染属性:
  14. </p>
  15. <ul>
  16. <li>
  17. <b>Clearcoat:</b> Some materials — like car paints, carbon fiber, and wet surfaces — require a
  18. clear, reflective layer on top of another layer that may be irregular or rough. Clearcoat
  19. approximates this effect, without the need for a separate transparent surface.
  20. </li>
  21. <li>
  22. <b>Physically-based transparency:</b> One limitation of [page:Material.opacity .opacity] is
  23. that highly transparent materials are less reflective. Physically-based [page:.transmission]
  24. provides a more realistic option for thin, transparent surfaces like glass.
  25. </li>
  26. <li>
  27. <b>Advanced reflectivity:</b> More flexible reflectivity for non-metallic materials.
  28. </li>
  29. </ul>
  30. <p>
  31. As a result of these complex shading features, MeshPhysicalMaterial has a higher performance
  32. cost, per pixel, than other three.js materials. Most effects are disabled by default, and add
  33. cost as they are enabled. For best results, always specify an [page:.envMap environment map]
  34. when using this material.
  35. </p>
  36. <iframe id="scene" src="scenes/material-browser.html#MeshPhysicalMaterial"></iframe>
  37. <script>
  38. // iOS iframe auto-resize workaround
  39. if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
  40. const scene = document.getElementById( 'scene' );
  41. scene.style.width = getComputedStyle( scene ).width;
  42. scene.style.height = getComputedStyle( scene ).height;
  43. scene.setAttribute( 'scrolling', 'no' );
  44. }
  45. </script>
  46. <h2>例子</h2>
  47. <p>
  48. [example:webgl_materials_variations_physical materials / variations / physical]<br />
  49. [example:webgl_materials_physical_clearcoat materials / physical / clearcoat]<br />
  50. [example:webgl_materials_physical_reflectivity materials / physical / reflectivity]<br />
  51. [example:webgl_materials_physical_transmission materials / physical / transmission]
  52. </p>
  53. <h2>构造函数(Constructor)</h2>
  54. <h3>[name]( [param:Object parameters] )</h3>
  55. <p> [page:Object parameters] - (可选)用于定义材质外观的对象,具有一个或多个属性。
  56. 材质的任何属性都可以从此处传入(包括从[page:Material]和[page:MeshStandardMaterial]继承的任何属性)<br /><br />
  57. 属性[page:Hexadecimal color]例外,其可以作为十六进制字符串传递,默认情况下为 *0xffffff*(白色),内部调用[page:Color.set](color)。
  58. </p>
  59. <h2>属性(Properties)</h2>
  60. <p>共有属性请参见其基类[page:Material]和[page:MeshStandardMaterial]。</p>
  61. <h3>[property:Float clearcoat]</h3>
  62. <p>
  63. Represents the intensity of the clear coat layer, from *0.0* to *1.0*. Use clear coat related properties to enable multilayer
  64. materials that have a thin translucent layer over the base layer. Default is *0.0*.
  65. </p>
  66. <h3>[property:Texture clearcoatMap]</h3>
  67. <p>
  68. The red channel of this texture is multiplied against [page:.clearcoat], for per-pixel control
  69. over a coating's intensity. Default is *null*.
  70. </p>
  71. <h3>[property:Texture clearcoatNormalMap]</h3>
  72. <p>Can be used to enable independent normals for the clear coat layer. Default is *null*.</p>
  73. <h3>[property:Vector2 clearcoatNormalScale]</h3>
  74. <p>How much [page:.clearcoatNormalMap] affects the clear coat layer, from *(0,0)* to *(1,1)*. Default is *(1,1)*.</p>
  75. <h3>[property:Float clearcoatRoughness]</h3>
  76. <p>Roughness of the clear coat layer, from *0.0* to *1.0*. Default is *0.0*.</p>
  77. <h3>[property:Texture clearcoatRoughnessMap]</h3>
  78. <p>
  79. The green channel of this texture is multiplied against [page:.clearcoatRoughness], for per-pixel control
  80. over a coating's roughness. Default is *null*.
  81. </p>
  82. <h3>[property:Object defines]</h3>
  83. <p> 如下形式的对象:
  84. <code>
  85. {
  86. 'STANDARD': ''
  87. 'PHYSICAL': '',
  88. };
  89. </code>
  90. [page:WebGLRenderer]使用它来选择shaders。
  91. </p>
  92. <h3>[property:Float ior]</h3>
  93. <p>
  94. Index-of-refraction for non-metallic materials, from *1.0* to *2.333*. Default is *1.5*.<br />
  95. </p>
  96. <h3>[property:Float reflectivity]</h3>
  97. <p>
  98. Degree of reflectivity, from *0.0* to *1.0*. Default is *0.5*, which corresponds to an index-of-refraction of 1.5.<br />
  99. 这模拟了非金属材质的反射率。当[page:MeshStandardMaterial]为*1.0*时,此属性无效。
  100. </p>
  101. <h3>[property:Float sheen]</h3>
  102. <p>
  103. The intensity of the sheen layer, from *0.0* to *1.0*. Default is *0.0*.
  104. </p>
  105. <h3>[property:Float sheenRoughness]</h3>
  106. <p>
  107. Roughness of the sheen layer, from *0.0* to *1.0*. Default is *1.0*.
  108. </p>
  109. <h3>[property:Texture sheenRoughnessMap]</h3>
  110. <p>
  111. The alpha channel of this texture is multiplied against [page:.sheenRoughness], for per-pixel control
  112. over sheen roughness. Default is *null*.
  113. </p>
  114. <h3>[property:Color sheenColor]</h3>
  115. <p>
  116. The sheen tint. Default is *0xffffff*, white.
  117. </p>
  118. <h3>[property:Texture sheenColorMap]</h3>
  119. <p>
  120. The RGB channels of this texture are multiplied against [page:.sheenColor], for per-pixel control
  121. over sheen tint. Default is *null*.
  122. </p>
  123. <h3>[property:Float specularIntensity]</h3>
  124. <p>
  125. 用于控制非金属材质高光反射强度的浮点值。漫反射材质对应的值为0。范围从*0.0*到*1.0*。 默认值为*0.0*。
  126. </p>
  127. <h3>[property:Texture specularIntensityMap]</h3>
  128. <p>
  129. 此纹理的alpha通道将与[page:.specularIntensity]相乘,用于逐像素地控制高光强度。默认值为*null*。
  130. </p>
  131. <h3>[property:Color specularColor]</h3>
  132. <p>
  133. 非金属材质在垂直于法线方向观看时的高光反射颜色。默认值为*0xffffff*,白色。
  134. </p>
  135. <h3>[property:Texture specularColorMap]</h3>
  136. <p>
  137. 此纹理的alpha通道将与[page:.specularColor]相乘,用于逐像素地控制高光颜色。默认值为*null*。
  138. </p>
  139. <h3>[property:Float transmission]</h3>
  140. <p>
  141. Degree of transmission (or optical transparency), from *0.0* to *1.0*. Default is *0.0*.<br />
  142. Thin, transparent or semitransparent, plastic or glass materials remain largely reflective even if they are fully transmissive.
  143. The transmission property can be used to model these materials.<br />
  144. When transmission is non-zero, [page:Material.opacity opacity] should be set to *1*.
  145. </p>
  146. <h3>[property:Texture transmissionMap]</h3>
  147. <p>
  148. The red channel of this texture is multiplied against [page:.transmission], for per-pixel control
  149. over optical transparency. Default is *null*.
  150. </p>
  151. <h2>方法(Methods)</h2>
  152. <p>共有方法请参见其基类[page:Material] 和[page:MeshStandardMaterial]。</p>
  153. <h2>源码(Source)</h2>
  154. <p>
  155. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  156. </p>
  157. </body>
  158. </html>