I had a figure which consists of multiple 3D surface plots. The script looks something like
using CairoMakie; CairoMakie.activate!()
update_theme!(Surface = (diffuse = Vec3f(1,0), specular = Vec3f(0.2), shading = true))
fig = Figure()
g = GridLayout(fig[1,1])
update_theme!(light_direction = Vec3f(1,2,3))
ax1 = Axis3(g[1,1], elevation=pi*30/180)
surface!(ax1, x, y, z1)
update_theme!(light_direction = Vec3f(-3,2,1)) # update lighting for another surface plot
ax2 = Axis3(g[1,2], elevation=pi*40/180)
surface!(ax2, x, y, z2)
fig
With the recent release of Makie v0.20, what’s the proper way to set the light direction? After reading the documentation, apparently I need to change shading=FastShading
or something else, but I can’t quite figure out the light direction. I tried something like ax1.scene.lights = [DirectionalLight(RGBf(1,1,1), Vec3f(1,2,3))]
, but the 3D plot looks black regardless of the RGB and the Vec3f.