| set_medium | R Documentation |
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)
scene |
A 'ray_scene' containing closed spheres, cubes, ellipsoids, or watertight consistently oriented triangle meshes. |
medium |
A description from [homogeneous_medium()], [grid_medium()], or [nanovdb_medium()]. Use 'NULL' to remove an attachment. |
keep_surface |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.