Media nest: the innermost medium replaces the surrounding one. Cameras inside media are detected automatically. A medium with zero absorption and scattering creates a vacuum cavity. Intersecting, non-nested volume boundaries are unsupported.
set_medium(scene, medium, keep_surface = FALSE)A `ray_scene` containing closed spheres, cubes, ellipsoids, or watertight consistently oriented triangle meshes.
A description from [homogeneous_medium()], [grid_medium()], or [nanovdb_medium()]. Use `NULL` to remove an attachment.
Default `FALSE`. Keep the object's surface material when `TRUE`, for example to place a medium inside glass. Dielectric attenuation adds absorption to the medium; it does not add emission.
The scene with medium attachments stored independently of materials.
water = homogeneous_medium(sigma_a = c(0.3, 0.05, 0.02), sigma_s = 0.01)
glass = sphere(material = dielectric())
scene = set_medium(glass, water, keep_surface = TRUE)