none
Adjust camera parameters RRS feed

  • Question

  • The old (Virtual Earth) control had the (undocumented) option to manually manipulate the camera matrices. This way, it was possible to create any kind of 3D stereo application. After looking at the new control, I could not find any obvious API to do this. Is there any possibility in the new controls (UWP or WPF) to set an asymmetric view frustum?

    Best regards,
    Christoph

    Sunday, April 10, 2016 2:23 PM

Answers

  • Yes, the trySetScene is only for the UWP map control.

    You can't set the frustum parameters directly, but if you wanted to achieve stereo rendering, it might be possible using two map controls. Set the camera positions for each with some lateral separation to give you stereo parallax, then use RenderTargetBitmap to grab the control buffers and send the two to whatever stereo rendering device you have as the left/right channel.

    Wednesday, April 13, 2016 4:38 PM
    Moderator

All replies

  • You can directly set the camera position with the API

    TrySetScene(MapScene.FromCamera(...))

    It allows you to specify the camera position (lat/long/alt), orientation (tilt, heading), and Field of view. The roll part of orientation is currently ignored.

    Monday, April 11, 2016 4:14 PM
    Moderator
  • TrySetScene(MapScene.FromCamera(...))

    This is available for UWP only, right? And there is no possibility to set an asymmetric frustum, or did I miss something?
    Wednesday, April 13, 2016 8:34 AM
  • Correct. Note that there was no documented (I.e. Supported way) to do this in virtual earth.


    [Blog] [twitter] [LinkedIn]


    Wednesday, April 13, 2016 1:53 PM
  • Correct. Not that there was no documented (I.e. Supported way) to do this in virtual earth.


    [Blog] [twitter] [LinkedIn]

    That is true. But as you see, I have absolutely no problem with using an unsupported way:

    Wednesday, April 13, 2016 4:34 PM
  • Yes, the trySetScene is only for the UWP map control.

    You can't set the frustum parameters directly, but if you wanted to achieve stereo rendering, it might be possible using two map controls. Set the camera positions for each with some lateral separation to give you stereo parallax, then use RenderTargetBitmap to grab the control buffers and send the two to whatever stereo rendering device you have as the left/right channel.

    Wednesday, April 13, 2016 4:38 PM
    Moderator
  • you stereo parallax, then use RenderTargetBitmap to grab the control buffers and send the two to whatever stereo rendering device you have as the left/right channel.

    Yes, I was thinking of that (the stereo would be better with an asymmetric frustum, but parallel would work, too). The problem is that I additionally have a tiled display (10 4K displays). It is difficult putting cameras side by side such that the resulting image is pixel-perfect aligned all the time ...
    Wednesday, April 13, 2016 4:42 PM