Capítulo 81 de 859

Chapter 81: MeshSSSNodeMaterial

Core Idea

This node material is an experimental extension of MeshPhysicalNodeMaterial that implements a Subsurface scattering (SSS) term.

Key Concepts

  • thicknessAmbientNode : Node.<float>: Represents the thickness ambient factor.
  • thicknessAttenuationNode : Node.<float>: Represents the thickness attenuation.
  • thicknessColorNode : Node.<vec3>: Represents the thickness color.
  • thicknessDistortionNode : Node.<float>: Represents the distortion factor.
  • thicknessPowerNode : Node.<float>: Represents the thickness power.
  • thicknessScaleNode : Node.<float>: Represents the thickness scale.
  • useSSS : boolean: Whether the lighting model should use SSS or not.

Reference Tables

Constructor

Signature
new MeshSSSNodeMaterial( parameters : Object )

Properties

PropertyDescription
.thicknessAmbientNode : Node.<float>Represents the thickness ambient factor.
.thicknessAttenuationNode : Node.<float>Represents the thickness attenuation.
.thicknessColorNode : Node.<vec3>Represents the thickness color.
.thicknessDistortionNode : Node.<float>Represents the distortion factor.
.thicknessPowerNode : Node.<float>Represents the thickness power.
.thicknessScaleNode : Node.<float>Represents the thickness scale.
.useSSS : booleanWhether the lighting model should use SSS or not.

Methods

MethodDescription
.setupLightingModel() : SSSLightingModelSetups the lighting model.

Key Takeaways

  1. MeshSSSNodeMaterial extends: EventDispatcher → Material → NodeMaterial → MeshStandardNodeMaterial → MeshPhysicalNodeMaterial
  2. Most relevant properties: thicknessAmbientNode, thicknessAttenuationNode, thicknessColorNode, thicknessDistortionNode.
  3. Key methods: setupLightingModel.

Connects To

  • EventDispatcher: parent class
  • Material: parent class
  • NodeMaterial: parent class
  • MeshStandardNodeMaterial: parent class
  • MeshPhysicalNodeMaterial: parent class
  • Source: src/materials/nodes/MeshSSSNodeMaterial.js