-
Notifications
You must be signed in to change notification settings - Fork 470
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
Add point cloud styling section #138
Conversation
No. The plan is to continue to work on the implementation and see how impactful these limitations are, then we will be in a better position to decide. Can you submit an issue to this repo labeled "Draft 1.0" with the above info and then link to it from the Cesium roadmap issue? |
The spec is about the spec, not the Cesium implementation. I think the spec should say that the computed color from the style can be applied in an application-specific way, e.g., replace, modulate, mix. We just have to carefully word so that a valid implementation can't just set the color to black and say it conforms. |
@@ -469,6 +470,37 @@ ${temperatures.values[0]} === 70 | |||
${temperatures['values'][0]} === 70 // Same as (temperatures[values])[0] and temperatures.values[0] | |||
``` | |||
|
|||
### Point Cloud | |||
|
|||
In addition to evaluating a point's `color` and `show` properties, a point cloud style may evaluate `pointSize`, or the size of each point in pixels. The default `pointSize` is `1.0`. |
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.
Be more explicit here about what a point cloud is; mention the title type and link to it.
} | ||
``` | ||
|
||
Implementations may clamp the evaluated `pointSize` to the system's supported point size range. For example, WebGL renderers may query `ALIASED_POINT_SIZE_RANGE` to get the system limits when rendering with `POINTS`. |
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.
Perhaps say that a pointSize of 1.0 must be supported.
Implementations may clamp the evaluated `pointSize` to the system's supported point size range. For example, WebGL renderers may query `ALIASED_POINT_SIZE_RANGE` to get the system limits when rendering with `POINTS`. | ||
|
||
Point cloud styles may also reference per-point semantics including position, color, and normal to allow for more flexible styling of the source data. | ||
* `${POSITION}` is an array of three values representing the xyz coordinates of the point before the `RTC_CENTER` and tile transform are applied. When the positions are quantized, `${POSITION}` refers to the position after the `QUANTIZED_VOLUME_SCALE` is applied, but before `QUANTIZED_VOLUME_OFFSET` is applied. |
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.
Precisely say what coordinate system that is using the same terms in the point cloud spec.
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.
Also precisely say the type of each component, e.g., float
.
|
||
Point cloud styles may also reference per-point semantics including position, color, and normal to allow for more flexible styling of the source data. | ||
* `${POSITION}` is an array of three values representing the xyz coordinates of the point before the `RTC_CENTER` and tile transform are applied. When the positions are quantized, `${POSITION}` refers to the position after the `QUANTIZED_VOLUME_SCALE` is applied, but before `QUANTIZED_VOLUME_OFFSET` is applied. | ||
* `${COLOR}` evaluates to a Color type, where each of the rgba color components are in the range `0.0` to `1.0`. |
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.
Precisely state component type.
Point cloud styles may also reference per-point semantics including position, color, and normal to allow for more flexible styling of the source data. | ||
* `${POSITION}` is an array of three values representing the xyz coordinates of the point before the `RTC_CENTER` and tile transform are applied. When the positions are quantized, `${POSITION}` refers to the position after the `QUANTIZED_VOLUME_SCALE` is applied, but before `QUANTIZED_VOLUME_OFFSET` is applied. | ||
* `${COLOR}` evaluates to a Color type, where each of the rgba color components are in the range `0.0` to `1.0`. | ||
* `${NORMAL}` is an array of three values representing the normal of the point before the tile transform is applied. When normals are oct-encoded `${NORMAL}` refers to the decoded normal. |
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.
Precisely state coordinate system and component type.
|
||
Implementations may clamp the evaluated `pointSize` to the system's supported point size range. For example, WebGL renderers may query `ALIASED_POINT_SIZE_RANGE` to get the system limits when rendering with `POINTS`. | ||
|
||
Point cloud styles may also reference per-point semantics including position, color, and normal to allow for more flexible styling of the source data. |
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.
"semantics from the Feature Table"
```json | ||
{ | ||
"color" : "${COLOR} * color('red')'", | ||
"show" : "${POSITION}[0] > 0.5", |
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.
Should these be arrays or .xyz and .rgba? I get that the later is more work since we have to introduce a vec3 type to the styling language, but it is more natural.
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.
Yeah vec3/vec4 is more natural and is how a styling shader would implements it, as well as makes more sense in terms of math operations.
Bump. @lilleyse let's not forget about this one. |
Updated with reference to #166 |
That should be it, unless you see any areas to change. |
The |
Please submit an issue for this labeled In the meantime, it is OK to merge this with the TODO. |
This issue should have all the current GLSL limitations: #140 |
Added
pointSize
,${POSITION}
,${COLOR}
,${NORMAL}
@pjcozzi I'm in the process of writing a section for shader styling. Did we decide on a final solution for the current GLSL styling limitations? I have the current issues in CesiumGS/cesium#3241 under the
Point Cloud Shader Styling
section:and some notes here: CesiumGS/cesium#4336 (comment)
I am also going to write a section for the new
ColorBlendMode
types in CesiumGS/cesium#4451. Technically this is not part of the declarative styling language though, so should it go in theStyling
section or the main README ?