[Interest] Split entities into groups and render them in custom order

Oleg Evseev ev.mipt at gmail.com
Tue Jul 12 15:45:09 CEST 2016


Thank you, Sean and Harald.

I tried that order you suggested in "enable-qml" as I mentioned in the
previous letter (2016.07.10)

Only if I put ClearBuffers into LayerFilter:
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
> **** LayerFilter [layer = sceneLayer]
> ***** ClearBuffers
> filtering got work
>

And this one is working too (thanks, do not about NoDraw class):

alternatively put a NoDraw as a child of CLearBuffers to prevent that
> branch from drawing anything.
>

But in my project with "opaque", "environment" and "transparent" layers
this order:

* Viewport
** RenderSurfaceSelector
*** CameraSelector
**** LayerFilter [layer = opaque]
***** ClearBuffers
**** LayerFIlter [layer = environment]
**** LayerFilter [layer = transparent]
***** SortPolicy [ front to back]

didn't work in first - there was only environment entity. That's why I
wrote new letter.

After all, I have understood that it was my bad. The thing is that every
drawable entity should have layer component, that is, if only root entity
have layer component (as I did), it's children are filtered and not
rendered.

*Entity (layer= opaque)
**Entity child 1 (mesh,material, [not rendered if there is no layer])
**Entity child 2 (mesh,material, [not rendered if there is no layer])

I can add Layer to all "my" own entities, I am creating, but what should I
do with many entities within obj 3d model loaded with help of SceneLoader.
I need to loop through all entities and add corresponding layer to each? Or
may be there is another way to tell framegraph to render all entities that
are inside Entity with Layer component?


p.s. still have a question about how to do RenderStateSet [ disable depth
writes ] leaf, you wrote about

QRenderStateSet *renderStateSet = new QRenderStateSet();

QRenderState *renderState = new QRenderState();

renderState->???;

renderStateSet->addRenderState(renderState);


How to make "disable depth writes" renderState?

Thank you for help!

---
Regards, Oleg


2016-07-12 12:17 GMT+03:00 Sean Harmer <sean.harmer at kdab.com>:

> Hi,
>
> On 12/07/2016 09:18, Harald Vistnes wrote:
>
> Oleg,
>
> Did you try putting the ClearBuffers as a child of the first LayerFilter?
> Then the second LayerFilter can be a leaf node.
>
> * Viewport
> ** RenderSurfaceSelector
> *** CameraSelector
> **** LayerFilter [layer = opaque]
> ***** ClearBuffers
> **** LayerFilter [layer = transparent]
>
>
> That should work, or alternatively put a NoDraw as a child of CLearBuffers
> to prevent that branch from drawing anything.
>
> Cheers,
>
> Sean
>
> Harald
> On Jul 12, 2016 09:38, "Oleg Evseev" < <ev.mipt at gmail.com>
> ev.mipt at gmail.com> wrote:
>
>>
>> 2016-07-10 19:09 GMT+03:00 Oleg Evseev <ev.mipt at gmail.com>:
>>
>>> I tried to make following sequence in "enable-qml" manual test example
>>> by cleaning it (attached it):
>>>
>>> * Viewport
>>> ** RenderSurfaceSelector
>>> *** CameraSelector
>>> **** ClearBuffers
>>> **** LayerFilter [layer = sceneLayer]
>>>
>>> And it renders whole scene (sphere + floor), that is, ignores
>>> LayerFilter:
>>>
>>
>> Experiment with different ordering, still can't understand how it works.
>> May it be a bug with LayerFilter? Should I file in JIRA?
>>
>> ---
>> Regards, Oleg
>>
>>
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
> _______________________________________________
> Interest mailing listInterest at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160712/dce2ce4f/attachment.html>


More information about the Interest mailing list