Mapping a stereographic projection to the inside of a sphere in ThreeJS

前端 未结 3 882
离开以前
离开以前 2021-02-10 18:01

When it comes to 3D animation, there are a lot of terms and concepts that I\'m not familiar with (maybe a secondary question to append to this one: wha

3条回答
  •  清酒与你
    2021-02-10 18:18

    I think, it's would be quite difficult to modify the UVs, so that the stereographic projected image will fit. The UVs of a sphere are set to fit textures with equirectangular projection.

    To transform the image from stereographic to equirectangular, you might want to use Panorama tools like PTGui or Hugin. Or you can use Photoshop (apply Filter > Distort > Polar Coordinates > polar to rectangular).

    Equirectangular projection of the image (with Photoshop), resized to 2:1 aspect ratio (not necessary for texture)

    If you want the texture to be inside the sphere (or normals flipped), you are able to set the material to THREE.BackSide.

    var material = new THREE.MeshBasicMaterial( { map: texture, side: THREE.BackSide } );
    

    Maybe, you have to flip the texture horizontally then: How to flip a Three.js texture horizontally

提交回复
热议问题