[Interest] Qt3D - Render to QImage

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


Hi,

On Monday 28 November 2016 11:22:30 Juan Jose Casafranca wrote:
> Hi Sean,
> 
> is there any example on how to do that? I tried to use a QRenderCapture but
> I failed two weeks ago.

http://code.qt.io/cgit/qt/qt3d.git/tree/tests/manual/rendercapture-qml
http://code.qt.io/cgit/qt/qt3d.git/tree/tests/manual/rendercapture-cpp
 
> Is there any way to access the buffers content data using a similar
> approach to the QRenderCapture method?
> For example, in an animation system, use a graphics pipeline to compute the
> deformed mesh and then get the new vertex positions for export.

Right, that is missing at the moment. It would be very useful to be able to do 
this to read back the results of a compute shader too for e.g.. If you wish to 
have a go at adding such a feature analogous the the RenderCapture node then 
that would be awesome. If not, we can try to do it for 5.9 but the feature 
freeze is approaching. In either case could you file a JIRA for it please?

Thanks!

Sean

> 
> Cheers
> Juan José
> 
> 2016-11-28 11:13 GMT+01:00 Sean Harmer <sean.harmer at kdab.com>:
> > 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
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest

-- 
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