How to use the raycasting on 3d object to get 2D image?

Gd morning
plz any one can help me to use the raycasting on 3d object to get 2D image? thnx

OSPRay’s “scivis” renderer comes to mind.

https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/RayTracing/Testing/Cxx/TestOSPRayPass.cxx