Vedo: Text actor followcam.

Created on 30 Oct 2019  路  3Comments  路  Source: marcomusy/vedo

Hi Marco

The followcam parameter in Text makes the text disappear when True in k3d, vtk or qt. Is there a workaround to make the text always face the camera when rotating.

from vtkplotter import Sphere, Point, show, Text

# Tried in all three renderes
# embedWindow('k3d')
# embedWindow('itk')
# embedWindow(False) 

sp = Sphere().wireframe(True)
pcoords = sp.getPoint(144)
pt = Point(pcoords, r=12, c="white")

tx = Text("my fave\npoint", pcoords, s=0.1, c="lightblue", bc="green", followcam=True)
# tx.followcam = True
show(sp, pt, tx, Text(__doc__), axes=1)

Thank you.

bug testing-phase

Most helpful comment

Hi @mahendra-ramajayam
try the following example:
https://github.com/marcomusy/vtkplotter/blob/master/examples/plotting2d/markpoint.py

Peek 2019-11-04 18-34

Note that this can only work in the standard vtk rendering window, neither k3d nor itkwidgets support this feature.

PS: you need to pull the latest commit to make it run

All 3 comments

Hi @mahendra-ramajayam
try the following example:
https://github.com/marcomusy/vtkplotter/blob/master/examples/plotting2d/markpoint.py

Peek 2019-11-04 18-34

Note that this can only work in the standard vtk rendering window, neither k3d nor itkwidgets support this feature.

PS: you need to pull the latest commit to make it run

Works great in the vtk renderer, Thanks Marco.

However, I'm trying to create a custom tetrahedron axis. I would like the axis labels to face the camera.
K3D-1572992176623
I'm also trying to use ipywidgets to filter data for plotting within the tetrahedron. followCamera() in jupyter notebook rendering would be a great addition.

Thank you

Hi Mahi, you may only achieve it by creating text in the correct positions along the tet edge manually.
the followCamera() thing does not depend on vtkplotter but on itkwidgets or k3d backends.. i'm not sure if there is any plans for them to implement it..

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kemo993 picture kemo993  路  6Comments

FedeClaudi picture FedeClaudi  路  7Comments

vigji picture vigji  路  3Comments

Jesse0818 picture Jesse0818  路  4Comments

FedeClaudi picture FedeClaudi  路  6Comments