Skip to content

Commit b98a152

Browse files
authored
Merge pull request #91 from CesiumGS/BENTLEY_materials_point_style
BENTLEY_materials_point_style
2 parents 7bbd909 + be7ce30 commit b98a152

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<!--
2+
Copyright 2025 Bentley Systems, Incorporated
3+
SPDX-License-Identifier: CC-BY-4.0
4+
-->
5+
6+
# BENTLEY_materials_point_style
7+
8+
## Contributors
9+
10+
* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne)
11+
* Mark Schlosser, Bentley Systems, [@markschlosseratbentley](https://github.com/markschlosseratbentley)
12+
* Daniel Zhong, Bentley Systems, [@danielzhong](https://github.com/danielzhong)
13+
14+
## Status
15+
16+
Draft
17+
18+
## Dependencies
19+
20+
Written against the glTF 2.0 spec.
21+
22+
## Overview
23+
24+
Points are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. In such visualizations, individual point primitives may differ in their styling, mainly focused around their diameter in screen pixels. Such diameter can be used to indicate a variety of meanings useful to CAD applications.
25+
26+
This specification describes a minimal extension sufficient to meet Bentley Systems' requirements in supporting CAD-style visualizations of points using glTF.
27+
28+
## Specifying Point Styles
29+
30+
The `BENTLEY_materials_point_style` extension is applied to a material. When that material is used by a `POINTS` primitive (indicated by a value of `0` for [`mesh.primitive.mode`](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#_mesh_primitive_mode)), the extension dictates the diameter of those points in pixels.
31+
32+
### Diameter
33+
34+
The `diameter` property specifies the diameter of each point in CSS pixels. When specified, this value must be greater than zero.
35+
36+
For each point, implementations should render the point such that a filled circle is centered at the point's CSS pixel screen position with a pixel diameter equal to `diameter`. This point faces the camera.
37+
38+
Note: The term "CSS pixel" follows the [CSS3 definition](https://www.w3.org/TR/css-values-3/#absolute-lengths). Per that definition, the CSS pixel is defined as $1\text{px} = \frac{1}{96}\text{th}\ \text{of}\ 1\text{in}$, which this specification adopts for clarity and stability.
39+
40+
## Implementation Notes
41+
42+
Some graphics APIs may not require that implementations directly support point sizes greater than one. For example, [Section 3.4 of the OpenGL ES 3.0 Specification](https://registry.khronos.org/OpenGL/specs/es/3.0/es_spec_3.0.pdf) only guarantees a maximum point size of at least one via `ALIASED_POINT_SIZE_RANGE`. In such cases, points with diameters greater than one could be rendered as quads which are shaped into circles using a shader.
43+
44+
## JSON Schema
45+
46+
* [material.BENTLEY_materials_point_style.schema.json](schema/material.BENTLEY_materials_point_style.schema.json)
47+
48+
## Known implementations
49+
50+
* [iTwin.js](https://github.com/iTwin/itwinjs-core/pull/8835)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"title": "BENTLEY_materials_point_style extension",
4+
"type": "object",
5+
"description": "Specifies point diameter for CAD-style visualization.",
6+
"allOf": [
7+
{ "$ref": "glTFProperty.schema.json" }
8+
],
9+
"properties": {
10+
"diameter": {
11+
"type": "integer",
12+
"description": "Diameter of the point in screen pixels. Must be > 0.",
13+
"minimum": 1
14+
},
15+
"extensions": {},
16+
"extras": {}
17+
},
18+
"required": ["diameter"]
19+
}

0 commit comments

Comments
 (0)