Skip to content

Commit 49343e0

Browse files
committed
fix editor snafu
1 parent 0020564 commit 49343e0

File tree

2 files changed

+29
-26
lines changed
  • extensions/2.0/Vendor

2 files changed

+29
-26
lines changed

extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright 2015-2025 The Khronos Group Inc.
33
SPDX-License-Identifier: CC-BY-4.0
44
-->
55

6-
# BENTLEY_materials_point_style
6+
# BENTLEY_materials_line_style
77

88
## Contributors
99

@@ -19,25 +19,41 @@ Written against the glTF 2.0 spec.
1919

2020
## Overview
2121

22+
3D modeling and computer-aided drafting (CAD) environments like SketchUp, MicroStation, and Revit use lines extensively to annotate both two- and three-dimensional visualizations. Different lines are rendered with different styles to convey particular semantics and/or differing levels of emphasis. A CAD line style specifies the width of the line and a dash pattern. The BENTLEY_materials_line_style augments a material with a description of a CAD line style.
23+
2224
This specification describes a minimal extension sufficient to meet Bentley Systems' requirements, with some suggestions for how it might be broadened and/or generalized while retaining a focus on CAD visualization.
2325

2426
## Specifying Line Styles
2527

26-
The `BENTLEY_materials_point_style` extension is applied to a material. When that material is used by a POINTS primitive, the extension dictates the size of the points.
28+
The `BENTLEY_materials_line_style` extension is applied to a material. If that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, then it dictates the width and pattern with which the lines are to be drawn.
29+
30+
The `width` property specifies the width in pixels of the lines. For each line segment, extrude by half this width perpendicularly on both sides.
31+
32+
> Potential generalization: permit width to be specified in meters.
33+
34+
> Potential generalization: permit pixel width to scale with distance between a minimum and maximum.
2735
28-
The `size` property specifies the diameter of each point in pixels.
36+
> Potential generalization: we currently assume lines face the camera, which is sensible when using pixels as units of measure. But the glTF spec permits for lines to have normal and tangent attributes for purposes of lighting; this could also be used to specify the plane in which they should be extruded.
2937
30-
> Potential generalization: we assume round points. Permit square points? Permit the material's texture to be mapped to the point's bounding box to support arbitrary point shapes?
38+
The `pattern` property specifies a pixel pattern to be repeated along the length of the line. It is an arbitrary length bitfield expressed as a string in which a `-` (hyphen) indicates a lit pixel and a ` ` (space) indicates an unlit pixel. The first character in the string determines whether the first pixel drawn by the line is lit or not, and so on until the last character, at which point the pattern repeats from the first character.
3139

32-
> Potential generalization: we currently assume points face the camera, which is sensible when using pixels as units of measure. But the glTF spec permits for points to have normal attributes for purposes of lighting; this could also be used to specify the plane in which they should be drawn.
40+
> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters.
3341
34-
> Potential generalization: permit size to be specified in meters.
42+
> TBD: do pixel widths and patterns refer to device pixels or screen pixels?
3543
3644
## glTF Schema Updates
3745

3846

47+
3948
## Implementation Notes
4049

50+
Because many graphics APIs do not support line primitives with a width larger than 1, tesselation is generally required to draw wide lines. Implementations may smooth out the tesselated lines by, e.g., inserting additional triangles at the joints to round them.
51+
52+
> Potential generalization: permit the join style (e.g., round, miter, bevel, diamond) and end cap style (butt, round, diamond, square) to be specified.
53+
54+
The pattern should be continuous along the length of each continuous line string or line loop.
55+
56+
Implementations may choose to aggregate the set of unique dash patterns into a texture with one row per pattern to be indexed by the shader program when applying a line style's pattern.
4157

4258
## JSON Schema
4359

extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright 2015-2025 The Khronos Group Inc.
33
SPDX-License-Identifier: CC-BY-4.0
44
-->
55

6-
# BENTLEY_materials_line_style
6+
# BENTLEY_materials_point_style
77

88
## Contributors
99

@@ -19,40 +19,27 @@ Written against the glTF 2.0 spec.
1919

2020
## Overview
2121

22-
3D modeling and computer-aided drafting (CAD) environments like SketchUp, MicroStation, and Revit use lines extensively to annotate both two- and three-dimensional visualizations. Different lines are rendered with different styles to convey particular semantics and/or differing levels of emphasis. A CAD line style specifies the width of the line and a dash pattern. The BENTLEY_materials_line_style augments a material with a description of a CAD line style.
23-
2422
This specification describes a minimal extension sufficient to meet Bentley Systems' requirements, with some suggestions for how it might be broadened and/or generalized while retaining a focus on CAD visualization.
2523

2624
## Specifying Line Styles
2725

28-
The `BENTLEY_materials_line_style` extension is applied to a material. If that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, then it dictates the width and pattern with which the lines are to be drawn.
29-
30-
The `width` property specifies the width in pixels of the lines. For each line segment, extrude by half this width perpendicularly on both sides.
26+
The `BENTLEY_materials_point_style` extension is applied to a material. When that material is used by a POINTS primitive, the extension dictates the size of the points.
3127

32-
> Potential generalization: permit width to be specified in meters.
33-
> Potential generalization: permit pixel width to scale with distance between a minimum and maximum.
34-
> Potential generalization: we currently assume lines face the camera, which is sensible when using pixels as units of measure. But the glTF spec permits for lines to have normal and tangent attributes for purposes of lighting; this could also be used to specify the plane in which they should be extruded.
28+
The `size` property specifies the diameter of each point in pixels.
3529

36-
The `pattern` property specifies a pixel pattern to be repeated along the length of the line. It is an arbitrary length bitfield expressed as a string in which a `-` (hyphen) indicates a lit pixel and a ` ` (space) indicates an unlit pixel. The first character in the string determines whether the first pixel drawn by the line is lit or not, and so on until the last character, at which point the pattern repeats from the first character.
30+
> Potential generalization: we assume round points. Permit square points? Permit the material's texture to be mapped to the point's bounding box to support arbitrary point shapes?
3731
38-
> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters.
32+
> Potential generalization: we currently assume points face the camera, which is sensible when using pixels as units of measure. But the glTF spec permits for points to have normal attributes for purposes of lighting; this could also be used to specify the plane in which they should be drawn.
3933
40-
> TBD: do pixel widths and patterns refer to device pixels or screen pixels?
34+
> Potential generalization: permit size to be specified in meters.
4135
4236
## glTF Schema Updates
4337

4438

45-
4639
## Implementation Notes
4740

48-
Because many graphics APIs do not support line primitives with a width larger than 1, tesselation is generally required to draw wide lines. Implementations may smooth out the tesselated lines by, e.g., inserting additional triangles at the joints to round them.
49-
50-
> Potential generalization: permit the join style (e.g., round, miter, bevel, diamond) and end cap style (butt, round, diamond, square) to be specified.
51-
52-
The pattern should be continuous along the length of each continuous line string or line loop.
53-
54-
Implementations may choose to aggregate the set of unique dash patterns into a texture with one row per pattern to be indexed by the shader program when applying a line style's pattern.
5541

5642
## JSON Schema
5743

5844

45+

0 commit comments

Comments
 (0)