itowns
itowns copied to clipboard
fix(entwine): change transparency settings
Before contributing
Read CONTRIBUTING.md and CODING.md to apply iTowns
conventions on PRs, Git history and code.
Description
Motivation and Context
Screenshots (if appropriate)
Do you think it will fix this issue (#2323) ?
Do you think it will fix this issue (#2323) ?
Currently, I only have look up for a fix for PointCloudLayer (entwine Potree Layers). I will try to continue toward 3DTilesLayer
Do you think it will fix this issue (#2323) ?
Currently, I only have look up for a fix for PointCloudLayer (entwine Potree Layers). I will try to continue toward 3DTilesLayer
Understood. Thank you for your answer 👍
Thank you @ftoromanoff for this MR ! Looks like it solves the transparency issue :+1: It also exposed the fact that the 3dtiles is a PointCloud (or contains points) with hasPnts. I like this idea. Looks good to me !
I have an interrogation, it's not really related to this MR but it's about PointsMaterial.js
https://github.com/iTowns/itowns/blob/0e822cb268ad702df52020e58a1029ac21472b03/src/Renderer/PointsMaterial.js#L49-L80
WHat's the point of having a DEFAULT object in the ClassificationScheme & in the DiscreteScheme ?
Couldn't we put the DiscreteScheme directly in the ClassificationScheme ? We could access it with
ClassificationScheme.DISCRETE
export const ClassificationScheme = {
DEFAULT: {
0: { visible: true, name: 'never classified', color: new THREE.Color(0.5, 0.5, 0.5), opacity: 1.0 },
1: { visible: true, name: 'unclassified', color: new THREE.Color(0.5, 0.5, 0.5), opacity: 1.0 },
2: { visible: true, name: 'ground', color: new THREE.Color(0.63, 0.32, 0.18), opacity: 1.0 },
3: { visible: true, name: 'low vegetation', color: new THREE.Color(0.0, 1.0, 0.0), opacity: 1.0 },
4: { visible: true, name: 'medium vegetation', color: new THREE.Color(0.0, 0.8, 0.0), opacity: 1.0 },
5: { visible: true, name: 'high vegetation', color: new THREE.Color(0.0, 0.6, 0.0), opacity: 1.0 },
6: { visible: true, name: 'building', color: new THREE.Color(1.0, 0.66, 0.0), opacity: 1.0 },
7: { visible: true, name: 'low point(noise)', color: new THREE.Color(1.0, 0.0, 1.0), opacity: 1.0 },
8: { visible: true, name: 'key-point', color: new THREE.Color(1.0, 0.0, 0.0), opacity: 1.0 },
9: { visible: true, name: 'water', color: new THREE.Color(0.0, 0.0, 1.0), opacity: 1.0 },
10: { visible: true, name: 'rail', color: new THREE.Color(0.8, 0.8, 1.0), opacity: 1.0 },
11: { visible: true, name: 'road Surface', color: new THREE.Color(0.4, 0.4, 0.7), opacity: 1.0 },
12: { visible: true, name: 'overlap', color: new THREE.Color(1.0, 1.0, 0.0), opacity: 1.0 },
DEFAULT: { visible: true, name: 'default', color: new THREE.Color(0.3, 0.6, 0.6), opacity: 1.0 },
},
DISCRETE : {
0: { visible: true, name: '0', color: new THREE.Color('rgb(67, 99, 216)'), opacity: 1.0 },
1: { visible: true, name: '1', color: new THREE.Color('rgb(60, 180, 75);'), opacity: 1.0 },
2: { visible: true, name: '2', color: new THREE.Color('rgb(255, 255, 25)'), opacity: 1.0 },
3: { visible: true, name: '3', color: new THREE.Color('rgb(145, 30, 180)'), opacity: 1.0 },
4: { visible: true, name: '4', color: new THREE.Color('rgb(245, 130, 49)'), opacity: 1.0 },
5: { visible: true, name: '5', color: new THREE.Color('rgb(230, 25, 75)'), opacity: 1.0 },
6: { visible: true, name: '6', color: new THREE.Color('rgb(66, 212, 244)'), opacity: 1.0 },
7: { visible: true, name: '7', color: new THREE.Color('rgb(240, 50, 230)'), opacity: 1.0 },
DEFAULT: { visible: true, name: 'default', color: white, opacity: 1.0 },
},
};
WDYT ?
Thank you @ftoromanoff for this MR ! Looks like it solves the transparency issue 👍 It also exposed the fact that the 3dtiles is a PointCloud (or contains points) with hasPnts. I like this idea. Looks good to me !
I have an interrogation, it's not really related to this MR but it's about PointsMaterial.js
https://github.com/iTowns/itowns/blob/0e822cb268ad702df52020e58a1029ac21472b03/src/Renderer/PointsMaterial.js#L49-L80
WHat's the point of having a DEFAULT object in the ClassificationScheme & in the DiscreteScheme ? Couldn't we put the DiscreteScheme directly in the ClassificationScheme ? We could access it with
ClassificationScheme.DISCRETE
export const ClassificationScheme = { DEFAULT: { 0: { visible: true, name: 'never classified', color: new THREE.Color(0.5, 0.5, 0.5), opacity: 1.0 }, 1: { visible: true, name: 'unclassified', color: new THREE.Color(0.5, 0.5, 0.5), opacity: 1.0 }, 2: { visible: true, name: 'ground', color: new THREE.Color(0.63, 0.32, 0.18), opacity: 1.0 }, 3: { visible: true, name: 'low vegetation', color: new THREE.Color(0.0, 1.0, 0.0), opacity: 1.0 }, 4: { visible: true, name: 'medium vegetation', color: new THREE.Color(0.0, 0.8, 0.0), opacity: 1.0 }, 5: { visible: true, name: 'high vegetation', color: new THREE.Color(0.0, 0.6, 0.0), opacity: 1.0 }, 6: { visible: true, name: 'building', color: new THREE.Color(1.0, 0.66, 0.0), opacity: 1.0 }, 7: { visible: true, name: 'low point(noise)', color: new THREE.Color(1.0, 0.0, 1.0), opacity: 1.0 }, 8: { visible: true, name: 'key-point', color: new THREE.Color(1.0, 0.0, 0.0), opacity: 1.0 }, 9: { visible: true, name: 'water', color: new THREE.Color(0.0, 0.0, 1.0), opacity: 1.0 }, 10: { visible: true, name: 'rail', color: new THREE.Color(0.8, 0.8, 1.0), opacity: 1.0 }, 11: { visible: true, name: 'road Surface', color: new THREE.Color(0.4, 0.4, 0.7), opacity: 1.0 }, 12: { visible: true, name: 'overlap', color: new THREE.Color(1.0, 1.0, 0.0), opacity: 1.0 }, DEFAULT: { visible: true, name: 'default', color: new THREE.Color(0.3, 0.6, 0.6), opacity: 1.0 }, }, DISCRETE : { 0: { visible: true, name: '0', color: new THREE.Color('rgb(67, 99, 216)'), opacity: 1.0 }, 1: { visible: true, name: '1', color: new THREE.Color('rgb(60, 180, 75);'), opacity: 1.0 }, 2: { visible: true, name: '2', color: new THREE.Color('rgb(255, 255, 25)'), opacity: 1.0 }, 3: { visible: true, name: '3', color: new THREE.Color('rgb(145, 30, 180)'), opacity: 1.0 }, 4: { visible: true, name: '4', color: new THREE.Color('rgb(245, 130, 49)'), opacity: 1.0 }, 5: { visible: true, name: '5', color: new THREE.Color('rgb(230, 25, 75)'), opacity: 1.0 }, 6: { visible: true, name: '6', color: new THREE.Color('rgb(66, 212, 244)'), opacity: 1.0 }, 7: { visible: true, name: '7', color: new THREE.Color('rgb(240, 50, 230)'), opacity: 1.0 }, DEFAULT: { visible: true, name: 'default', color: white, opacity: 1.0 }, }, };
WDYT ?
The discrete cheme is indeed a scheme for point classification. But ClassificationScheme is for the 'classification' point classification. That's the reason why there is 2 differentes schemes, One for the classification using point classification and an other one for all the other (return number, type of return etc...). We can imagine that in a future (or a user) want to have different discrete scheme: one for the type of return and another one for the point source ID.
@AnthonyGlt Can you start a review, and validate it if you have no remarks on the code ? Thks