WLJS LogoWLJS Notebook

MeshFogMaterial

Works only with "Renderer"->"PathTracing" in Graphics3D

defines a material for volumetric fog effect in MeshMaterial

MeshFogMaterial[density_:0.01]

Enable "MultipleImportanceSampling"

Example

Define a sphere-fog and place a SpotLight to light it up from below

Graphics3D[{
  {MeshMaterial[MeshFogMaterial[0.1]], Sphere[{0,0,0},5]}, {Red, Sphere[{0,0,0}, 1]}, {SpotLight[White, -{5,5,5}]}
}, "Renderer"->"PathTracing", Background->Black, "Lighting"->None, "MultipleImportanceSampling"->True]

On this page