|
| 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) |
0 commit comments