I am working off the 3d-tiles branch. I’ve created a particle effects class using the BillboardCollection to manage the particle geometries. I am using textures with alpha, and changing the alpha over time. I noticed the OIT was not working correctly for it. It performs blend, but not in the correct order all the time. Digging down I see that Pass.OPAQUE is used for the BillboardCollection. I changed it to Pass.TRANSLUCENT and the all the geometries blend together now, at least I would expect with OIT. What would be the correct solution to get the BillboadCollection to render in the TRANSLUCENT command list?
Wow, that looks great! I’m not sure what the right answer is here, but I’ve pinged some of our graphics developers to see if they have the answer.
Great work, thanks for sharing!
This is related to #2130. In the general case, billboards will require two passes; one for the opaque fragments and another for the transparent ones.
Your particle system would be useful to many Cesium users. Is this something you would consider contributing? We could work with you on the transparency issue, either by fully fixing #2130 or by an internal API to manually set the pass.
Thanks for the reference to the existing issue. I had trouble actually finding this info in the forums or issues. Must have been using the wrong search terms.
The particle system is fairly simple, and probably not up to your guys standards I’ll try to find some time to clean it up. I think I will add the internal API in my clone of Cesium to set the BillboardCollection to use the TRANSLUCENT pass.
Thanks for the help!
We have tons of ideas for a particle system and even a very old and incomplete branch, but we have never been able to prioritize it. So we would be very welcoming of your work - even if it is a simple start - as long as you are able to work with us a bit on the API and tests so we’re in good shape to build on it. For more info on contributing, see here.
Dan just fixed this in #4886, which will be in Cesium 1.30 on Tuesday, so you can remove your workaround next time you upgrade.
Also, we would love to see a demo when you have something and we are still very interested in a particle system contribution if you have the time.
Thank you for the info Patrick! We are moving along with are viewer and we are using Typescript for most of our code, including the Particle system. I looked at the current branch, and there are similar things. However, I preallocate all the Billboards that will be needed, set the ‘show’ property to false, and treat them like a pool of billboards. Maybe I can send you the class and you can do a cursory glance.
Yes, please send me a link to a demo and the file if you are able.
Do you have some sample code?