Skip to content

Conversation

@pmconne
Copy link
Contributor

@pmconne pmconne commented Mar 14, 2025

The EXT_mesh_primitive_edge_visibility extension augments a triangle mesh primitive with sufficient information to enable engines to produce non-photorealistic visualizations of 3D objects with visible edges. The edge visibility is encoded in a highly compact form to avoid excessively bloating the glTF asset. Adapted for glTF from iTwin/itwinjs-core#5581. We intend to add support for the extension to the CesiumJS engine.

@pjcozzi
Copy link
Member

pjcozzi commented Mar 15, 2025

@pmconne so excited for this!

  • @lilleyse could you please take a quick look from a 3D Tiles and CesiumJS perspective?
  • @kring could you take a quick look from a Cesium Native and game engine perspective?

Copy link
Contributor

@kring kring left a comment

Choose a reason for hiding this comment

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

Thanks for opening this @pmconne! I have a few thoughts below.

Overall it looks good! I can't see any particular reason it couldn't be implemented in Unreal Engine or Unity.

@pmconne
Copy link
Contributor Author

pmconne commented Apr 14, 2025

@kring @javagl @pjcozzi thank you for your feedback. I've revised the spec accordingly.

@pjcozzi
Copy link
Member

pjcozzi commented Apr 26, 2025

@kring @javagl @lexaknyazev or others - do you have any additional feedback for @pmconne on this extension?

@kring
Copy link
Contributor

kring commented May 2, 2025

@pmconne I read through the spec again and I think this looks great! No further suggestions from me.

I would like to see a complete implementation of this extension in CesiumJS or iTwinJS, though, if there isn't one already. It would be useful both as proof that it can be implemented sensibly in WebGL (2?), and for my own interest in the rendering techniques involved.

@pmconne
Copy link
Contributor Author

pmconne commented May 2, 2025

I would like to see a complete implementation of this extension in CesiumJS or iTwinJS

Most of the rendering pieces are already in place in iTwin.js. I think the quickest path to a complete implementation would be for me to update the iModel -> 3D Tiles pipeline to encode the edges according to the spec and update iTwin.js decode accordingly.

Co-authored-by: Aaron Franke <[email protected]>
Copy link
Contributor

@aaronfranke aaronfranke left a comment

Choose a reason for hiding this comment

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

How does this extension define the ends of each edge? Do they just end? Are they beveled/rounded? How do they connect to other edges?

Untitled

@pmconne
Copy link
Contributor Author

pmconne commented May 29, 2025

How does this extension define the ends of each edge? Do they just end? Are they beveled/rounded? How do they connect to other edges?

Beveling and rounding are only meaningful for wide (> 1 pixel) lines. Wide lines/edges are important in many of the same CAD use cases as visible edges, but IMO they are mostly orthogonal. I plan to propose a separate "line material" extension to describe wide/patterned lines (which would also be applicable to edges).

@pmconne
Copy link
Contributor Author

pmconne commented Jul 31, 2025

@kring said:

I would like to see a complete implementation of this extension in CesiumJS or iTwinJS, though, if there isn't one already. It would be useful both as proof that it can be implemented sensibly in WebGL (2?), and for my own interest in the rendering techniques involved.

We have implemented this extension in iTwin.js.

@weegeekps
Copy link
Contributor

@lexaknyazev Any other changes required preventing us from getting this approved and merged? Like EXT_primitive_restart, this is intended to just be an open multi-vendor extension.

@markschlosseratbentley
Copy link

The spec has been updated to now list CesiumJS as a known implementation in addition to iTwin.js. These implementations have the caveat that they do not implement the full capability of this specification, namely materials. This support is forthcoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.