Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
339604b
draft wip
markschlosseratbentley Sep 11, 2025
ab1e2b6
update README & schema
danielzhong Nov 11, 2025
546eb74
Update README.md
danielzhong Nov 12, 2025
915a7b0
Update README.md
danielzhong Nov 13, 2025
1fbbb15
rename
danielzhong Nov 13, 2025
dd40552
Update material.BENTLEY_material_line_style.schema.json
danielzhong Nov 13, 2025
b93d51d
Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md
danielzhong Nov 13, 2025
17f8c12
Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md
danielzhong Nov 13, 2025
d1cbb59
Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md
danielzhong Nov 13, 2025
f82a869
Update extensions/2.0/Vendor/BENTLEY_material_line_style/README.md
danielzhong Nov 13, 2025
32923b7
Update README.md
danielzhong Nov 13, 2025
00ad2d4
copyright
markschlosseratbentley Nov 20, 2025
14bea10
contributor list
markschlosseratbentley Nov 20, 2025
2b3fc30
Update material.BENTLEY_material_line_style.schema.json
danielzhong Nov 21, 2025
0ec3508
materials plural
markschlosseratbentley Nov 21, 2025
98d282c
materials plural
markschlosseratbentley Nov 21, 2025
535c58b
plural
markschlosseratbentley Nov 21, 2025
e3db76e
update
danielzhong Nov 26, 2025
2c4af97
Update README.md
danielzhong Dec 8, 2025
7b35020
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Dec 8, 2025
5bcbd1d
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Dec 8, 2025
35e0630
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Dec 8, 2025
4c4c1c4
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Dec 8, 2025
384fe75
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Dec 8, 2025
c6a75f2
Update README.md
danielzhong Dec 8, 2025
10ada04
Merge branch 'BENTLEY_materials_line_style' of https://github.com/Ces…
danielzhong Dec 8, 2025
42e2055
Update README.md
danielzhong Dec 9, 2025
28cfc25
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/schema/mate…
danielzhong Dec 19, 2025
57d373b
Add CumulativeDistance
danielzhong Jan 26, 2026
3368ec3
Update extensions/2.0/Vendor/BENTLEY_materials_line_style/README.md
danielzhong Jan 29, 2026
f8ed3d0
update
danielzhong Jan 29, 2026
8563506
Update README.md
danielzhong Jan 29, 2026
6823cd3
Update README.md
danielzhong Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions extensions/2.0/Vendor/BENTLEY_material_line_style/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!--
Copyright 2015-2025 The Khronos Group Inc.
SPDX-License-Identifier: CC-BY-4.0
-->

# BENTLEY_material_line_style

## Contributors

* Paul Connelly, Bentley Systems, [@pmconne](https://github.com/pmconne)
* Daniel Zhong, Bentley Systems, [@danielzhong](https://github.com/danielzhong)

## Status

Draft

## Dependencies

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.

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:

- `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

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.
Comment thread
danielzhong marked this conversation as resolved.
Outdated
Comment thread
danielzhong marked this conversation as resolved.
Outdated

### Width

The `width` property specifies the line’s thickness **in screen pixels**.
The value of `width` must be greater than `0`.
Comment thread
danielzhong marked this conversation as resolved.
Outdated

For each line segment, implementations should extrude geometry by half this width on each side of the segment’s centerline, perpendicular to its direction.
Comment thread
danielzhong marked this conversation as resolved.
Outdated


### 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:
Comment thread
danielzhong marked this conversation as resolved.
Outdated

- `-` (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.

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, 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.

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_material_line_style.schema.json](schema/material.BENTLEY_material_line_style.schema.json)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-04/schema",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated. We are using https://json-schema.org/draft/2020-12/schema now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated! Thanks!

"title": "BENTLEY_material_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"]
}