Convert 2:1 equirectangular panorama to cube map

前端 未结 11 1168
情深已故
情深已故 2020-11-30 17:30

I\'m currently working on a simple 3D panorama viewer for a website. For mobile performance reasons I\'m using the three.js CSS3 renderer. This requires a cube

11条回答
  •  佛祖请我去吃肉
    2020-11-30 17:56

    I created a solution for this problem using OpenGL and made a command line tool around it. It works both with images and videos, and it is the fastest tool that I found out there.

    Convert360 - Project on GitHub.

    OpenGL Shader - The fragment shader used for the re-projection.

    The usage is as simple as:

    $ pip install convert360
    $ convert360 -i ~/Pictures/Barcelona/sagrada-familia.jpg -o example.png -s 300 300
    

    To get something like this:

提交回复
热议问题