Convert 2:1 equirectangular panorama to cube map

前端 未结 11 1171
情深已故
情深已故 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 18:12

    I wrote a script to cut the generated cubemap into individual files (posx.png, negx.png, posy.png, negy.png, posz.png and negz.png). It will also pack the 6 files into a .zip file.

    The source is here: https://github.com/dankex/compv/blob/master/3d-graphics/skybox/cubemap-cut.py

    You can modify the array to set the image files:

    name_map = [ \
     ["", "", "posy", ""],
     ["negz", "negx", "posz", "posx"],
     ["", "", "negy", ""]]
    

    The converted files are:

提交回复
热议问题