# Create a scene with different materials
scene = generate_cornell() %>%
add_object(sphere(x=555/2, y=555/2, z=555/2, radius=100))
# Set all objects to be metallic
scene = set_scene_material(scene, metal(color="gold"))
# Set all objects to be glass
scene = set_scene_material(scene, dielectric())
Run the code above in your browser using DataLab