Skip to main content

MeshFogMaterial

WLJS
Wolfram Kernel
Execution environment
warning

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

defines a material for volumetric fog effect in MeshMaterial

MeshFogMaterial[density_:0.01]
tip

Enable "MultipleImportanceSampling" to get the best results

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]