Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

generate_studio

Generate Studio


Description

Generates a curved studio backdrop.

Usage

generate_studio(
  depth = -1,
  distance = -10,
  width = 100,
  height = 100,
  curvature = 8,
  material = diffuse()
)

Arguments

depth

Default '-1'. Depth of the ground in the scene.

distance

Default '-10'. Distance to the backdrop in the scene from the origin, on the z-axis.

width

Default '100'. Width of the backdrop.

height

Default '100'. height of the backdrop.

curvature

Default '2'. Radius of the curvature connecting the bottom plane to the vertical backdrop.

material

Default diffuse with 'color= "#ccff00"'.The material, called from one of the material functions diffuse, metal, or dielectric.

Value

Tibble representing the scene.

Examples

#Generate the ground and add some objects
scene = generate_studio(depth=-1, material = diffuse(color="white")) %>%
  add_object(obj_model(r_obj(),y=-1,x=0.7,material=glossy(color="darkred"),angle=c(0,-20,0))) %>%
  add_object(sphere(x=-0.7,radius=0.5,material=dielectric())) %>% 
  add_object(sphere(y=3,x=-2,z=20,material=light(intensity=600)))

render_scene(scene, parallel=TRUE,lookfrom=c(0,2,10),fov=20,clamp_value=10,samples=500)


#Zooming out to show the full default scene

render_scene(scene, parallel=TRUE,lookfrom=c(0,200,400),clamp_value=10,samples=500)

rayrender

Build and Raytrace 3D Scenes

v0.21.2
GPL-3
Authors
Tyler Morgan-Wall [aut, cph, cre] (<https://orcid.org/0000-0002-3131-3814>), Syoyo Fujita [ctb, cph], Melissa O'Neill [ctb, cph], Vilya Harvey [ctb, cph]
Initial release
2021-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.