[Interest] Qt3D filtering for different renderviews

Sean Harmer sean.harmer at kdab.com
Thu Mar 30 10:47:33 CEST 2017


Hi,

On Thursday 30 March 2017 02:28:29 Juan José Casafranca wrote:
> Hi,
> 
> Im building a simple default viewer using Qt3D for a design tool. I'm trying
> to add a typical gradient background and for that I'm using the following
> approach.
> 
> I have create a custom framegraph with 2 renderviews.
> The first renderview clears the buffers, select an ortographic camera and
> have a layerfilter (background).
> The second renderview is the default forwardrenderer framegraph but I have
> change the clearbuffers to DepthBuffer only so it doesn't delete the
> background.
> 
> The framegraph works fine, but I'm having a little issue. The background is
> a QPlaneMesh where I have added a color attribute so I can use the
> QPerVertexColorMaterial and the background layer so it's the only entity
> viewed by the first renderview. But the second renderview also see this
> entity and is painting it.
> 
> How can I make the second renderview to skip the background entity? I have
> tried to add a LayerFilter for it, but that way I have to add a Layer
> component to each object in my scene, which is not practical.
> 
> Any idea?

Yes, we'd like to make this support recursive filtering as an option. For now, 
it's not that hard to add the layer component to all other entities. Create 
the layer component once somewhere, perhaps in the framegraph or somewhere 
else that is readily accessible in your application (perhaps some scene or 
application state object) and export that to QML (if using QML). You can share 
the same QLayer object between all Entity's.

Cheers,

Sean

> 
> Thanks!!
> _______________________________________________
> 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