Subsurface Scattering for Foliage, in Unity (WITHOUT RAYTRACING!)

PuckLovesGames
21 Aug 201805:32

Summary

TLDRこのビデオでは、透過性のある材料を通して光が内部の色を拾う現象であるサブサーフェススキャッタリングについて解説します。具体的には、この効果を葉に透過する光の効果を再現するためのシェーダーに適用する方法を紹介します。アラン・シッコーネの詳細な解説を参考にしながら、Amplify Shader EditorやUnityのShader Graphを使用してシェーダーを作成する過程を説明します。効果の実現には、光の方向と視点の方向のドット積を利用し、メッシュの薄い部分で光がより多く透過するようにします。さらに、フォリッジや木の葉のクラスターにこのシェーダーを適用する際のチャレンジと解決策も探求します。

Takeaways

  • 🌞 光が透過性のある物質を通過すると、その内部の色を拾い上げる「サブサーフェス・スキャッタリング」について説明しています。
  • 🍃 シェーダーを用いて、葉を通して光が透過する効果を実現する方法を示しています。
  • 📚 アレン・シッコーネの2部構成の詳細な解説を参照することを勧めています。
  • 🖥️ Amplify Shader EditorやUnityのShader Graphを使ってシェーダーを簡単に作成する方法を紹介しています。
  • 🔍 サブサーフェス・スキャッタリングの効果は、光源がオブジェクトの後ろにある時にのみ可視化されることを解析しています。
  • 🔄 オブジェクトの光を背面から照らす効果を実現するための、ドット積の使用方法を説明しています。
  • 🌟 メッシュが薄い部分で照明を増やすことで、よりリアルな透過効果を模倣するテクニックを紹介しています。
  • 🌲 葉っぱのクラスターを作る際に、サブサーフェス・スキャッタリングシェーダーを適用する方法を探求しています。
  • 🔧 フォリッジにおけるメッシュのノーマルを調整する従来の方法と、シェーダー内で新しいノーマルを生成する新しい方法を比較しています。
  • 🍂 中央部分のジオメトリが予想よりも多くの光を受け取る問題を解決するためのマスキング技術を提案しています。
  • 🌿 葉の動きを模倣するために、葉のクラスターの中央部分に偽のアンビエントオクルージョンを追加する方法についても触れています。

Q & A

  • What causes the subsurface scattering effect in the video?

    -Subsurface scattering is caused when light shines through a translucent material and picks up some of the internal color.

  • How can you limit the subsurface scattering effect to only one side of a 3D model?

    -By using a dot product of the view direction and the negated light direction. This will illuminate the side facing away from the light source.

  • Why does the subsurface scattering effect increase where the 3D mesh is thinner?

    -More light passes through thinner sections. Since we don't have access to ray tracing, this needs to be approximated in the shader.

  • How can the fall-off of the subsurface scattering effect be controlled?

    -By raising the light direction dot product to a power to control fall-off. A texture can also define areas with more or less translucency.

  • Why doesn't the subsurface scattering shader work well on the leaf geometry shown?

    -The massive quads have normals pointing in all directions. The shader relies on surface normals to approximate mesh thickness.

  • How can mesh normals be generated in the shader for foliage?

    -Transform the vertex positions from object into world space to use them as spherical normals pointing away from the origin.

  • How can lighting be reduced in the center of a foliage clump?

    -Use either vertex colors or the magnitude of the spherical normals to create a fall-off mask.

  • What other uses are there for a spherical fall-off in foliage?

    -It can be used to fake ambient occlusion in the middle of the clump. Also to mask wind vertex animation strength.

  • What extra features could make the subsurface scattering shader more robust?

    -Adding directional punch-through, and light attenuation to mask the effect in shadows.

  • Where can more detailed information on this shader be found?

    -There is a written explanation and source code available on the author's Patreon for supporters.

Outlines

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Mindmap

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Keywords

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Highlights

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen

Transcripts

plate

Dieser Bereich ist nur für Premium-Benutzer verfügbar. Bitte führen Sie ein Upgrade durch, um auf diesen Abschnitt zuzugreifen.

Upgrade durchführen
Rate This

5.0 / 5 (0 votes)

Benötigen Sie eine Zusammenfassung auf Englisch?