Draw outline of 3D object


is there a possibility to render the outline of a 3D object just like Blender does? I mean the orange outline that is displayed around the maximum extents of the object when selected:
Thanks for your help.

Hello, friend,

You need something called outline shader. That would require lower level calls to OpenGL (assuming this is your rendering backend). Hence, you will need to write a custom vtkMapper to add that effect. You can take a look at the code of your current mapper ( see all vtkMapper classes here: https://vtk.org/doc/nightly/html/classvtkMapper.html ). To see how to implement outline shading, you can read about it here: https://www.codeproject.com/Articles/8499/Generating-Outlines-in-OpenGL and here: https://gamedev.stackexchange.com/questions/70861/how-to-outline-a-3d-object-with-a-cartoon-style-stroke .




Thank you for that input.

Doesn’t vtkPolyDataSilhouette do this?

I’ve never used it, but it’s on my list of things to look at when I get time…

Someone made a contribution to add this feature (not merged yet): https://gitlab.kitware.com/vtk/vtk/-/merge_requests/6812

1 Like