Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling is Supported for All Mapget Geometry Types #33

Open
8 of 20 tasks
josephbirkner opened this issue Sep 29, 2023 · 2 comments
Open
8 of 20 tasks

Styling is Supported for All Mapget Geometry Types #33

josephbirkner opened this issue Sep 29, 2023 · 2 comments
Labels
Docs Improvements or additions to documentation EPIC Realizing this feature-set will be spread across multiple issues. Styling Touches erdblick WASM style sheet processing.

Comments

@josephbirkner
Copy link
Collaborator

josephbirkner commented Sep 29, 2023

Currently, erdblick only supports mapget line geometries and renders them as (white) hairlines. But mapget supports more geometric primitives and users also need more ways of how to represent them. This epic aims to covers all needed geometric primitives and basic ways of how they need to be represented. Have a look a the Geometries Sandcastle to get a better understanding what kind of different representations of points, lines and polygons are possible with CesiumJS. All modes and presentation styles have to be usable with the rule-based, declarative styling system of erdblick.

Common:

Points

Lines

Different kind of line representations, have a look at Polyline Sandcastle.

Polygons

Meshes

@josephbirkner josephbirkner added Docs Improvements or additions to documentation Styling Touches erdblick WASM style sheet processing. labels Sep 29, 2023
@josephbirkner josephbirkner added this to the 0.3.0 milestone Sep 29, 2023
@MisterGC
Copy link
Contributor

MisterGC commented Oct 3, 2023

Let's split these up, support of each geometry primitive adds user value (and need some special logic).

Some additional remarks:

Lines: Let's intro a line support epic - Depending on the use case different basic line representations may be needed - especially one aspect we should keep in mind - having flat lines (in the x-z plane) with a world-unit (or pixel) width or having representation with a volume (like in the Polyline volume sandcastle) which may help users when navigating in a scene with 3d paths/lines. In addition there are aspects like dashing (#35) or arrows (see Polyline sandcastle)

Polygons: For the polygon support we should consider earcut.hpp at least as an entry point.

Meshes: In the title you mentioned meshes but they are not part of the list - we should also then define what kind of default styling/shading/lighting we want to use (e.g. using something like this style is imo better than just using some like this, but maybe we could activate the hover behavior)

@MisterGC MisterGC added the EPIC Realizing this feature-set will be spread across multiple issues. label Oct 4, 2023
@MisterGC MisterGC changed the title Render Points, Meshes, Polygons and Mesh-Lines mapget's geometry types are supported. Oct 4, 2023
@MisterGC MisterGC removed this from the 0.3.0 milestone Oct 4, 2023
@josephbirkner josephbirkner changed the title mapget's geometry types are supported. Styling is Supported for All Mapget Geometry Types Oct 4, 2023
@josephbirkner josephbirkner pinned this issue Oct 10, 2023
@josephbirkner
Copy link
Collaborator Author

Investigation Regarding Usage Of Cesium Primitive Instead Of Custom Shaders

  • Primitive: Equals GeometryInstances + Appearance. Can hold ONE OF ...
    • All Corridors (meter-width meshlines) and Meshes with solid colors
      • Using PerInstanceColorAppearance
    • All Corridors (meter-width meshlines) and Meshes with the same texture
      • Using MaterialAppearance
    • All Polylines (pixel-width meshlines) with solid colors
      • Using PolylineColorAppearance
    • All Polylines (pixel-width meshlines) with the same special line style (glow OR outline OR dashes OR arrow)
      • Using PolylineMaterialAppearance
  • PrimitiveCollection: Used to bundle all primitives for one tile layer.

Check this tutorial for an introduction into the matter.

For ground-based (sticking to terrain) geometry:

  • GroundPrimitive: To represent anything (other than polylines) that is glued to the ground.
    • All Corridors (meter-width meshlines) and Meshes with solid colors
      • Using PerInstanceColorAppearance
    • All Corridors (meter-width meshlines) and Meshes with the same texture
      • Using MaterialAppearance
  • GroundPolylinePrimitive: To represent scaling polylines on the ground.
    • All Polylines (pixel-width meshlines) with solid colors
      • Using PolylineColorAppearance
    • All Polylines (pixel-width meshlines) with the same special line style (glow OR outline OR dashes OR arrow)
      • Using PolylineMaterialAppearance

In the future, these are also inserted into the PrimitiveCollection:

  • BillboardCollection: To represent pins/points with icons.
  • LabelCollection: To represent text labels.
  • PointPrimitiveCollection: To represent untextured points.

Cesium Support For Erdblick Style Options

The above Cesium Primitive concepts support all planned Feature styling aspects, except...

  • Non-scaling dashed lines (unless we use a texture?).
  • Dashed arrows (unless we use a texture?).
  • Lines with arrow-heads on both sides (unless we use a texture?).
  • Highlighting: (Polyline)-MaterialAppearance-based geometry instances will require some magic.
    Ad-hoc color changes are only possible for PerInstanceColorAppearance/PolylineColorAppearance.
    hiding the "real" instance and showing a "highlight instance".

Note: Textured polylines/corridors would look equivalent to the legacy NDS mapviewer.

@Waguramu Waguramu unpinned this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Improvements or additions to documentation EPIC Realizing this feature-set will be spread across multiple issues. Styling Touches erdblick WASM style sheet processing.
Projects
None yet
Development

No branches or pull requests

2 participants