-
Notifications
You must be signed in to change notification settings - Fork 35
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
edit 3d tiles opacity and blending mode #1012
Conversation
// this.updateMaterials(); | ||
// this.el.getAttribute('tiles-material-change').needsUpdate = false; | ||
// } | ||
this.updateMaterials(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's expensive to keep doing a traverse on each tick, also it's creating an array each time [node.material]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, in obb-clipping this is throttled, I can do that again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately the result looks very bad if throttled, materials appear to "flicker" as they wait for the throttle to be adjusted to a different blending.
For now I'll keep it, but there are 2 options to fix:
- hook into the material post processing event in the existing 3d tiles library
- consider switching to better maintained library instead of optimizing this one, hook into its material post processing event https://github.com/NASA-AMMOS/3DTilesRendererJS?tab=readme-ov-file#custom-material (blocked by a-frame / three.js upgrade -- needs v166)
the default should not apply this unless a user selects it. an idea:
|
Wait, for the array allocation, I just thought that you will fix it like this: 3dstreet/src/components/polygon-offset.js Lines 23 to 48 in 40ace74
Not a complex cache with a WeakMap. For traversing of each tick, it probably doesn't matter much, you can do a Chrome profiling eventually with cpu throttling with and without the component to be sure. |
also select geo after setting in modal
No description provided.