Image material incorrectly displayed in rectangle polygon at different Yaw, Pitch and Roll angles

Hello,
Thank you in advance for any help with this issue.

I'm porting our web site from WorldWind Javascript to Cesium. One of the functionalities is that we display rectangle images at different yaw, pitch and roll angles on the map.
I'm using a polygon entity with a jpg material for testing. As you'll see in the SandCastle sample (link below) the material image looks correct only when the pitch angle is -90 or 90 (i.e. looking straight down or up), as soon as the pitch angle is >-90 and <90 then the material image starts to get "streched" vertically. When the pitch angle is 0 the image is so streched that you only see the image's red border).
Also when the yaw angle changes or the roll angle changes the image gets "distorted".
In the SandCastle example you'll be able to select different pre-defined yaw, pitch and roll angles to see the effects on the image (using the dropdown selection in the toolbar).
I also set the stRotation value but you'll see that for example if the Yaw=90, then I have to set stRotation to 90 for the image to be correct. I would've thought that stRotation should only apply to the roll angle.

What I was expecting to see is that the image always looks the same (i.e. how the actual jpg image looks like as seen when Yaw=0, Pitch=-90, Roll=0) but shown on the map at the specified Yaw, Pitch and Roll angles.

Am I approaching this correctly? Is this possible to do in the current version of Cesium? Is there another recommended way of doing this (a different entity type. I tried other ones (wall, rectangle, etc.) but polygon seem to be the only one that allows you to draw a rectangle at any yaw, pitch and roll angles). Perhaps I'm creating the polygon incorrectly?

Thank you very much,
Javier Santoro

Sandcastle example:
http://52.227.170.195/c/Apps/Sandcastle/?src=Frame%20Test.html&label=Showcases

Versions:
Cesium: 1.40
Chrome: 63.0.3239.108 (Official Build) (64-bit)
Windows 10 (64-bit)

Hello,

Sorry, my Sandcastle sample page for the issue I'm having is down at the moment. I'll bring it up online as soon as possible.
In the meantime if anybody has any pointers/ideas on the issue I described in the original post please let me know here.

Thanks
Javier

Hi Javier,

If you can copy/paste your example into our hosted version of Sandcastle, and give out the link you get when you hit the “Share” button in the toolbar.

The Rectangle Sandcastle example has a rotating rectangle with an image material if that helps in the meantime.

Thanks,

Gabby

Hi Gabby,

Thank you for the reply.

Unfortunately my Sandcastle sample code is in our Azure server which is currently off-line. It should be back on-line later today or tomorrow and I’ll send you the code.

Yes, like you said, there’s a demo where there’s a rotating rectangle with an image material. In my test I’m using a four corner polygon (essentially a rectangle) but I can locate this rectangle on the map at any yaw, tilt and roll angle.

If the tilt angle is -90 or 90 then the result is the same as the Rectangle example and the image looks correct. The rectangle example shows a rectangle as if you were looking at it from above the terrain straight down (i.e. -90 degrees tilt).

the problem happens when you start changing the tilt angles between -90 and 90.

You’ll see this clearly in my example as soon as I can put it back on-line.

Thanks

Javier

Hi Gabby,

Please take a look at my SandCastle sample for my issue here:
http://52.227.170.195/c/Apps/Sandcastle/?src=Frame%20Test.html&label=Showcases

In the SandCastle example you'll be able to select different pre-defined yaw, pitch and roll angles to see the effects on the image (using the dropdown selection in the toolbar).
The airplane model would be like the "camera/eye" looking at the rectangle/polygon.

Take a look at my original post for more info.

Thank you,
Javier