<p>There are a few ways you can do it. Basically, you need to get your photo into a format that's suitable for using as an environment map. There are a number of such projections available. The most common ones I've run into for 360° video are:</p>

<ol>
<li><a href="https://en.wikipedia.org/wiki/Cube_mapping" rel="nofollow">Cube maps</a> - 6 images that show what the camera would see if it were looking forward, backward, left, right, up and down from the same position.</li>
<li><a href="https://en.wikipedia.org/wiki/Equirectangular_projection" rel="nofollow">Equirectangular</a> - the 2nd image you show above is this type of photo. It must be exactly twice as wide as it is tall. The rows and columns of pixels then correspond to the latitude and longitude of the sphere you map it onto.</li>
<li>Dual hemispherical - this is when you take a camera (real or virtual) and make an image with a 180° field of view. There are 2 - one for the front and one for the back.</li>
</ol>

<p>Given the image you have, there are a few ways you could create something useful from it. You could crop it or extend it so that it has a 2x1 aspect ratio and use it as-is. You'll get a weird seam where the left and right meet, but if you are handy with photo editing tools, you can probably modify it to look reasonable. Note that this will give you the correct image for an equirect projection, but it may or may not look how you want. That purple band would never be visible all at once. It would wrap around the entire field of view, for example.</p>

<p>Another option is to make a cube map out of it. You could crop what you have into 3 equal squares for, say, front, left, and right. Then you'd need to generate the other 3 yourself. Generating a star field isn't too difficult either in code or using a photo-editing/compositing tool. Or if you know any artists, perhaps they could help you.</p>

CC BY-SA 3.0
2016-10-26T08:07:44.140Z
You wouldn't just get a weird seam if you tried to use this image as an equirectangular map: it would also get increasingly distorted towards the poles. The stars would get squished together in one axis, so they'd look like lines.
Dan Hulme
CC BY-SA 3.0
2016-10-26T14:32:17.553Z
That's true about the distortion. However, I think there would be a weird seam because the purple band wouldn't meet itself. It would just suddenly stop with a hard edge and restart higher up with another hard edge.
user1118321
CC BY-SA 3.0
2016-10-26T16:26:56.160Z
Yes, you'd get a seam as well. But you already mentioned a way to reduce that problem, so I thought I'd better caution the OP that even after fixing the seam they'll still have distortion.
Dan Hulme
CC BY-SA 3.0
2016-10-26T02:44:43.387Z
2016-10-26T02:44:43.387Z
user1118321
<p>How to turn a normal photo like this one : </p>

<p><a href="https://i.sstatic.net/LhZwE.jpg" rel="noreferrer"><img src="https://i.sstatic.net/LhZwE.jpg" alt="enter image description here"></a></p>

<p>into a photo that I can use in my game development platform (Unity3D). I just wrap a 3d sphere model with the photo and then it can be all around me when I use it in a VR headset.</p>

<p><a href="https://i.sstatic.net/G3acL.jpg" rel="noreferrer"><img src="https://i.sstatic.net/G3acL.jpg" alt="enter image description here"></a></p>

<p>I know it's impossible for a car photo, but i just need to convert the space photo into the something like the car photo then retouch the stitching.</p>

CC BY-SA 3.0
2016-10-25T19:26:04.347Z
If the input photo is only looking in one direction then this will be impossible without distortion. You can either use a collection of photos covering all the different directions, or you can have a distorted result, which will also have a discontinuity at the left and right edges.
trichoplax is on Codidact now
<3d><transformations><virtual-reality>
Normal 2D photo to VR-compatible spherical photo
Nani
# Normal 2D photo to VR-compatible spherical photo

(Asked by: username_0 on 2016-10-25)

How to turn a normal photo like this one :

[![enter image description here](https://i.sstatic.net/LhZwE.jpg)](https://i.sstatic.net/LhZwE.jpg)

into a photo that I can use in my game development platform (Unity3D). I just wrap a 3d sphere model with the photo and then it can be all around me when I use it in a VR headset.

[![enter image description here](https://i.sstatic.net/G3acL.jpg)](https://i.sstatic.net/G3acL.jpg)

I know it's impossible for a car photo, but i just need to convert the space photo into the something like the car photo then retouch the stitching.

**Tags:** 3d, transformations, virtual-reality

> **Comments:**
> **username_1**: If the input photo is only looking in one direction then this will be impossible without distortion. You can either use a collection of photos covering all the different directions, or you can have a distorted result, which will also have a discontinuity at the left and right edges.  

---

## 1 answers

### Answer by username_2 on 2016-10-26. Score: 1

There are a few ways you can do it. Basically, you need to get your photo into a format that's suitable for using as an environment map. There are a number of such projections available. The most common ones I've run into for 360° video are:

1. [Cube maps](https://en.wikipedia.org/wiki/Cube_mapping) - 6 images that show what the camera would see if it were looking forward, backward, left, right, up and down from the same position.
2. [Equirectangular](https://en.wikipedia.org/wiki/Equirectangular_projection) - the 2nd image you show above is this type of photo. It must be exactly twice as wide as it is tall. The rows and columns of pixels then correspond to the latitude and longitude of the sphere you map it onto.
3. Dual hemispherical - this is when you take a camera (real or virtual) and make an image with a 180° field of view. There are 2 - one for the front and one for the back.

Given the image you have, there are a few ways you could create something useful from it. You could crop it or extend it so that it has a 2x1 aspect ratio and use it as-is. You'll get a weird seam where the left and right meet, but if you are handy with photo editing tools, you can probably modify it to look reasonable. Note that this will give you the correct image for an equirect projection, but it may or may not look how you want. That purple band would never be visible all at once. It would wrap around the entire field of view, for example.

Another option is to make a cube map out of it. You could crop what you have into 3 equal squares for, say, front, left, and right. Then you'd need to generate the other 3 yourself. Generating a star field isn't too difficult either in code or using a photo-editing/compositing tool. Or if you know any artists, perhaps they could help you.

> **Comments:**
> **username_3**: You wouldn't just get a weird seam if you tried to use this image as an equirectangular map: it would also get increasingly distorted towards the poles. The stars would get squished together in one axis, so they'd look like lines.  
> **username_2**: That's true about the distortion. However, I think there would be a weird seam because the purple band wouldn't meet itself. It would just suddenly stop with a hard edge and restart higher up with another hard edge.  
> **username_3**: Yes, you'd get a seam as well. But you already mentioned a way to reduce that problem, so I thought I'd better caution the OP that even after fixing the seam they'll still have distortion.  

---

