Camera with Mercatur or Mollweide Projection

Hi Folks -

I am interested in making a small application for viewing astronomical data. General need is to be able to navigate a viewpoint through a set of data and eventually make a picker that allows selection with additional data display. Think stellarium, but multiplatform and as a live front end to incoming data.

Brian Hay has made a really nice little app here that serves as a starting point: GitHub - brian-hay/celestial-sphere: Dynamic celestial sphere created with Babylon.js using external star map data of the 5000 brightest stars.

We use a FlyCamera to change the viewpoint yaw, pitch, roll and fov, which works really nicely. However, when the user zooms out, the perspective distortions become really obvious.

In many data display tools, the perspective problem is “solved” using alternate projections such as Mollweide or Mercatur projections. The python BASEMAP package has a bunch of projections to choose from: Setting up the map — Basemap Matplotlib Toolkit 1.2.1 documentation. We’d like to modify the perspective as the fov gets large to become some alternate projection that more closely matches users’ (poorly defined) expectations.

Is it possible to modify the projection algorithm used by a camera?

Thanks for your advice (and for the awesome tool!),
sam

Hey! and welcome!

You can actually set the projection matrix you want with:

camera.freezeProjectionMatrix(yourMatrix)
1 Like

Hello @neutralino just checking in if you’d like any more help with this