[Interest] Qt3D filtering for different renderviews
Juan José Casafranca
jjcasmar at gmail.com
Thu Mar 30 11:08:58 CEST 2017
One solution I though about was to inherit from QEntity and in the
constructor, add the parent QLayer component.
That way I have the recursive solution and as long as I use the new entity
class I don't have to do anything special.
@Sean: Have a look at the suggestion I posted in the JIRA (https://
bugreports.qt.io/browse/QTBUG-59814). I think an approach based on the
QLayerFilter may be more powerful than making QLayer recursive.
On jueves, 30 de marzo de 2017 10:47:33 (CEST) Sean Harmer wrote:
> 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
More information about the Interest
mailing list