-
Hi Marco, hope you are well!!
What happens here is that the colour is change only, rather than changing the colour and opacity when the pointdata field is selected. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi J from vedo import *
#settings.use_depth_peeling = True
pts = Sphere().clean().points()
tor = Points(pts, r=20)
#tor.render_points_as_spheres(False)
rgba = np.random.rand(tor.ncells, 4)*255 # RGBA values
colorlist = rgba.astype(np.uint8) # note the uint8 type
tor.celldata["mycols"] = colorlist
tor.celldata.select("mycols")
show(tor).close() Also note the shortcut: # ...
rgba = np.random.rand(tor.ncells, 4)*255 # RGBA values
tor.cell_individual_colors(rgba)
show(tor).close() |
Beta Was this translation helpful? Give feedback.
Hi J
points are also cells by themselves so, check out
https://github.com/marcomusy/vedo/blob/master/examples/basic/colorMeshCells.py
Also note the shortcut: