[vtkusers] Saving image with transparent background from Qt

Andras Lasso lasso at queensu.ca
Tue Mar 6 14:25:42 EST 2018


Thank you, we'll see what we can find. Interestingly, with the old OpenGL backend we could easily get transparent background rendering from Qt application windows.
 
Andras

-----Original Message-----
From: Ben Boeckel [mailto:ben.boeckel at kitware.com] 
Sent: Tuesday, March 6, 2018 2:17 PM
To: Andras Lasso <lasso at queensu.ca>
Cc: Ignacio Fernández Galván <jellby at yahoo.com>; vtkusers at vtk.org
Subject: Re: [vtkusers] Saving image with transparent background from Qt

On Tue, Mar 06, 2018 at 18:48:43 +0000, Andras Lasso wrote:
> Thank you, this is very useful.
> 
> Is this a temporary workaround only or this is going to be the 
> permanent solution? For augmented reality applications, where we need 
> to generate transparent overlays at high refresh rate, this method 
> would be quite expensive.

When I implemented the functionality, we couldn't think of anything else without tracking things at the shader level or using some "never seen anywhere" color as a baseline which is harder than this technique for ParaView.

There may be some way to get OpenGL to do what you want though. There's certainly support for rendering into a buffer with transparency information, but I don't know how to get Qt to do so. Terminal applications (e.g., Konsole) are most likely to have code to do so.

--Ben


More information about the vtkusers mailing list