[vtkusers] vtkBillboardTextActor3D overlay effect desired.

David Lonie david.lonie at kitware.com
Thu Dec 8 14:13:04 EST 2016


Try vtkTextActor, it should give you what you want. vtkBillboardTextActor3D
was written to behave like vtkTextActor but be embedded in the scene and
interact with 3D geometry, while vtkTextActor will always be rendered as an
overlay, on top of any 3D geometry.

If you still want to hide the text when the anchor points are occluded, you
probably want to use vtkLabeledDataMapper with vtkSelectVisiblePoints.
You'll need to create a dataset with the anchor points, and add a
vtkStringArray to the dataset's PointData that contains the labels. Then,
call SetLabelMode(VTK_LABEL_FIELD_DATA) and
vtkSetFieldDataName(stringArray->GetName()) on the mapper.

HTH,
Dave

On Thu, Dec 8, 2016 at 1:50 PM, Seun Odutola <seun at rogue-research.com>
wrote:

> Hi everyone,
>
>     I am currently trying out vtkBillboardTextActor3D and was hoping
> someone here could give me couple of pointers. I have a situation where I
> have a caption which is basically a text (vtkBillboardTextActor3D) paired
> with an electrode (vtkActor) on a Mesh. vtkBillboardTextActor3D gives the
> desired effect of always being oriented with the camera, it’s also occluded
> by the mesh if the camera rotates away from the electrode (which is fine)
> however  depending on text (number of characters) I run into a situation
> where when rotating the scene (camera rotates) the bill board rotates the
> text in such a way in intersects the mesh (this is not desirable). I was
> wondering if there was a way to have the caption (the
> vtkBillboardTextActor3D) preserve its behaviour but still be able to have
> its text overlay on the mesh. See attached screenshots, notice how
> electrode 3 gets clipped as it intersects the mesh but when rotated it’s
> visible.
>
> link to screenshots:
> https://www.rogue-research.com/vtkBillboard1.png
> https://www.rogue-research.com/vtkBillboard2.png
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161208/4d727b35/attachment.html>


More information about the vtkusers mailing list