Is there a method for manipulating render queues?

Hi people!

I’m trying to do some post processing refracting objects within a deferred system I did, and need to manipulate the transparent render queue from a viewport. I have found that there is no method for doing this, not even a method for disabling render queues by bucket type, apart from the shadow queue.

The idea is to stop transparent objects from rendering on the main viewport, and rendering the queue after the viewport has rendered, and then clear the queue manually. The shadow queue works in a similar way, because it is not rendered by default.

While I know the render manager renders the transparent objects after all the other render queues, I need to move the queue to another viewport, because the deferred lighting accumulation happens later, and the refractive material needs the result texture.

So, is there a way to solve this? I think that with java reflection It can be done, but it goes against good code techniques.


Multiple viewPorts? Thats how such stuff is done normally.

I am using multiple viewports due to the deferred renderer, but the thing is I don’t want to have one spatial tree for transparent objects only. The idea is not interferring with the original scene, and just “extracting” the transparent render queue.

How and when do you set transparency? Would it be so hard to just attach the objects to another rootNode instead?

Just setting the queue bucket. I find this way is simple enough to prevent interfering with the scene (I’m trying to decouple rendering methods with the scene structure), but I guess if having multiple nodes is the only way, I’ll have to do ^^

Thanks for the quick reply!

maybe you should look into the translucent bucket, it has been added so that translucent object are rendered after post processing.

If you want transparent objects to be rendered after shadows for example place them in the translucent bucket.

However if you want transparent objects to be rendered after a specific Filter of the FilterPostProcessor, do the same thing, but place a TranslucentBucketFilter at the relevant place in your filter stack.

Ohh nice! I saw the Translucent bucket, but not the filter. I’ll definitely check it out!

Thanks! :smiley: