ImageMaterialProperty for polygon material - the image is sliced

Hey,

While we are trying to provide an image / canvas / video to the polygon material, the image is almost always slices rather than stretched / warped to fit the polygon.

The attached image demonstrate it:

on the top right - some aerial image
the four colored dots are representing the footprint and are provided to the polygon using the hierarchy property.

we also use the stRotation of the polygon, providing it with the camera.heading value

as it can be seen the image is sliced, and because of that the position of the image has offset from the roads. although it should be positioned correctly given that the footprint polygon is correct.

another position:

I’ve simulated the above image in sandcastle : Cesium Sandcastle

I am familiar with the following issue :

but is there some workaround? any other options ?

1 Like

@arieleb

Thank you so much for the detailed post! Sadly, I am not familiar with any workarounds and there do not seem to be any merged pull requests that address this. Do any other community members have suggestions?

-Sam

This is really needed and was asked multiple times by dozen of cesium users.

For example in google earth the image is stretched to fit the given polygon :


(note: the image is rotated incorrectly but, the important thing here that the image is not sliced, regardless of the rotation)

this is what I expect, we need to stretch / warp the image on the gpu to fit the boundaries of the polygon

btw when I exported the KML from google earth, where the image was not sliced and then imported the KML into cesium, the same issue happened. so this will also causing presenting incorrectly some types of KMLs

@sean_lilley and @hannah already started to do some work to fix that (see link in prev comment), we will love to see it completed

1 Like

@arieleb

We are also happy to work with you to get this implemented. If you are able to submit a pull request that addressed the issue, I can do my best to ensure that it is reviewed in a timely manner.

-Sam

I still having same issue, too. Any updates on it except using rectangle instead of a polygon?