From 339604b2e0e4ca8db00b367050228bf436b9f685 Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:06:42 -0400 Subject: [PATCH 01/32] draft wip --- .../BENTLEY_materials_line_style/README.md | 60 +++++++++++++++++++ ...l.BENTLEY_materials_line_style.schema.json | 0 2 files changed, 60 insertions(+) create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md new file mode 100644 index 0000000000..0b26989d0c --- /dev/null +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -0,0 +1,60 @@ + + +# BENTLEY_materials_line_style + +## Contributors + +* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) + +## Status + +Draft + +## Dependencies + +Written against the glTF 2.0 spec. + +## Overview + +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. + +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. + +## Specifying Line Styles + +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. + +The `width` property specifies the width in pixels of the lines. For each line segment, extrude by half this width perpendicularly on both sides. + +> Potential generalization: permit width to be specified in meters. + +> Potential generalization: permit pixel width to scale with distance between a minimum and maximum. + +> 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. + +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. + +> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters. + +> TBD: do pixel widths and patterns refer to device pixels or screen pixels? + +## glTF Schema Updates + + + +## Implementation Notes + +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. + +> Potential generalization: permit the join style (e.g., round, miter, bevel, diamond) and end cap style (butt, round, diamond, square) to be specified. + +The pattern should be continuous along the length of each continuous line string or line loop. + +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. + +## JSON Schema + + diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json new file mode 100644 index 0000000000..e69de29bb2 From ab1e2b6a1df01624b8439235467031c690046c46 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Tue, 11 Nov 2025 01:42:39 -0500 Subject: [PATCH 02/32] update README & schema --- .../BENTLEY_materials_line_style/README.md | 42 ++++++++++++------- ...l.BENTLEY_materials_line_style.schema.json | 23 ++++++++++ 2 files changed, 50 insertions(+), 15 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 0b26989d0c..9f18daf5d5 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -8,6 +8,7 @@ SPDX-License-Identifier: CC-BY-4.0 ## Contributors * Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) +* Daniel Zhong, Bentley Systems, [@danielzhong](https://github.com/danielzhong) ## Status @@ -19,42 +20,53 @@ Written against the glTF 2.0 spec. ## Overview -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. +Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments, such as SketchUp, MicroStation, and Revit. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. -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. +The `BENTLEY_materials_line_style` extension augments a material with a minimal description of a CAD-style line representation. +It specifies **line width** and a **repeating dash pattern**, sufficient for typical CAD and engineering visualization workflows. -## Specifying Line Styles +This specification intentionally remains minimal to meet Bentley Systems’ requirements, while also providing a clear foundation for potential future generalization. -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. +## Specifying Line Styles -The `width` property specifies the width in pixels of the lines. For each line segment, extrude by half this width perpendicularly on both sides. +The `BENTLEY_materials_line_style` extension is applied to a material. +When that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, it defines the **width** and **pattern** with which those lines are rendered. -> Potential generalization: permit width to be specified in meters. +### Width -> Potential generalization: permit pixel width to scale with distance between a minimum and maximum. +The `width` property specifies the line’s thickness **in screen pixels**. +For each line segment, implementations **SHOULD** extrude geometry by half this width perpendicularly on both sides. -> 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. +### Pattern -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. +The `pattern` property specifies a **repeating on/off pixel sequence** to be applied along the length of the line. +It is expressed as a string of arbitrary length, where each character corresponds to one pixel: -> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters. +- `"-"` (hyphen): lit pixel (on) +- `" "` (space): unlit pixel (off) -> TBD: do pixel widths and patterns refer to device pixels or screen pixels? +The pattern repeats cyclically once the end of the string is reached. +The first character determines whether the first pixel drawn is lit or unlit. -## glTF Schema Updates +Example patterns: +| Pattern | Description | +|----------|--------------| +| `"---"` | solid line | +| `"- -"` | dotted line | +| `"-- "` | dashed line | +| `"- - -- -"` | custom pattern | +The pattern is applied continuously along each continuous line string or loop. ## Implementation Notes 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. -> Potential generalization: permit the join style (e.g., round, miter, bevel, diamond) and end cap style (butt, round, diamond, square) to be specified. - The pattern should be continuous along the length of each continuous line string or line loop. 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. ## JSON Schema - +* [material.BENTLEY_materials_line_style.schema.json](schema/material.BENTLEY_materials_line_style.schema.json) \ No newline at end of file diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index e69de29bb2..df65b7730b 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema", + "title": "BENTLEY_materials_line_style extension", + "type": "object", + "description": "Specifies line width and dash pattern for CAD-style visualization.", + "allOf": [ + { "$ref": "glTFProperty.schema.json" } + ], + "properties": { + "width": { + "type": "number", + "description": "Width of the line in screen pixels. Must be > 0.", + "minimum": 0 + }, + "pattern": { + "type": "string", + "description": "Arbitrary-length bitfield string representing on/off pattern. '-' = lit, ' ' = unlit." + }, + "extensions": {}, + "extras": {} + }, + "required": ["width", "pattern"] +} From 546eb7460783e1afa8263ce77551f48b663dcf13 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Wed, 12 Nov 2025 14:34:40 -0500 Subject: [PATCH 03/32] Update README.md --- .../BENTLEY_materials_line_style/README.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 9f18daf5d5..3b76b00ff0 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -20,12 +20,14 @@ Written against the glTF 2.0 spec. ## Overview -Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments, such as SketchUp, MicroStation, and Revit. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. +Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. -The `BENTLEY_materials_line_style` extension augments a material with a minimal description of a CAD-style line representation. -It specifies **line width** and a **repeating dash pattern**, sufficient for typical CAD and engineering visualization workflows. +The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF materials. It enables authors to specify line thickness and a repeating dash pattern. -This specification intentionally remains minimal to meet Bentley Systems’ requirements, while also providing a clear foundation for potential future generalization. +This extension introduces two primary properties controlling line appearance: + +- `width`: the pixel width of the rendered line +- `pattern`: a string of arbitrary length representing a repeating sequence of lit (`-`) and unlit (` `) pixels ## Specifying Line Styles @@ -35,15 +37,15 @@ When that material is used by any line-type primitive, or by the edges described ### Width The `width` property specifies the line’s thickness **in screen pixels**. -For each line segment, implementations **SHOULD** extrude geometry by half this width perpendicularly on both sides. +For each line segment, implementations should extrude geometry by half this width perpendicularly on both sides. ### Pattern The `pattern` property specifies a **repeating on/off pixel sequence** to be applied along the length of the line. It is expressed as a string of arbitrary length, where each character corresponds to one pixel: -- `"-"` (hyphen): lit pixel (on) -- `" "` (space): unlit pixel (off) +- `-` (hyphen): lit pixel (on) +- ` ` (space): unlit pixel (off) The pattern repeats cyclically once the end of the string is reached. The first character determines whether the first pixel drawn is lit or unlit. @@ -52,10 +54,10 @@ Example patterns: | Pattern | Description | |----------|--------------| -| `"---"` | solid line | -| `"- -"` | dotted line | -| `"-- "` | dashed line | -| `"- - -- -"` | custom pattern | +| `---` | solid line | +| `- -` | dotted line | +| `-- ` | dashed line | +| `- - -- -` | custom pattern | The pattern is applied continuously along each continuous line string or loop. From 915a7b0bc445f5834f8cf4bcf3e465971f808f6a Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Wed, 12 Nov 2025 22:43:52 -0500 Subject: [PATCH 04/32] Update README.md --- .../2.0/Vendor/BENTLEY_materials_line_style/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 3b76b00ff0..d727ac0c9b 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -37,7 +37,10 @@ When that material is used by any line-type primitive, or by the edges described ### Width The `width` property specifies the line’s thickness **in screen pixels**. -For each line segment, implementations should extrude geometry by half this width perpendicularly on both sides. +The value of `width` must be greater than `0`. + +For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. + ### Pattern @@ -63,7 +66,7 @@ The pattern is applied continuously along each continuous line string or loop. ## Implementation Notes -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. +Because many graphics APIs do not support line primitives with a width larger than 1, tessellation 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. The pattern should be continuous along the length of each continuous line string or line loop. From 1fbbb15febe76272f115a4fb21391409df15e20b Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 10:16:17 -0500 Subject: [PATCH 05/32] rename --- .../README.md | 8 ++++---- .../material.BENTLEY_material_line_style.schema.json} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename extensions/2.0/Vendor/{BENTLEY_materials_line_style => BENTLEY_material_line_style}/README.md (86%) rename extensions/2.0/Vendor/{BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json => BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json} (92%) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md similarity index 86% rename from extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md rename to extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index d727ac0c9b..5cfab4b47e 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -3,7 +3,7 @@ Copyright 2015-2025 The Khronos Group Inc. SPDX-License-Identifier: CC-BY-4.0 --> -# BENTLEY_materials_line_style +# BENTLEY_material_line_style ## Contributors @@ -22,7 +22,7 @@ Written against the glTF 2.0 spec. Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. -The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF materials. It enables authors to specify line thickness and a repeating dash pattern. +The `BENTLEY_material_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. This extension introduces two primary properties controlling line appearance: @@ -31,7 +31,7 @@ This extension introduces two primary properties controlling line appearance: ## Specifying Line Styles -The `BENTLEY_materials_line_style` extension is applied to a material. +The `BENTLEY_material_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, it defines the **width** and **pattern** with which those lines are rendered. ### Width @@ -74,4 +74,4 @@ Implementations may choose to aggregate the set of unique dash patterns into a t ## JSON Schema -* [material.BENTLEY_materials_line_style.schema.json](schema/material.BENTLEY_materials_line_style.schema.json) \ No newline at end of file +* [material.BENTLEY_material_line_style.schema.json](schema/material.BENTLEY_material_line_style.schema.json) \ No newline at end of file diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json similarity index 92% rename from extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json rename to extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json index df65b7730b..e55db07900 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema", - "title": "BENTLEY_materials_line_style extension", + "title": "BENTLEY_material_line_style extension", "type": "object", "description": "Specifies line width and dash pattern for CAD-style visualization.", "allOf": [ From dd405526149cf4c700f9a029431032f3a09771fc Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:42:45 -0500 Subject: [PATCH 06/32] Update material.BENTLEY_material_line_style.schema.json --- .../schema/material.BENTLEY_material_line_style.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json index e55db07900..7ea6a1c19a 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json @@ -8,9 +8,9 @@ ], "properties": { "width": { - "type": "number", + "type": "integer", "description": "Width of the line in screen pixels. Must be > 0.", - "minimum": 0 + "minimum": 1 }, "pattern": { "type": "string", From b93d51dd935c53300c04505bf884fbd792e2e301 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:45:09 -0500 Subject: [PATCH 07/32] Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index 5cfab4b47e..7402df9cc3 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -39,7 +39,7 @@ When that material is used by any line-type primitive, or by the edges described The `width` property specifies the line’s thickness **in screen pixels**. The value of `width` must be greater than `0`. -For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. +For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. Implementations should also insert triangles at the joints between line segments comprising a continuous line string or line loop, when appropriate to visually round out the joints. ### Pattern From 17f8c12495fc4016a77414642b951fd72b5078e4 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:51:08 -0500 Subject: [PATCH 08/32] Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index 7402df9cc3..bd6d2232ec 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -36,8 +36,7 @@ When that material is used by any line-type primitive, or by the edges described ### Width -The `width` property specifies the line’s thickness **in screen pixels**. -The value of `width` must be greater than `0`. +The `width` property specifies the line’s thickness **in screen pixels**. The value of `width` must be greater than `0`. For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. Implementations should also insert triangles at the joints between line segments comprising a continuous line string or line loop, when appropriate to visually round out the joints. From d1cbb598be28c4171f77895653c2b6ee309326c9 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:51:24 -0500 Subject: [PATCH 09/32] Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index bd6d2232ec..9b821ad493 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -43,8 +43,7 @@ For each line segment, implementations should extrude geometry by half this widt ### Pattern -The `pattern` property specifies a **repeating on/off pixel sequence** to be applied along the length of the line. -It is expressed as a string of arbitrary length, where each character corresponds to one pixel: +The `pattern` property specifies a **repeating on/off pixel sequence** to be applied along the length of the line. It is expressed as a string of arbitrary length, where each character corresponds to one pixel: - `-` (hyphen): lit pixel (on) - ` ` (space): unlit pixel (off) From f82a86904b651a0d668dd7bbdadd2dac16af595b Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 12:51:32 -0500 Subject: [PATCH 10/32] Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index 9b821ad493..2c21bef5a8 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -31,8 +31,7 @@ This extension introduces two primary properties controlling line appearance: ## Specifying Line Styles -The `BENTLEY_material_line_style` extension is applied to a material. -When that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, it defines the **width** and **pattern** with which those lines are rendered. +The `BENTLEY_material_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, it defines the **width** and **pattern** with which those lines are rendered. ### Width From 32923b7edf84f91db132acbfc7dfd6c14b350f70 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:43:25 -0500 Subject: [PATCH 11/32] Update README.md --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index 2c21bef5a8..ec0170005e 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -31,7 +31,7 @@ This extension introduces two primary properties controlling line appearance: ## Specifying Line Styles -The `BENTLEY_material_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the `EXT_mesh_primitive_edge_visibility` extension, it defines the **width** and **pattern** with which those lines are rendered. +The `BENTLEY_material_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) extension, it defines the **width** and **pattern** with which those lines are rendered. ### Width From 00ad2d4bc731129263dbf000c6c64c6d6fe1cbe0 Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Thu, 20 Nov 2025 11:13:37 -0500 Subject: [PATCH 12/32] copyright --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index ec0170005e..b4df039753 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -1,5 +1,5 @@ From 14bea10899068b3b66e790b70ca4f53776c69eb4 Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Thu, 20 Nov 2025 12:38:30 -0500 Subject: [PATCH 13/32] contributor list --- extensions/2.0/Vendor/BENTLEY_material_line_style/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index b4df039753..1f30a1b043 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -9,6 +9,7 @@ SPDX-License-Identifier: CC-BY-4.0 * Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) * Daniel Zhong, Bentley Systems, [@danielzhong](https://github.com/danielzhong) +* Mark Schlosser, Bentley Systems, [@markschlosseratbentley](https://github.com/markschlosseratbentley) ## Status From 2b3fc30ace670948f8ee1d21741b1be2f074e11a Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Fri, 21 Nov 2025 01:01:26 -0500 Subject: [PATCH 14/32] Update material.BENTLEY_material_line_style.schema.json --- .../schema/material.BENTLEY_material_line_style.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json index 7ea6a1c19a..ab551f78ef 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-04/schema", + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "BENTLEY_material_line_style extension", "type": "object", "description": "Specifies line width and dash pattern for CAD-style visualization.", From 0ec350831eaf5c218b767f5a7e465cd9ec9f90e0 Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:44:47 -0500 Subject: [PATCH 15/32] materials plural --- .../2.0/Vendor/BENTLEY_material_line_style/README.md | 8 ++++---- .../material.BENTLEY_material_line_style.schema.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md index 1f30a1b043..c9222c4159 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md @@ -3,7 +3,7 @@ Copyright 2025 Bentley Systems, Incorporated SPDX-License-Identifier: CC-BY-4.0 --> -# BENTLEY_material_line_style +# BENTLEY_materials_line_style ## Contributors @@ -23,7 +23,7 @@ Written against the glTF 2.0 spec. Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. -The `BENTLEY_material_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. +The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. This extension introduces two primary properties controlling line appearance: @@ -32,7 +32,7 @@ This extension introduces two primary properties controlling line appearance: ## Specifying Line Styles -The `BENTLEY_material_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) extension, it defines the **width** and **pattern** with which those lines are rendered. +The `BENTLEY_materials_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) extension, it defines the **width** and **pattern** with which those lines are rendered. ### Width @@ -72,4 +72,4 @@ Implementations may choose to aggregate the set of unique dash patterns into a t ## JSON Schema -* [material.BENTLEY_material_line_style.schema.json](schema/material.BENTLEY_material_line_style.schema.json) \ No newline at end of file +* [materials.BENTLEY_material_line_style.schema.json](schema/materials.BENTLEY_material_line_style.schema.json) \ No newline at end of file diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json index ab551f78ef..023793462d 100644 --- a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "BENTLEY_material_line_style extension", + "title": "BENTLEY_materials_line_style extension", "type": "object", "description": "Specifies line width and dash pattern for CAD-style visualization.", "allOf": [ From 98d282c59e3b952647917a999ceb7c87c4b8e99d Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:46:03 -0500 Subject: [PATCH 16/32] materials plural --- ...ema.json => material.BENTLEY_materials_line_style.schema.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename extensions/2.0/Vendor/BENTLEY_material_line_style/schema/{material.BENTLEY_material_line_style.schema.json => material.BENTLEY_materials_line_style.schema.json} (100%) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_materials_line_style.schema.json similarity index 100% rename from extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_material_line_style.schema.json rename to extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_materials_line_style.schema.json From 535c58bc74ff43e5313d0ce3cd4f20b41696e3b1 Mon Sep 17 00:00:00 2001 From: Mark Schlosser <47000437+markschlosseratbentley@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:50:06 -0500 Subject: [PATCH 17/32] plural --- .../README.md | 0 .../schema/material.BENTLEY_materials_line_style.schema.json | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename extensions/2.0/Vendor/{BENTLEY_material_line_style => BENTLEY_materials_line_style}/README.md (100%) rename extensions/2.0/Vendor/{BENTLEY_material_line_style => BENTLEY_materials_line_style}/schema/material.BENTLEY_materials_line_style.schema.json (100%) diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md similarity index 100% rename from extensions/2.0/Vendor/BENTLEY_material_line_style/README.md rename to extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md diff --git a/extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json similarity index 100% rename from extensions/2.0/Vendor/BENTLEY_material_line_style/schema/material.BENTLEY_materials_line_style.schema.json rename to extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json From e3db76efc5785e4caf8edf2908e09ee8438d0d98 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Tue, 25 Nov 2025 20:50:26 -0500 Subject: [PATCH 18/32] update --- .../BENTLEY_materials_line_style/README.md | 39 ++++++++++--------- ...l.BENTLEY_materials_line_style.schema.json | 15 ++++--- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index c9222c4159..bd49e54582 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -28,7 +28,7 @@ The `BENTLEY_materials_line_style` extension defines a method for describing the This extension introduces two primary properties controlling line appearance: - `width`: the pixel width of the rendered line -- `pattern`: a string of arbitrary length representing a repeating sequence of lit (`-`) and unlit (` `) pixels +- `pattern`: an unsigned integer whose bits represent a repeating on/off pattern along the line ## Specifying Line Styles @@ -36,39 +36,40 @@ The `BENTLEY_materials_line_style` extension is applied to a material. When that ### Width -The `width` property specifies the line’s thickness **in screen pixels**. The value of `width` must be greater than `0`. +The `width` property specifies the line’s thickness **in screen pixels**. The value of `width` must be greater than `0`. For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. Implementations should also insert triangles at the joints between line segments comprising a continuous line string or line loop, when appropriate to visually round out the joints. - ### Pattern -The `pattern` property specifies a **repeating on/off pixel sequence** to be applied along the length of the line. It is expressed as a string of arbitrary length, where each character corresponds to one pixel: +The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line. Each bit represents one segment unit of equal length: -- `-` (hyphen): lit pixel (on) -- ` ` (space): unlit pixel (off) +- Bit value `1`: lit (on) +- Bit value `0`: unlit (off) -The pattern repeats cyclically once the end of the string is reached. -The first character determines whether the first pixel drawn is lit or unlit. +The least significant bit (bit 0) corresponds to the start of the pattern and represents the first drawn segment along the line. The pattern repeats cyclically once all bits have been consumed. +The bit pattern is interpreted in **little-endian bit order**, consistent with §3.6.1.1 of the glTF 2.0 specification, in which all buffer data uses little-endian byte order. Example patterns: -| Pattern | Description | -|----------|--------------| -| `---` | solid line | -| `- -` | dotted line | -| `-- ` | dashed line | -| `- - -- -` | custom pattern | - -The pattern is applied continuously along each continuous line string or loop. +| Bit Pattern (hex) | Binary | Description | +|--------------------|---------|----------------| +| `0xFFFF` | 1111111111111111 | solid line | +| `0xAAAA` | 1010101010101010 | dotted line | +| `0xF0F0` | 1111000011110000 | dashed line | +| `0xC3C3` | 1100001111000011 | custom pattern | ## Implementation Notes -Because many graphics APIs do not support line primitives with a width larger than 1, tessellation 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. +Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. Implementations may smooth out the tessellated lines by, for example, inserting additional triangles at the joints to round them. + +The pattern should be applied continuously along the length of each continuous line string or line loop, ensuring visual consistency across connected segments. + +When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. Each bit of the integer defines whether a given unit segment along the line is drawn or skipped. -The pattern should be continuous along the length of each continuous line string or line loop. +Implementations may support either 16-bit or 32-bit integers for pattern encoding. +If a pattern uses fewer bits than the maximum supported width, unused higher bits must be set to zero. -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. ## JSON Schema diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index 023793462d..984d304eb2 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -1,20 +1,23 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "BENTLEY_materials_line_style extension", + "title": "BENTLEY_materials_line_style glTF Material Extension", "type": "object", - "description": "Specifies line width and dash pattern for CAD-style visualization.", + "description": "glTF extension that specifies line width and a GPU-friendly dash pattern for CAD-style visualization.", "allOf": [ { "$ref": "glTFProperty.schema.json" } ], "properties": { "width": { "type": "integer", - "description": "Width of the line in screen pixels. Must be > 0.", - "minimum": 1 + "description": "Width of the line in screen pixels.", + "minimum": 1, + "gltf_detailedDescription": "The thickness of the line in screen pixels. Must be greater than 0. Implementations typically render wide lines via tessellated geometry extruded from the line centerline." }, "pattern": { - "type": "string", - "description": "Arbitrary-length bitfield string representing on/off pattern. '-' = lit, ' ' = unlit." + "type": "integer", + "description": "Unsigned integer bitfield encoding a repeating on/off pattern along the line.", + "minimum": 0, + "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. Implementations may support 16-bit or 32-bit bit widths. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." }, "extensions": {}, "extras": {} From 2c4af976b244ef08d45502d57962e59ac7f5e9fd Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:02:00 -0500 Subject: [PATCH 19/32] Update README.md --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 3 +-- .../schema/material.BENTLEY_materials_line_style.schema.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index bd49e54582..f71487439b 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -48,7 +48,6 @@ The `pattern` property specifies a **repeating on/off bit pattern** applied alon - Bit value `0`: unlit (off) The least significant bit (bit 0) corresponds to the start of the pattern and represents the first drawn segment along the line. The pattern repeats cyclically once all bits have been consumed. -The bit pattern is interpreted in **little-endian bit order**, consistent with §3.6.1.1 of the glTF 2.0 specification, in which all buffer data uses little-endian byte order. Example patterns: @@ -67,7 +66,7 @@ The pattern should be applied continuously along the length of each continuous l When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. Each bit of the integer defines whether a given unit segment along the line is drawn or skipped. -Implementations may support either 16-bit or 32-bit integers for pattern encoding. +For now, implementations will be limited to 16-bit integers for pattern encoding, as this is sufficient for all current use cases. If a pattern uses fewer bits than the maximum supported width, unused higher bits must be set to zero. diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index 984d304eb2..b74fcb88a6 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -17,7 +17,7 @@ "type": "integer", "description": "Unsigned integer bitfield encoding a repeating on/off pattern along the line.", "minimum": 0, - "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. Implementations may support 16-bit or 32-bit bit widths. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." + "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." }, "extensions": {}, "extras": {} From 7b35020bd3650f7fc26b413cf8f296e2fed37da3 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:29:14 -0500 Subject: [PATCH 20/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index f71487439b..ce0bd0782d 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -60,7 +60,7 @@ Example patterns: ## Implementation Notes -Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. Implementations may smooth out the tessellated lines by, for example, inserting additional triangles at the joints to round them. +Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. The pattern should be applied continuously along the length of each continuous line string or line loop, ensuring visual consistency across connected segments. From 5bcbd1d064d7695394da20da6d06a660cb287724 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:29:38 -0500 Subject: [PATCH 21/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index ce0bd0782d..37c5d0eb22 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -60,6 +60,9 @@ Example patterns: ## Implementation Notes +*This section is non-normative.* + + Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. The pattern should be applied continuously along the length of each continuous line string or line loop, ensuring visual consistency across connected segments. From 35e0630b5d9be02c0302ff6ad66cc456a3c1f55e Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:29:59 -0500 Subject: [PATCH 22/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 37c5d0eb22..ec49219957 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -67,7 +67,7 @@ Because many graphics APIs do not support line primitives with a width larger th The pattern should be applied continuously along the length of each continuous line string or line loop, ensuring visual consistency across connected segments. -When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. Each bit of the integer defines whether a given unit segment along the line is drawn or skipped. +When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. For now, implementations will be limited to 16-bit integers for pattern encoding, as this is sufficient for all current use cases. If a pattern uses fewer bits than the maximum supported width, unused higher bits must be set to zero. From 4c4c1c4eb1ea3e016b1555bb845b39a9024665ff Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:30:23 -0500 Subject: [PATCH 23/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index ec49219957..5fa8550901 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -42,7 +42,7 @@ For each line segment, implementations should extrude geometry by half this widt ### Pattern -The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line. Each bit represents one segment unit of equal length: +The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line. Each bit corresponds to one screen pixel: - Bit value `1`: lit (on) - Bit value `0`: unlit (off) From 384fe75b54e37ba908f7d533ad56f18f29aa0adc Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:36:03 -0500 Subject: [PATCH 24/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 5fa8550901..54db8698e4 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -69,8 +69,6 @@ The pattern should be applied continuously along the length of each continuous l When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. -For now, implementations will be limited to 16-bit integers for pattern encoding, as this is sufficient for all current use cases. -If a pattern uses fewer bits than the maximum supported width, unused higher bits must be set to zero. ## JSON Schema From c6a75f23fe2e42187660faa57109ebb2669ae4db Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:42:11 -0500 Subject: [PATCH 25/32] Update README.md --- .../2.0/Vendor/BENTLEY_materials_line_style/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 5fa8550901..310e0005c9 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -49,6 +49,8 @@ The `pattern` property specifies a **repeating on/off bit pattern** applied alon The least significant bit (bit 0) corresponds to the start of the pattern and represents the first drawn segment along the line. The pattern repeats cyclically once all bits have been consumed. +The pattern must be applied continuously along each continuous line string or line loop so that connected segments remain visually consistent. Implementations must not restart the pattern at intermediate vertices within the same line string. + Example patterns: | Bit Pattern (hex) | Binary | Description | @@ -62,11 +64,8 @@ Example patterns: *This section is non-normative.* - Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. -The pattern should be applied continuously along the length of each continuous line string or line loop, ensuring visual consistency across connected segments. - When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. For now, implementations will be limited to 16-bit integers for pattern encoding, as this is sufficient for all current use cases. @@ -75,4 +74,4 @@ If a pattern uses fewer bits than the maximum supported width, unused higher bit ## JSON Schema -* [materials.BENTLEY_material_line_style.schema.json](schema/materials.BENTLEY_material_line_style.schema.json) \ No newline at end of file +* [materials.BENTLEY_material_line_style.schema.json](schema/materials.BENTLEY_material_line_style.schema.json) From 42e2055ef00a7c3cd763ef8a76bf1de4259c4f18 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Tue, 9 Dec 2025 08:04:01 -0500 Subject: [PATCH 26/32] Update README.md --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 6d06da6a8c..1d820a6b2b 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -42,12 +42,12 @@ For each line segment, implementations should extrude geometry by half this widt ### Pattern -The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line. Each bit corresponds to one screen pixel: +The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line, encoded as a 16-bit unsigned integer. Each bit corresponds to one screen pixel: - Bit value `1`: lit (on) - Bit value `0`: unlit (off) -The least significant bit (bit 0) corresponds to the start of the pattern and represents the first drawn segment along the line. The pattern repeats cyclically once all bits have been consumed. +The least significant bit (bit 0) corresponds to the start of the pattern. The pattern repeats cyclically after all 16 bits have been used. If a pattern requires fewer than 16 bits, its unused higher-order bits must be `0`. The pattern must be applied continuously along each continuous line string or line loop so that connected segments remain visually consistent. Implementations must not restart the pattern at intermediate vertices within the same line string. From 28cfc250353ff6069d684a461731f514b1363e11 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Fri, 19 Dec 2025 11:43:14 -0500 Subject: [PATCH 27/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json Co-authored-by: Paul Connelly <22944042+pmconne@users.noreply.github.com> --- .../schema/material.BENTLEY_materials_line_style.schema.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index b74fcb88a6..3420358063 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -11,16 +11,18 @@ "type": "integer", "description": "Width of the line in screen pixels.", "minimum": 1, + "default": 1, "gltf_detailedDescription": "The thickness of the line in screen pixels. Must be greater than 0. Implementations typically render wide lines via tessellated geometry extruded from the line centerline." }, "pattern": { "type": "integer", "description": "Unsigned integer bitfield encoding a repeating on/off pattern along the line.", "minimum": 0, + "default": 65535, "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." }, "extensions": {}, "extras": {} }, - "required": ["width", "pattern"] + "required": [] } From 57d373b573d47b939f17f3987b170bca181fc07b Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Mon, 26 Jan 2026 15:56:33 -0500 Subject: [PATCH 28/32] Add CumulativeDistance --- .../BENTLEY_materials_line_style/README.md | 33 +++++++++++-------- ...l.BENTLEY_materials_line_style.schema.json | 16 ++++++--- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 1d820a6b2b..08282dfd8a 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -21,35 +21,38 @@ Written against the glTF 2.0 spec. ## Overview -Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. +Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. -The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. +The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. +The extension is also applied to line-type primitives to supply per-vertex cumulative distance used for stable dash alignment. This extension introduces two primary properties controlling line appearance: -- `width`: the pixel width of the rendered line -- `pattern`: an unsigned integer whose bits represent a repeating on/off pattern along the line +* `width`: the pixel width of the rendered line +* `pattern`: an unsigned integer whose bits represent a repeating on/off pattern along the line ## Specifying Line Styles The `BENTLEY_materials_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) extension, it defines the **width** and **pattern** with which those lines are rendered. +When applied to a line-type primitive, the extension provides the per-vertex cumulative distance attribute used to align the dash pattern along the full length of a line string. + ### Width -The `width` property specifies the line’s thickness **in screen pixels**. The value of `width` must be greater than `0`. +The `width` property specifies the line's thickness **in screen pixels**. The value of `width` must be greater than `0`. -For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction. Implementations should also insert triangles at the joints between line segments comprising a continuous line string or line loop, when appropriate to visually round out the joints. +For each line segment, implementations should extrude geometry by half this width on each side of the segment's centerline, perpendicular to its direction. Implementations should also insert triangles at the joints between line segments comprising a continuous line string or line loop, when appropriate to visually round out the joints. ### Pattern The `pattern` property specifies a **repeating on/off bit pattern** applied along the length of the line, encoded as a 16-bit unsigned integer. Each bit corresponds to one screen pixel: -- Bit value `1`: lit (on) -- Bit value `0`: unlit (off) +* Bit value `1`: lit (on) +* Bit value `0`: unlit (off) -The least significant bit (bit 0) corresponds to the start of the pattern. The pattern repeats cyclically after all 16 bits have been used. If a pattern requires fewer than 16 bits, its unused higher-order bits must be `0`. +The least significant bit (bit 0) corresponds to the start of the pattern. The pattern repeats cyclically after all 16 bits have been used. If a pattern requires fewer than 16 bits, its unused higher-order bits must be `0`. -The pattern must be applied continuously along each continuous line string or line loop so that connected segments remain visually consistent. Implementations must not restart the pattern at intermediate vertices within the same line string. +The pattern must be applied continuously along each continuous line string or line loop so that connected segments remain visually consistent. Implementations must not restart the pattern at intermediate vertices within the same line string. Example patterns: @@ -60,16 +63,18 @@ Example patterns: | `0xF0F0` | 1111000011110000 | dashed line | | `0xC3C3` | 1100001111000011 | custom pattern | +### Cumulative Distance (Primitive) + +When the extension is applied to a line-type primitive, it supplies the `cumulativeDistance` accessor index. This accessor provides a per-vertex **cumulative distance** from the start of the line string, expressed in model/world units. Implementations use this distance to align the dash pattern consistently along the full line string. + ## Implementation Notes *This section is non-normative.* Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. -When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. - - +When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. The `cumulativeDistance` attribute is consumed per-vertex to evaluate the pattern phase along the line. ## JSON Schema -* [materials.BENTLEY_material_line_style.schema.json](schema/materials.BENTLEY_material_line_style.schema.json) +* [material.BENTLEY_materials_line_style.schema.json](schema/material.BENTLEY_materials_line_style.schema.json) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index 3420358063..df4795ea78 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -1,10 +1,12 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "BENTLEY_materials_line_style glTF Material Extension", + "title": "BENTLEY_materials_line_style glTF Material and Primitive Extension", "type": "object", - "description": "glTF extension that specifies line width and a GPU-friendly dash pattern for CAD-style visualization.", + "description": "glTF extension that specifies line width, a GPU-friendly dash pattern, and optional cumulative distance for CAD-style visualization.", "allOf": [ - { "$ref": "glTFProperty.schema.json" } + { + "$ref": "glTFProperty.schema.json" + } ], "properties": { "width": { @@ -21,8 +23,14 @@ "default": 65535, "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." }, + "cumulativeDistance": { + "type": "integer", + "description": "Accessor index containing per-vertex cumulative distance along the line string.", + "minimum": 0, + "gltf_detailedDescription": "When this extension is applied to a line-type MeshPrimitive, `cumulativeDistance` supplies the accessor index for per-vertex cumulative distance from the start of the line string, expressed in model/world units. The accessor must be SCALAR with a floating-point component type, and its count must match the primitive's vertex count." + }, "extensions": {}, "extras": {} }, "required": [] -} +} \ No newline at end of file From 3368ec368030fb7e24d0e6a5f7acb32991b5a427 Mon Sep 17 00:00:00 2001 From: Daniel Zhong <32878167+danielzhong@users.noreply.github.com> Date: Wed, 28 Jan 2026 21:19:43 -0500 Subject: [PATCH 29/32] Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md Co-authored-by: Adam Morris --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 08282dfd8a..7e226cd331 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -1,5 +1,5 @@ From f8ed3d0bdfe9c993831821c6000d8815e1f74760 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 29 Jan 2026 11:49:22 -0500 Subject: [PATCH 30/32] update --- .../BENTLEY_materials_line_style/README.md | 23 ++++++++++++++----- ...l.BENTLEY_materials_line_style.schema.json | 12 +++------- ...e.BENTLEY_materials_line_style.schema.json | 16 +++++++++++++ 3 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/mesh.primitive.BENTLEY_materials_line_style.schema.json diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 7e226cd331..bd3061dd11 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -24,7 +24,7 @@ Written against the glTF 2.0 spec. Lines are fundamental elements in many 3D modeling and computer-aided design (CAD) environments. They are used to annotate two- and three-dimensional visualizations, with variations in width and dash patterns conveying semantic meaning or emphasis. The `BENTLEY_materials_line_style` extension defines a method for describing the visual style of lines within glTF material. It enables authors to specify line thickness and a repeating dash pattern. -The extension is also applied to line-type primitives to supply per-vertex cumulative distance used for stable dash alignment. +The extension is also applied to line-type primitives to indicate the presence of a per-vertex cumulative distance attribute semantic used for stable dash alignment. This extension introduces two primary properties controlling line appearance: @@ -35,7 +35,7 @@ This extension introduces two primary properties controlling line appearance: The `BENTLEY_materials_line_style` extension is applied to a material. When that material is used by any line-type primitive, or by the edges described by the [`EXT_mesh_primitive_edge_visibility`](https://github.com/KhronosGroup/glTF/pull/2479) extension, it defines the **width** and **pattern** with which those lines are rendered. -When applied to a line-type primitive, the extension provides the per-vertex cumulative distance attribute used to align the dash pattern along the full length of a line string. +When applied to a line-type primitive, the extension indicates that the primitive supplies the per-vertex cumulative distance attribute semantic defined below. ### Width @@ -63,9 +63,21 @@ Example patterns: | `0xF0F0` | 1111000011110000 | dashed line | | `0xC3C3` | 1100001111000011 | custom pattern | -### Cumulative Distance (Primitive) +### Cumulative Distance (Primitive Attribute) -When the extension is applied to a line-type primitive, it supplies the `cumulativeDistance` accessor index. This accessor provides a per-vertex **cumulative distance** from the start of the line string, expressed in model/world units. Implementations use this distance to align the dash pattern consistently along the full line string. +When the extension is applied to a line-type primitive, the primitive must supply a vertex attribute with the semantic: + +* `BENTLEY_materials_line_style:CUMULATIVE_DISTANCE` + +This attribute provides a per-vertex **cumulative distance** from the start of the line string, expressed in model/world units. Implementations use this distance to align the dash pattern consistently along the full line string. + +The accessor for this attribute: + +* **MUST** be `SCALAR`. +* **MUST** have a count matching the primitive's vertex count. +* **MUST** use component type `FLOAT` **OR** a normalized integer type. + +Values are expected to be non-decreasing along each line string. ## Implementation Notes @@ -73,8 +85,7 @@ When the extension is applied to a line-type primitive, it supplies the `cumulat Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. -When rendering, the integer `pattern` value may be supplied to the shader as a uniform or read from a small lookup table shared among materials. The `cumulativeDistance` attribute is consumed per-vertex to evaluate the pattern phase along the line. - ## JSON Schema * [material.BENTLEY_materials_line_style.schema.json](schema/material.BENTLEY_materials_line_style.schema.json) +* [mesh.primitive.BENTLEY_materials_line_style.schema.json](schema/mesh.primitive.BENTLEY_materials_line_style.schema.json) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json index df4795ea78..cd4be0bcba 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.BENTLEY_materials_line_style.schema.json @@ -1,8 +1,8 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "BENTLEY_materials_line_style glTF Material and Primitive Extension", + "title": "BENTLEY_materials_line_style glTF Material Extension", "type": "object", - "description": "glTF extension that specifies line width, a GPU-friendly dash pattern, and optional cumulative distance for CAD-style visualization.", + "description": "glTF extension that specifies line width and a GPU-friendly dash pattern for CAD-style visualization.", "allOf": [ { "$ref": "glTFProperty.schema.json" @@ -23,14 +23,8 @@ "default": 65535, "gltf_detailedDescription": "An unsigned integer whose bits encode a repeating on/off pattern along the line. Bit value 1 indicates a lit (on) segment, and bit value 0 indicates an unlit (off) segment. The least significant bit (bit 0) corresponds to the start of the pattern and represents the first segment drawn along the line. The bit pattern repeats cyclically once all supported bits have been consumed. If a pattern uses fewer bits than the maximum supported width, unused higher bits MUST be set to zero. For example, a value of 0xFFFF produces a solid line, and a value of 0xAAAA produces a dotted line." }, - "cumulativeDistance": { - "type": "integer", - "description": "Accessor index containing per-vertex cumulative distance along the line string.", - "minimum": 0, - "gltf_detailedDescription": "When this extension is applied to a line-type MeshPrimitive, `cumulativeDistance` supplies the accessor index for per-vertex cumulative distance from the start of the line string, expressed in model/world units. The accessor must be SCALAR with a floating-point component type, and its count must match the primitive's vertex count." - }, "extensions": {}, "extras": {} }, "required": [] -} \ No newline at end of file +} diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/mesh.primitive.BENTLEY_materials_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/mesh.primitive.BENTLEY_materials_line_style.schema.json new file mode 100644 index 0000000000..cc84e0150f --- /dev/null +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/mesh.primitive.BENTLEY_materials_line_style.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "BENTLEY_materials_line_style glTF MeshPrimitive Extension", + "type": "object", + "description": "Indicates that a mesh primitive supplies the BENTLEY_materials_line_style cumulative distance attribute semantic.", + "allOf": [ + { + "$ref": "glTFProperty.schema.json" + } + ], + "properties": { + "extensions": {}, + "extras": {} + }, + "required": [] +} From 856350657a52d65829734b1f55f1d1eefbd16da5 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:07:20 -0500 Subject: [PATCH 31/32] Update README.md --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index bd3061dd11..692d4324e1 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -81,8 +81,6 @@ Values are expected to be non-decreasing along each line string. ## Implementation Notes -*This section is non-normative.* - Because many graphics APIs do not support line primitives with a width larger than 1, tessellation is generally required to draw wide lines. ## JSON Schema From 6823cd3d06e0d95e5d825efcdc260bcaa63d4b26 Mon Sep 17 00:00:00 2001 From: danielzhong <32878167+danielzhong@users.noreply.github.com> Date: Wed, 11 Feb 2026 17:33:46 -0500 Subject: [PATCH 32/32] Update README.md --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md index 692d4324e1..c44a9772b2 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -87,3 +87,8 @@ Because many graphics APIs do not support line primitives with a width larger th * [material.BENTLEY_materials_line_style.schema.json](schema/material.BENTLEY_materials_line_style.schema.json) * [mesh.primitive.BENTLEY_materials_line_style.schema.json](schema/mesh.primitive.BENTLEY_materials_line_style.schema.json) + +## Known implementations + +* [iTwin.js](https://github.com/iTwin/itwinjs-core/pull/8856) +* [Cesium.js](https://github.com/CesiumGS/cesium/pull/13110) \ No newline at end of file