Open paul0noah opened 1 year ago
Hi Thanks for reporting the issue unfortunately is seems to me that VTK is not supporting this... eg.
from vedo import *
sphere = Sphere()
sphere.cut_with_plane()
scals = sphere.points()[:, 0]
sphere.pointdata["scalars"] = scals
sphere.cmap("rainbow", scals, on="points")
sphere.add_scalarbar()
sphere.backcolor("white")
sphere.mapper().ScalarVisibilityOn()
show(sphere, axes=1).close()
still shows
Thats very interesting. On my Machine (M1 Macbook) i have the following output for:
from vedo import *
sphere = Sphere()
sphere.cut_with_plane()
scals = sphere.points()[:, 0]
sphere.pointdata["scalars"] = scals
sphere.cmap("rainbow", scals, on="points")
sphere.add_scalarbar()
sphere.backcolor("white")
show(sphere, axes=1).close()
and for
from vedo import *
sphere = Sphere()
sphere.cut_with_plane()
scals = sphere.points()[:, 0]
sphere.pointdata["scalars"] = scals
sphere.cmap("rainbow", scals, on="points")
sphere.add_scalarbar()
sphere.backcolor("white")
sphere.mapper().ScalarVisibilityOn()
show(sphere, axes=1).close()
As a conclusion i guess i have to live with my workaround?
As a conclusion i guess i have to live with my workaround?
yes i'm afraid :( I will investigate more the thing with vtk experts because i'm a bit surprised that it cannot be done..
Alright. Well at least it is do-able somehow 👍 You can close the issue already if you want to.
let's leave it open so I don't forget :)
Hi Marco,
i have colorised a mesh with per-vertex rgb values:
with some additional uv mapping i obtain the following result:
Since the mesh is "open", I want to display the inside without the coloring but rather with a custom color:
For that i used
mesh.backcolor([0, 0, 0])
but this function causes that the color of the mesh disappears and the figure looks as follows:My current solution is to create a second instance of
mesh
which i callmesh_interior
with the following options:This is quite ugly as i now have two instances of the same mesh in my code which i have to manage (e.g. have to remove both for dynamic scenes etc.).
Is there a better way to do this or do you plan to improve
backcolor
function so that it doesnt destroy color of mesh?