From ceace9c0ce571a7b9585825d306315c7bf47c45a Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 05:41:23 -0400 Subject: [PATCH 01/10] stub out line material --- .../EXT_materials_CAD_line_style/README.md | 47 +++++++++++++++++++ ...l.EXT_materials_CAD_line_style.schema.json | 0 2 files changed, 47 insertions(+) create mode 100644 extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md create mode 100644 extensions/2.0/Vendor/EXT_materials_CAD_line_style/schema/material.EXT_materials_CAD_line_style.schema.json diff --git a/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md b/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md new file mode 100644 index 0000000000..f659bb6d1c --- /dev/null +++ b/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md @@ -0,0 +1,47 @@ + + +# EXT_materials_CAD_line_style + +## Contributors + +* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) + +## Status + +Complete + +## 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 EXT_materials_CAD_line_style augments a material with a description of a CAD line style. + +## Example + + +[open question: device-pixel-ratio for width and pixel patterns?] + +## glTF Schema Updates + +The `EXT_materials_CAD_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 length of + + +## Implementation Notes + +[tesselation generally required for width > 1 because many graphics APIs like WebGL no longer support wide line primitives] +[implementation may smooth out the tesselated lines by, e.g., inserting triangles at the joints] +[pattern should be continuous along the length of a line string] +[patterns could be aggregated into a texture] + +## JSON Schema + +- [EXT_mesh_primitive_restart.schema.json](schema/EXT_mesh_primitive_restart.schema.json) +- [primitiveGroup.schema.json](schema/primitiveGroup.schema.json) + diff --git a/extensions/2.0/Vendor/EXT_materials_CAD_line_style/schema/material.EXT_materials_CAD_line_style.schema.json b/extensions/2.0/Vendor/EXT_materials_CAD_line_style/schema/material.EXT_materials_CAD_line_style.schema.json new file mode 100644 index 0000000000..e69de29bb2 From 9be59ddf2fcba1f4adc0eff299b83f0594ed6bd2 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:25:11 -0400 Subject: [PATCH 02/10] start with Bentley's minimal requirements. --- .../BENTLEY_materials_line_style/README.md | 58 +++++++++++++++++++ ...l.EXT_materials_CAD_line_style.schema.json | 0 .../EXT_materials_CAD_line_style/README.md | 47 --------------- 3 files changed, 58 insertions(+), 47 deletions(-) create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md rename extensions/2.0/Vendor/{EXT_materials_CAD_line_style => BENTLEY_materials_line_style}/schema/material.EXT_materials_CAD_line_style.schema.json (100%) delete mode 100644 extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md 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..f4d6b7ea25 --- /dev/null +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -0,0 +1,58 @@ + + +# 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/EXT_materials_CAD_line_style/schema/material.EXT_materials_CAD_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.EXT_materials_CAD_line_style.schema.json similarity index 100% rename from extensions/2.0/Vendor/EXT_materials_CAD_line_style/schema/material.EXT_materials_CAD_line_style.schema.json rename to extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.EXT_materials_CAD_line_style.schema.json diff --git a/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md b/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md deleted file mode 100644 index f659bb6d1c..0000000000 --- a/extensions/2.0/Vendor/EXT_materials_CAD_line_style/README.md +++ /dev/null @@ -1,47 +0,0 @@ - - -# EXT_materials_CAD_line_style - -## Contributors - -* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) - -## Status - -Complete - -## 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 EXT_materials_CAD_line_style augments a material with a description of a CAD line style. - -## Example - - -[open question: device-pixel-ratio for width and pixel patterns?] - -## glTF Schema Updates - -The `EXT_materials_CAD_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 length of - - -## Implementation Notes - -[tesselation generally required for width > 1 because many graphics APIs like WebGL no longer support wide line primitives] -[implementation may smooth out the tesselated lines by, e.g., inserting triangles at the joints] -[pattern should be continuous along the length of a line string] -[patterns could be aggregated into a texture] - -## JSON Schema - -- [EXT_mesh_primitive_restart.schema.json](schema/EXT_mesh_primitive_restart.schema.json) -- [primitiveGroup.schema.json](schema/primitiveGroup.schema.json) - From 7f2cb6e89cc024090a66757de73021373e4b7644 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:29:09 -0400 Subject: [PATCH 03/10] formatting --- extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md | 2 ++ 1 file changed, 2 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 f4d6b7ea25..5386383c4f 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -30,7 +30,9 @@ The `BENTLEY_materials_line_style` extension is applied to a material. If that m 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. From 5bf9714da98b89b9ea443fef35944d0c4597b1d5 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:55:03 -0400 Subject: [PATCH 04/10] point style --- .../BENTLEY_materials_point_style/README.md | 58 +++++++++++++++++++ ...l.EXT_materials_CAD_line_style.schema.json | 0 2 files changed, 58 insertions(+) create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/material.EXT_materials_CAD_line_style.schema.json diff --git a/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md new file mode 100644 index 0000000000..f4d6b7ea25 --- /dev/null +++ b/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md @@ -0,0 +1,58 @@ + + +# 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_point_style/schema/material.EXT_materials_CAD_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/material.EXT_materials_CAD_line_style.schema.json new file mode 100644 index 0000000000..e69de29bb2 From 00205640db005fa1b7f7f0bd2ce34d49bbf2d875 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:58:45 -0400 Subject: [PATCH 05/10] stupid editor --- .../BENTLEY_materials_line_style/README.md | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 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 5386383c4f..b02ca5ce4c 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_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_materials_point_style ## Contributors @@ -19,41 +19,25 @@ 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. +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. -> 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 `size` property specifies the diameter of each point in pixels. -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: 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? -> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters. +> 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. -> TBD: do pixel widths and patterns refer to device pixels or screen pixels? +> Potential generalization: permit size to be specified in meters. ## 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 From 49343e054dd4285b84611a6769b7eb01b7cd66f1 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:00:43 -0400 Subject: [PATCH 06/10] fix editor snafu --- .../BENTLEY_materials_line_style/README.md | 28 +++++++++++++++---- .../BENTLEY_materials_point_style/README.md | 27 +++++------------- 2 files changed, 29 insertions(+), 26 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 b02ca5ce4c..0b26989d0c 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md @@ -3,7 +3,7 @@ Copyright 2015-2025 The Khronos Group Inc. SPDX-License-Identifier: CC-BY-4.0 --> -# BENTLEY_materials_point_style +# BENTLEY_materials_line_style ## Contributors @@ -19,25 +19,41 @@ 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_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. +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. -The `size` property specifies the diameter of each point in pixels. +> 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. -> 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? +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: 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. +> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters. -> Potential generalization: permit size to be specified in 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_point_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md index f4d6b7ea25..fe9d6885df 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_point_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_materials_point_style ## Contributors @@ -19,40 +19,27 @@ 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. +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. -> 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 `size` property specifies the diameter of each point in pixels. -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: 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? -> Potential generalization: permit patterns to be specified in meters, such that each character in the bitfield correspond to some specified number of meters. +> 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. -> TBD: do pixel widths and patterns refer to device pixels or screen pixels? +> Potential generalization: permit size to be specified in meters. ## 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 + From f6437c3b9c973b34f163a8bf60b5ca25c57f4802 Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:03:06 -0400 Subject: [PATCH 07/10] rename schemas --- ...ema.json => material.BENTLEY_materials_line_style.schema.json} | 0 ...ma.json => material.BENTLEY_materials_point_style.schema.json} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/{material.EXT_materials_CAD_line_style.schema.json => material.BENTLEY_materials_line_style.schema.json} (100%) rename extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/{material.EXT_materials_CAD_line_style.schema.json => material.BENTLEY_materials_point_style.schema.json} (100%) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/material.EXT_materials_CAD_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_materials_line_style/schema/material.EXT_materials_CAD_line_style.schema.json rename to 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_point_style/schema/material.EXT_materials_CAD_line_style.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/material.BENTLEY_materials_point_style.schema.json similarity index 100% rename from extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/material.EXT_materials_CAD_line_style.schema.json rename to extensions/2.0/Vendor/BENTLEY_materials_point_style/schema/material.BENTLEY_materials_point_style.schema.json From 82afeeb9a117613d781bcd6953fca4866a83952e Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:21:09 -0400 Subject: [PATCH 08/10] typo --- extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md b/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md index fe9d6885df..fba01d9b13 100644 --- a/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md +++ b/extensions/2.0/Vendor/BENTLEY_materials_point_style/README.md @@ -21,7 +21,7 @@ Written against the glTF 2.0 spec. 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 +## Specifying Point Styles 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. From 53fd0e6f3929bf40056bda88f0a15eeb015de31f Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 10:25:26 -0400 Subject: [PATCH 09/10] plaanr fill --- .../BENTLEY_materials_planar_fill/README.md | 46 +++++++++++++++++++ ....BENTLEY_materials_planar_fill.schema.json | 0 2 files changed, 46 insertions(+) create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_planar_fill/README.md create mode 100644 extensions/2.0/Vendor/BENTLEY_materials_planar_fill/schema/material.BENTLEY_materials_planar_fill.schema.json diff --git a/extensions/2.0/Vendor/BENTLEY_materials_planar_fill/README.md b/extensions/2.0/Vendor/BENTLEY_materials_planar_fill/README.md new file mode 100644 index 0000000000..e8c5b4d084 --- /dev/null +++ b/extensions/2.0/Vendor/BENTLEY_materials_planar_fill/README.md @@ -0,0 +1,46 @@ + + +# BENTLEY_materials_planar_fill + +## 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 make extensive use of non-photorealistic two- and three-dimensional visualizations involving planar polygons with filled interiors. The `BENTLEY_materials_planar_fill` allows the behavior of the interior fill to be customized. + +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 Planar Fill + +The `BENTLEY_materials_planar_fill` extension is applied to a material. It specifies how the interior fill of a planar polygon should be rendered. + +In a wireframe view, by default only the edges of polygons are displayed. The extension's `wireframeFill` property controls whether the fill is displayed in wireframe. `NONE` (0) indicates the fill is never drawn in wireframe, `ALWAYS` (1) indicates it is always drawn in wireframe, and `TOGGLE` indicates that it is drawn only if the user or application has chosen for toggleable fill to be drawn. + +The extension's `backgroundFill` property, if `true`, specifies that the fill should be drawn in the same color as the view's background color. This permits an "invisible" polygon to mask out geometry behind it. + +The extension's `behind` property, if `true`, specifies that the fill should be drawn behind other coplanar geometry representing the same object. This is useful for mitigating z-fighting when, for example, a hatch pattern is applied to a filled polygon, or text is drawn inside a filled rectangle. + +> TBD: "representing the same object" has a specific meaning for Bentley (originating from the same element); it would need to be generalized somehow for other use cases. + +## glTF Schema Updates + + +## Implementation Notes + + +## JSON Schema + + diff --git a/extensions/2.0/Vendor/BENTLEY_materials_planar_fill/schema/material.BENTLEY_materials_planar_fill.schema.json b/extensions/2.0/Vendor/BENTLEY_materials_planar_fill/schema/material.BENTLEY_materials_planar_fill.schema.json new file mode 100644 index 0000000000..e69de29bb2 From 00ef15aef28e7ce439f70aaaadff6f5a10ba66ee Mon Sep 17 00:00:00 2001 From: pmconne <22944042+pmconne@users.noreply.github.com> Date: Tue, 15 Jul 2025 11:17:26 -0400 Subject: [PATCH 10/10] Constant LOD texture mapping --- .../EXT_textureInfo_constant_lod/README.md | 35 +++++++++++++++++++ ...o.EXT_textureInfo_constant_lod.schema.json | 0 2 files changed, 35 insertions(+) create mode 100644 extensions/2.0/Vendor/EXT_textureInfo_constant_lod/README.md create mode 100644 extensions/2.0/Vendor/EXT_textureInfo_constant_lod/schema/textureInfo.EXT_textureInfo_constant_lod.schema.json diff --git a/extensions/2.0/Vendor/EXT_textureInfo_constant_lod/README.md b/extensions/2.0/Vendor/EXT_textureInfo_constant_lod/README.md new file mode 100644 index 0000000000..aff1fba906 --- /dev/null +++ b/extensions/2.0/Vendor/EXT_textureInfo_constant_lod/README.md @@ -0,0 +1,35 @@ + + +# EXT_textureInfo_constant_lod + +## Contributors + +* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne) + +## Status + +Draft + +## Dependencies + +Written against the glTF 2.0 spec. + +## Overview + +[Basis](https://www.itwinjs.org/reference/core-common/rendering/texturemapping/texturemapping.constantlodparams). + +## Specifying Constant LOD Texture Mapping + + +## glTF Schema Updates + + +## Implementation Notes + + +## JSON Schema + + diff --git a/extensions/2.0/Vendor/EXT_textureInfo_constant_lod/schema/textureInfo.EXT_textureInfo_constant_lod.schema.json b/extensions/2.0/Vendor/EXT_textureInfo_constant_lod/schema/textureInfo.EXT_textureInfo_constant_lod.schema.json new file mode 100644 index 0000000000..e69de29bb2