10000 Pointcloud doesn't play nice with transparent meshes · Issue #13 · tentone/potree-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Pointcloud doesn't play nice with transparent meshes #13

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

Open
leefsmp opened this issue Nov 5, 2019 · 2 comments
Open

Pointcloud doesn't play nice with transparent meshes #13

leefsmp opened this issue Nov 5, 2019 · 2 comments
Labels
question Further information is requested

Comments

@leefsmp
Copy link
leefsmp commented Nov 5, 2019

Hi, not sure if this is an issue with potree-core, a side effect, or something to handle differently with my code:
We are mixing a large pointcloud with some meshes in the same scene, when selecting a mesh we want to affect it a semi-transparent material.

Here is the selected material, which works fine in a scene with only meshes:

 this.selectedMaterial = 
    new THREE.MeshStandardMaterial({
      transparent: true,
      color: "#2194ce",
      opacity: 0.8
    })

But when loading also a pointcloud, I have to set selectedMaterial.depthTest = false otherwise the selected mesh will mostly be invisible. Looks like there is an object in front which occlude it.

No selection:

Screen Shot 2019-11-05 at 15 14 02

Selection with depthTest = false:

Screen Shot 2019-11-05 at 15 13 29

Selection with depthTest = true:

Screen Shot 2019-11-05 at 15 14 23

@tentone
Copy link
Owner
tentone commented Nov 5, 2019

Hello

Seems kinda of weird aside from ordering transparent materials are rendered in the same way as other non-transparent ones in three.js.

Are you using logarithmic depth here?, Ensure that youre using LessEqualDepth for the depth function of your object. You can also turn renderer.sortObjects to false and try to ensure that the transparent object if renderer last.

I will try to replicate this soon.

@leefsmp
Copy link
Author
leefsmp commented Nov 5, 2019

Thanks for the feedback, not using logarithmic depth and set explicitly depthFunc: THREE.LessEqualDepth on the selected material, same result unfortunately.

I didn't test sortObjects: false, the meshes and the PC are being loaded in parallel, so I can't test that easily without doing some refactoring and we are ok for now to use depthTest: false. I just wanted to make sure I was not missing something obvious...

@tentone tentone added the question Further information is requested label Mar 10, 2020
tentone pushed a commit that referenced this issue Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants
0