-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Transparent individual pointcloud classes don't get rendered as transparent #2323
Comments
Linked with your issue, I noticed a similar bug on PointCloudLayer (entwine and Potree). |
I tested your fix, and I couldn't make it work for 3dTiles. I suspect that the problem is linked to the fact that the 3dTiles pointsMaterial is instanciated here : itowns/src/Provider/3dTilesProvider.js Lines 34 to 50 in 14891fd
It seems that something like what you implemented here is needed : https://github.com/ftoromanoff/itowns/blob/41fbaa3780245939b50cbc8b19cc79287de8aa2f/src/Layer/PointCloudLayer.js#L197 |
Should be fixed now. |
Tested, it seems fixed ! Thank you @ftoromanoff |
Context
I am using classified pointclouds provided as 3D Tiles.
I am setting a custom classificationScheme to choose color and opacity for each individual pointcloud class.
Setting colors works fine. Reducing opacity will however fade the point color to white instead of making it transparent.
On the screenshot bellow the buildings are excpected to look half-transparent red but appear pink and opaque instead.
Steps to Reproduce
Expected Behavior
The classified points should be rendered as transparent.
Actual Behavior
The classified point are getting whiter.
Possible Cause/Fix/Solution
It seems that the point material transparent property is not set correctly. Thus it renders the color alpha as color intensity instead of transparency. This happens because the layer opacity is set to 1. Even if we try to set the whole layer material transparent, the transparent property getter overwrites the value depending on the opacity. See here :
itowns/src/Layer/ReferencingLayerProperties.js
Lines 48 to 56 in 48fb9df
The text was updated successfully, but these errors were encountered: