material_list {rayvertex} | R Documentation |
Material List
Description
Generate a material properties list.
Usage
material_list(
diffuse = c(0.8, 0.8, 0.8),
ambient = c(0, 0, 0),
specular = c(1, 1, 1),
transmittance = c(0, 0, 0),
emission = c(0, 0, 0),
shininess = 50,
ior = 1,
dissolve = 1,
illum = 1,
texture_location = "",
normal_texture_location = "",
bump_texture_location = "",
specular_texture_location = "",
ambient_texture_location = "",
emissive_texture_location = "",
diffuse_intensity = 1,
bump_intensity = 1,
specular_intensity = 1,
emission_intensity = 1,
ambient_intensity = 1,
culling = "back",
type = "diffuse",
translucent = TRUE,
toon_levels = 5,
toon_outline_width = 0.05,
toon_outline_color = "black",
reflection_intensity = 0,
reflection_sharpness = 1,
two_sided = FALSE
)
Arguments
diffuse |
Default |
ambient |
Default |
specular |
Default |
transmittance |
Default |
emission |
Default |
shininess |
Default |
ior |
Default |
dissolve |
Default |
illum |
Default |
texture_location |
Default |
normal_texture_location |
Default |
bump_texture_location |
Default |
specular_texture_location |
Default |
ambient_texture_location |
Default |
emissive_texture_location |
Default |
diffuse_intensity |
Default |
bump_intensity |
Default |
specular_intensity |
Default |
emission_intensity |
Default |
ambient_intensity |
Default |
culling |
Default |
type |
Default |
translucent |
Default |
toon_levels |
Default |
toon_outline_width |
Default |
toon_outline_color |
Default |
reflection_intensity |
Default |
reflection_sharpness |
Default |
two_sided |
Default |
Value
List of material properties.
Examples
if(run_documentation()) {
mat_prop = material_list(diffuse="purple", type="phong", shininess = 20,
ambient="purple", ambient_intensity=0.3,
specular = "red", specular_intensity=2)
p_sphere = sphere_mesh(position=c(555/2,555/2,555/2),
radius=40,material=mat_prop)
rasterize_scene(p_sphere, light_info=directional_light(direction=c(0.1,0.6,-1)))
}