CesiumGS / CesiumGS/cesium

Artifacts in 2D / CV mode when rendering over the IDL

Open
#10,401 0 comments 0 reactions 0 assignees View on GitHub
category - 2d / columbus view category - model/gltf
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

#10384 added correct 2D / CV projection to `ModelExperimental`, but it doesn't properly handle models that cross the IDL. For example, a green unshaded cube will be stretched across the entire map:

![image](https://user-images.githubusercontent.com/32226860/170302974-8f582b78-a37b-4dde-9242-aba8dddbc25f.png)

These artifacts also appear in the projected [S2 globe](http://localhost:8080/Apps/Sandcastle/index.html?src=3D%20Tiles%20Next%20S2%20Globe.html&label=3D%20Tiles%20Next):

![image](https://user-images.githubusercontent.com/32226860/170304307-3715c24f-fed7-44ae-beb9-09f15df3a7cc.png)

@ptrgags made a diagram of what was likely happening. Due to the IDL and wrapping of coordinates, one side of the model is rendered 360 degrees off from where it should be.
![image](https://user-images.githubusercontent.com/32226860/170303533-f46ce3dc-cd22-4161-8583-01ac0937f493.png)

Unfortunately there is no way to adjust the longitude / latitude of the positions to modulo them before projecting; it's not possible to derive them from the model matrix. The most thorough solution might be to follow what `GeometryPipeline` does: split the geometry along the IDL, and render them both.

Contributor guide

Open the contributing guide

Research direction

Reproduce the artifact with the linked 3D Tiles Next S2 Globe Sandcastle example, then inspect ModelExperimental's 2D/CV projection and GeometryPipeline's IDL handling. Done means models crossing the IDL render without stretching in both 2D/CV mode and the projected S2 globe.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.