MeshCat.jl icon indicating copy to clipboard operation
MeshCat.jl copied to clipboard

Set PointsMaterial vertexColors default to 0 to display proper color

Open jshahbazi opened this issue 4 years ago • 1 comments

The vertexColors default is currently set to 2, which makes the color always black regardless of what the color property is set to. Setting the value to 0 allows the proper color to be shown.

jshahbazi avatar Oct 25 '21 03:10 jshahbazi

Thank you for figuring out how to get the right color to show for point clouds of uniform color.

However, I tried it out, and setting vertexColors to 0 will also prevent each point from having a unique color, like in the example in demo.ipynb

colors = reinterpret(RGB{Float32}, points); # use the xyz value as rgb color
setobject!(vis[:pointcloud], PointCloud(points, colors))

nhz2 avatar Nov 01 '21 03:11 nhz2