When using the material_list function with type = "toon", I think having toon_outline_width = 0 should result in no outline. Instead, it makes all the objects red. I didn't see another option to remove the outline, but I might have missed it.
remotes::install_github("tylermorganwall/rayvertex")
#> Skipping install of 'rayvertex' from a github remote, the SHA1 (f1c3289f) has not changed since last install.
#> Use `force = TRUE` to force installation
library(rayvertex)
# Example works like the documentation
set.seed(1)
col = hsv(runif(1))
scene = sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = 0.025,
ambient=col,ambient_intensity=0.2),radius=0.1)
for(i in 1:30) {
col = hsv(runif(1))
scene = add_shape(scene, sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = 0.025,
ambient=col, ambient_intensity=0.2),
radius=0.1))
}
rasterize_scene(scene,
light_info=directional_light(direction=c(0.5,0.8,1)),
background = "white",fov=10)
#> Setting `lookat` to: c(0.53, 0.49, 0.50)
# set toon_outline_width = 0
# I'd expect this to be the previous image with no black outlines on the spheres
# but it makes all of them red instead?
set.seed(1)
col = hsv(runif(1))
scene = sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = 0,
ambient=col,ambient_intensity=0.2),radius=0.1)
for(i in 1:30) {
col = hsv(runif(1))
scene = add_shape(scene, sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = 0,
ambient=col, ambient_intensity=0.2),
radius=0.1))
}
rasterize_scene(scene,
light_info=directional_light(direction=c(0.5,0.8,1)),
background = "white",fov=10)
#> Setting `lookat` to: c(0.53, 0.49, 0.50)
# set toon_outline_width = -0.025
# This gets the desired result, but feels hacky
set.seed(1)
col = hsv(runif(1))
scene = sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = -0.025,
ambient=col,ambient_intensity=0.2),radius=0.1)
for(i in 1:30) {
col = hsv(runif(1))
scene = add_shape(scene, sphere_mesh(position=runif(3),
material=material_list(diffuse=col, type="toon",toon_levels = 3,
toon_outline_width = -0.025,
ambient=col, ambient_intensity=0.2),
radius=0.1))
}
rasterize_scene(scene,
light_info=directional_light(direction=c(0.5,0.8,1)),
background = "white",fov=10)
#> Setting `lookat` to: c(0.53, 0.49, 0.50)
When using the
material_list
function withtype = "toon"
, I think havingtoon_outline_width = 0
should result in no outline. Instead, it makes all the objects red. I didn't see another option to remove the outline, but I might have missed it.Created on 2022-06-08 by the reprex package (v2.0.1)