Render Manager & transparency
by elvince · in Torque 3D Professional · 02/05/2010 (3:56 am) · 5 replies
Hi,
I have a strange issue with my custom render manager.
When I called it, I don't have prepass or mesh rendering, so the only render is done by my manager (this is what I need).
The issue is that my input texture is like if the model is treated as transparent.
My texture rendered without my posteffect (1), With my posteffect (2-3)

The render manager was made on the "selection" manager which take the same approach as GlowManager.
It's based on RenderTexTargetBinManager and not a RenderBinManager. Is it the root cause? What the big difference between those?
In fact, the same input texture is perfectly rendered is I follow the regular process (prepass -> Mesh render)
I don't understand everything on this feature at the moment, this is why I may have asked a dumb question :(
Thanks,
I have a strange issue with my custom render manager.
When I called it, I don't have prepass or mesh rendering, so the only render is done by my manager (this is what I need).
The issue is that my input texture is like if the model is treated as transparent.
My texture rendered without my posteffect (1), With my posteffect (2-3)
The render manager was made on the "selection" manager which take the same approach as GlowManager.
It's based on RenderTexTargetBinManager and not a RenderBinManager. Is it the root cause? What the big difference between those?
In fact, the same input texture is perfectly rendered is I follow the regular process (prepass -> Mesh render)
I don't understand everything on this feature at the moment, this is why I may have asked a dumb question :(
Thanks,
About the author
Recent Threads
#2
http://diaryofagraphicsprogrammer.blogspot.com/2008/03/light-pre-pass-renderer.html for the overview of it (the Renderer Design link is the easiest to read I think).
Essentially the Pre-Pass Renderer acquires all the Normal and Depth information, to be computed for advanced Lighting. This means, that without the Pre-Pass, you cannot have advanced lighting. The reason that Light Pre-pass is not called on translucent objects is because that rendering design cannot currently handle translucencies effectively.
So without the Pre-pass you are going to be stuck with only basic lighting and very possibly alpha blending inconsistencies, if there is somewhere in the code where it assumes that no pre-passed objects have transparencies. As far as using the Mesh bin manager after, if I had to guess it'd be that the Mesh Manager specifically retrives the data from the Lighting Buffer.
As a place to check for a way to fix it, I'd look at the Alpha Blending rules either within the Glow Manager you used as a prototype, or their current states if not reset. Either disable it entirely or make sure the Alphatest is Greater if you need transparencies in your meshes.
02/07/2010 (3:46 pm)
It has to do with the concept of Light Pre-Pass rendering.http://diaryofagraphicsprogrammer.blogspot.com/2008/03/light-pre-pass-renderer.html for the overview of it (the Renderer Design link is the easiest to read I think).
Essentially the Pre-Pass Renderer acquires all the Normal and Depth information, to be computed for advanced Lighting. This means, that without the Pre-Pass, you cannot have advanced lighting. The reason that Light Pre-pass is not called on translucent objects is because that rendering design cannot currently handle translucencies effectively.
So without the Pre-pass you are going to be stuck with only basic lighting and very possibly alpha blending inconsistencies, if there is somewhere in the code where it assumes that no pre-passed objects have transparencies. As far as using the Mesh bin manager after, if I had to guess it'd be that the Mesh Manager specifically retrives the data from the Lighting Buffer.
As a place to check for a way to fix it, I'd look at the Alpha Blending rules either within the Glow Manager you used as a prototype, or their current states if not reset. Either disable it entirely or make sure the Alphatest is Greater if you need transparencies in your meshes.
#3
02/07/2010 (3:48 pm)
You always have a pre-pass,it happens automatically for AL.
#4
I implemented a new rit category to skip prepass & mesh manager.
So for me only my manager will render the mesh.
Ivan,
do you mean that with AL there is another process that will do a prepass for AL even with a new rit?
If I understand well if I keep the prepass, my mesh will be well rendered but how can I got the full background texture without my mesh? This is why I set the new rit and avoid other render manager process!
Thanks for your help.
02/07/2010 (4:46 pm)
I'm little bit confused with prepass. I implemented a new rit category to skip prepass & mesh manager.
So for me only my manager will render the mesh.
Ivan,
do you mean that with AL there is another process that will do a prepass for AL even with a new rit?
If I understand well if I keep the prepass, my mesh will be well rendered but how can I got the full background texture without my mesh? This is why I set the new rit and avoid other render manager process!
Thanks for your help.
#5
This is the reason why GG pack/unpack the data using conditioners/unconditioners.
The next step is using this texture they render the lights in the scene to a texture on a per-pixel basis (for each screen pixel).
The final step is that they render the scene again with all the materials and textures. They don't do any lightning calculations, they sample the previous texture instead.
02/07/2010 (4:57 pm)
Pre-pass is a pass that renders objects’ normals and depth to a render target (texture).The texture color data is clamped in range [0-1] so we can not store this data directly.This is the reason why GG pack/unpack the data using conditioners/unconditioners.
The next step is using this texture they render the lights in the scene to a texture on a per-pixel basis (for each screen pixel).
The final step is that they render the scene again with all the materials and textures. They don't do any lightning calculations, they sample the previous texture instead.
Torque Owner elvince
Neo Studio
I'm trying to understand why PrePass manager render an "non translucent" material and my manager does without any change.
What paramater I should check?