Skip to content

Commit

Permalink
wip(vispy): add lighting
Browse files Browse the repository at this point in the history
Need to find the right parameters for the light direction
  • Loading branch information
sanjayankur31 committed Nov 8, 2023
1 parent f2649ca commit 55823d3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyneuroml/plot/PlotMorphologyVispy.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,8 +887,15 @@ def create_instanced_meshes(meshdata, plot_type, current_view, min_width):
instance_transforms=instance_transforms,
instance_colors=instance_colors,
parent=current_view.scene,
shading="smooth",
)
# TODO: add a shading filter for light?
# make light go in direction of camera
# mesh.shading_filter.light_dir = current_view.camera.center
# mesh.shading_filter.shininess = 50
mesh.shading_filter.ambient_light = (1, 1, 1, 1)
# mesh.shading_filter.diffuse_light = (1, 1, 1, 0.7)
# mesh.shading_filter.specular_light = (1, 1, 1, 0.2)

assert mesh is not None
pbar.finish()

Expand Down

0 comments on commit 55823d3

Please sign in to comment.