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

Polylines slice through 3D Tiles rather than draping over them #7453

Open
lilleyse opened this issue Jan 2, 2019 · 9 comments
Open

Polylines slice through 3D Tiles rather than draping over them #7453

lilleyse opened this issue Jan 2, 2019 · 9 comments

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Jan 2, 2019

When clamping a polyline to 3D Tiles it slices through the mesh rather than draping over the topmost surface. This is a limitation of the way ground polylines are rendered.

image

@lilleyse
Copy link
Contributor Author

lilleyse commented Jan 2, 2019

This also applies to ground primitives on 3D Tiles but might actually be the desired look:

ground

@OmarShehata
Copy link
Contributor

The use case here is being able to draw lines on vertical surfaces. I just got this request over email. It works fine on top of the building:

image

But if you want to draw a line that goes over the 2nd floor windows it colors the entire vertical surface:

image

@hpinkos
Copy link
Contributor

hpinkos commented Jan 29, 2020

@OmarShehata are you trying to use a GroundPrimitive? You would need to use a non-clamped polyline to draw on a vertical surface.

@OmarShehata
Copy link
Contributor

Thanks @hpinkos . You're right, I was setting clampToGround: true there. This should be sufficient for this use case, you'd just have to be careful not to draw the line exactly on the surface so it doesn't clip through it, or perhaps use a depthFailMaterial. So what isn't supported is specifically clamping lines to vertical surfaces.

Sandcastle I used for testing for future reference.

@schmidtk
Copy link

@hpinkos I came across this issue rendering OSM building footprints along with the OSM Buildings 3D tile layer. Our footprints are rendered as clamped polylines, and it appears clamped lines that parallel the edge of a 3D tile influence how the surface of the 3D tile is rendered.

Sandcastle Demo

In this demo, I have added a clamped polyline that outlines a building from the OSM Buildings 3D tile layer. The end result is a red building, but I would expect a red outline around the base of the building.

Screen Shot 2020-10-12 at 11 32 30 AM

Is this expected behavior?

@OmarShehata
Copy link
Contributor

@schmidtk this does appear to be the same bug. Easiest workaround would be to set clampToGround: false and sample the terrain height at each point along the polyline to place the outline on the ground "manually" that way. Feel free to post on the community forum (https://community.cesium.com/) if you're having trouble with this so we can move the discussion about workarounds to this specific use case there.

@jiunuan
Copy link

jiunuan commented Jul 27, 2021

What should I do if I encounter a rock protruding horizontally when drawing a polyline on 3dtiles, here I set clampToGround to true
1626860576418013552

In fact, I just want to cross the line formed by these green balls and stick to the rock

@Lafeu-p
Copy link

Lafeu-p commented Mar 22, 2024

Hello, is there any follow-up to this question? Is there any way to fix this

@ggetz
Copy link
Contributor

ggetz commented Mar 22, 2024

Hi @Lafeu-p, there hasn't been any activity on this item recently. Likely we would need to change our overall approach to draping polylines.

If you'd like to add more information about your use case, that may help us prioritize. If you are interesting in contributing, please let us know and we'd be happy to discuss implementation or review a PR. Thanks!

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

No branches or pull requests

7 participants