Applies Loop subdivision to the scene (or selected meshes).
subdivide_mesh(
scene,
id = NA,
subdivision_levels = 2,
simple = FALSE,
normals = TRUE,
verbose = FALSE
)
The scene to subdivide.
Default NA
, all shapes. The index of which shape to subdivide.
Default 1
.
Number of Loop subdivisions to be applied to the mesh.
Default FALSE
. Whether to use simple subdivision, which does
not change the appearance of the mesh but does create a finer mesh.
Default TRUE
. Whether to calculate subdivided vertex normals.
Default FALSE
.
Scene with shape added.
if(run_documentation()) {
#Subdivide the included R mesh
obj_mesh(r_obj(),position=c(-0.5,0,0)) |>
add_shape(subdivide_mesh(obj_mesh(r_obj(),position=c(0.5,0,0)),
subdivision_levels = 2)) |>
rasterize_scene(light_info = directional_light(direction=c(0.2,0.5,1)),fov=13)
}
#> Setting `lookat` to: c(-0.00, 0.00, 0.00)