[Interest] Qt3D - Render to QImage

Sean Harmer sean.harmer at kdab.com
Mon Nov 28 11:13:13 CET 2016


On Monday 28 November 2016 02:23:59 Philip Schuchardt wrote:
> I'm trying to port my OpenGL code (https://github.com/Cavewhere/cavewhere/)
> to use Qt3D. I think Qt3D will allow me to quickly improve and modify my
> rendering pipeline. The one requirement I need is to be able to render to a
> QImage and save it to disk. Currently, have a method that renders
> high-resolution images from OpenGL. I do this by tiling a projection matrix
> and rendering the scene one tile at a time and combining them into on huge
> PNG. The problem is I'm not sure how to render Qt3D pipeline to a texture
> and then download if from the GPU into memory in Qt3D. Is there an easy way
> to do that? Do I need to create my own Aspect?

Hi, you can use a custom frame graph that includes a QRenderCapture node 
(coming in Qt 5.8). If you combine this with a camera and some logic for 
tiling the frustum (NodeInstantiator) you should be able to replicate your 
existing logic. I'd like to get something like this wrapped up along with Qt 
5.9.

> Also, many parts of the documentation seem to be missing, very light, and
> not up to the same standard as the rest of Qt's documentation.

Yes this is something I really want to have a push on in the near future.

Cheers,

Sean

> Perhaps,
> I'm just missing something from the undocumented documentation.
> 
> Thanks,
> Phi|ip

-- 
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts



More information about the Interest mailing list