rdb
August 15, 2023, 8:15am
4
If you know that one will always be inside the other, you can be explicit about the ordering to Panda, and get the correct result. But if there is more complex overlap, then this will not be satisfactory.
Otherwise, you need a technique such as depth peeling, which has been requested as a feature here (feel free to add your voice):
opened 03:08AM - 05 Nov 22 UTC
enhancement
## Description
The current methods available for the creation of large transp… arent objects have certain limitations which result in imperfect visualization of surface meshes with transparent vertices. I have detailed this issue in [this blog post](https://discourse.panda3d.org/t/transparency-of-3d-surface-vertices/28873). A suggested solution that can resolve this problem would be [depth peeling](https://developer.download.nvidia.com/assets/gamedev/docs/OrderIndependentTransparency.pdf). It has previously been implemented in tools such as Mayavi, and in my experience, the results after depth peeling are satisfactory.
It would be great if depth peeling could be added as a new feature, potentially as a new `TransparencyAttrib` that the user could enable.
## Use Case
<!-- Describe why you need this change, how it will help you, including any
other imagined scenarios in which it will be useful. If this request is
urgent and you have no alternatives, please state so as well. -->
The main use case of this feature would be in rendering objects with transparency. *Order-independent transparency* remains to be a subject of interest in computer graphics for rendering transparency accurately and depth peeling is a relatively straightforward method that achieves a great level of quality in rendering transparency.
I think that this change is highly important as there are many cases where transparent objects need to be rendered and currently implemented panda3d methods fail at providing proper transparency visualizations.
Or per-pixel linked lists:
Here is a minimal implementation of Order-Independent Transparency using Per-Pixel Linked Lists in Panda3D, a technique for handling transparency and blending in a pixel-perfect manner.
It works by rendering the scene with a fragment shader that stores all transparent fragments in an external linked-list, with the head of that linked-list associated with the current framebuffer pixel. Then, in a post-processing shader, this list is sorted and blending is performed back-to-front. It needs adva…
Or Weighted Blended, which gives a technically inaccurate result but perhaps still acceptable:
3 Likes