VTK – Set Image As Render Background, Save 3D Model Screen Shot With Transparent Background

Set An Image As Render Background std::string bgImgPath = “./resource/bg.png”; vtkNew<vtkPNGReader> imgReader; imgReader->SetFileName(bgImgPath.c_str()); vtkNew<vtkTexture> backgroundTexture; backgroundTexture->SetInputConnection(imgReader->GetOutputPort()); m_Renderer->GradientBackgroundOff(); backgroundTexture->Update(); m_Renderer->SetBackgroundTexture(backgroundTexture); m_Renderer->SetTexturedBackground(true); Save 3D Model Screen Shot With Transparent Background Don’t set textured background for renderer object. Then set alpha bits for renderer window object, read RGBA information from back buffer when Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X