At some point during your astrophotography journey you start to wonder – can these deep space photos be done in 3D?
You may have seen visualisations on space documentaries where nebulae are given a sense of depth. It’s possible you’ve already stumbled across the incredible work of Finnish astrophotographer J-P Metsavainio, whose 3D post processing is some of the best in the world.
Here I’ll show a simple method, originally described by J-P Metsavainio, for converting a 2D nebula astrophoto into a 3D stereo pair.
The process leans heavily on artistic license and is certainly not a scientifically accurate portrayal of the volume and spatial dimensions of the subject, but it is exquisite to look at.
Once you have the 3D pair, people who can cross their eyes will be able to view the 3D effect immediately. For others, you can create a looping GIF as shown here, or convert to a red/cyan anaglyph for use with 3D glasses.
Either way, if your folks reckon you’re pretty fancy with your space photos…just wait until you blow their cotton socks off with one in 3D!
Ok let’s do it. You will need:
- A completed nebula astrophoto, preferably with no dominating stars or diffraction spikes
Note: if you intend on making a 3d Stereo pair, portrait oriented images are best.
- PixInsight (Optional)
Step 1 – Prepare a starless image
The left hand image in our 3D pair is the finished photo. Rotate this to portrait orientation if not already (it’s easier on the eyes to get the 3D that way) save this as LEFT.TIF.
For the right hand side, we need to start with a starless version of the finished image. There are many ways to do this, and it can be done with PhotoShop filters like Dust and Scratches, but I prefer PixInsight’s MorphologicalTransformation tool.
Use MorphologicalTransformation with PixInsight and PhotoShop to remove stars:
- Open LEFT.TIF in PixInsight and then the go to the PROCESS menu -> Morphology -> MorphologicalTransformation
- Zoom into the image until your pixels are 100% or more.
- Change the Operator to “Morphological Selection” and the Amount to roughly 50%. Set the Structure Type to “Circular”.
- Under Thresholds increase Low to about 0.2 to help preserve the nebula structure. You may need to adjust these depending on your image resolution and star size.
- Hit the APPLY square at the bottom left of the image. Note the nebula detail — if it’s ok, hit APPLY a second, then a third time if needed. You should now be left with some bigger stars only.
- Save the image as RIGHT.TIF
- In PhotoShop, open RIGHT.TIF and use the Spot-healing tool to remove the remaining bright stars and save your file. You might also like to run a gentle Dust and Scratches filter.
At this point you might be tempted to stop because a starless nebula looks AMAZING! Admire your work then move on to the next step…
Step 2 – Create a star-only image
- Duplicate the “final” LEFT.TIF and call it STARS.TIF. Make sure it’s flattened.
- Open STARS.TIF in PhotoShop and select Image menu -> Apply Image -> Source: RIGHT.TIF -> Blending: Subtract. This will give you a nice “stars only” image.
- Save this file.
Step 3 – Prepare a luminance map
- After you’ve saved your starless image as RIGHT.TIF, open in PhotoShop and choose File -> Save As… -> LUM.PSD, effectively duplicating it into a new file.
- Image menu -> Mode -> Greyscale and confirm you want to discard the colour data.
- Image menu -> Mode -> 8bits/Channel
- Add the Gaussian Blur filter at 1-2 pixels. This will smooth out the 3D effect as this image will determine the depth/height of the 3D effect, based on value of each pixel from black to white.
- Save this image as a PhotoShop document (e.g. LUM.PSD)
Step 4 – Add your stars to the RIGHT.TIF image and place in 3D space!
At this stage I like to open the LEFT.TIF and RIGHT.TIF files and put them side by side in PhotoShop. It makes it easy to compare the differences, and if you can do the 3D crossover vision unaided, you can look at your image in 3D as you manipulate it.
- Open LEFT.TIF and RIGHT.TIF files so you can see them side by side. RIGHT.TIF is still a starless nebula at this stage.
- Click on RIGHT.TIF to make it the active window and Convert to 8-bit with Image -> Mode -> 8 bits/Channel.
- Select File -> Place … -> STARS.TIF to add the stars as a new layer.
- Change the Layer Blending Mode from “Normal” to “Screen” on the new layer.
- Hold down SHIFT and click the LEFT ARROW on your keyboard 2-3 times. This shifts the star layer slightly to the left.
NOTE – At this stage remember that anything we shift left on the RIGHT.TIF image will appear to move “away” from the viewer in 3D. Anything we shift right will appear to move “toward” the viewer in 3D.
- Right click anywhere in the image and select Place. Your star layer is now in the image, and the stars are in the back, “behind” the nebula when viewed in 3D.
- Now use the lasso or circle select tool to select a bright star, then click “V” for the move tool. Use SHIFT and the RIGHT ARROW key to nudge the star to the right. This brings it “towards” the viewer in 3D.
- Repeat this last step for as many bright stars as you like. Use different amounts of nudging to the right so they appear different distances from each other for a great depth effect.
Step 5 – Make your nebula 3D with the displace filter
- In RIGHT.TIF select the starless nebula layer
- Click Filter -> Distort -> Displace … then change Vertical to 0 and Horizontal from 10-30. You may need to try different values here if the effect is too extreme or subtle depending on your image size.
- It will prompt you for a file, select the LUM.PSD file you created and saved earlier.
- Did you see your nebula appear to rotate as if by magic? If you missed it hit CONTROL-Z (undo) a few times to see it change. If it’s too subtle or too strong, go back a few steps and change the Horizontal value for the Displace.
Your LEFT and RIGHT images are now a pretty convincing 3D pair.
Ideally you should save them in a new document side-by-side and export to JPG to share with your cross-eyed capable friends.
You might also like to try reversing the pairs to see the nebula “pop” in a different direction. If that’s more pleasing to you, you might like to go back and move the star layer around again as reversing the pair would have made the far-away stars close, and vice versa.
Another good trick is if you’d like to “sculpt” certain areas of the nebula in 3D, use the liquify filter in photoshop to “push” the nebula features right or left slightly (nearer or further).
Finally, if your nebula has certain features, like a tendril of cloud you’d like to see “closer” to you, copy it into a new layer and push it slightly to the right.
Step 6 – Enjoy your insanely amazing 3D stereo pair!
There are several different ways to view the 3D image, try them all:
- View with the traditional cross-eye method.
- Convert into an animated GIF that bounces between each pair giving the illusion of 3D rotation.
- Load the image onto your phone and view with a pair of “Google Cardboard” goggles. Anyone can view these and they are super cheap!
- Use these instructions from NASA to convert into a red/blue anaglyph for use with classic retro 3D glasses.
- If you’d like to make a colour anaglyph like the one at the start of this article, simply copy and paste one of the pairs into the RED channel of the other one. Then with all channels visible, line up the stars as best you can then and nudge the RED channel layer left or right until it looks good in your 3D glasses. Note, this will work best for photos that are not predominantly blue or red.
I’m a huge fan of 3D space photos, so if you create any for planetary or landscape I’d love to see them. Let me know in the comments, and happy displacing!
Dude…You are soooo awesome….This was a really easy to follow guide. My Grandmother always said if I crossed my eyes too much, they might get stuck. As long as I can keep looking at images like these it might be worth it… 😉
Thanks for the tutorial. However, the description for the direction of motion to move stars closer/further appears to be backwards. My foreground stars ended up in the background and vice-versa. Just moved the stars to the other side and presto-fixo. I’ll be posting my results at http://photos.orionranchobservatory.com/index.php/albums/4505.
Thanks so much for the help. You showed me some things I couldn’t have figured out – like the displace filter. I took a Hubble image of the crab nebula and made it spectacular.
I’d like to move on to some rotating images, like Metsavainio has done.
Have you tried making lenticular prints? I can imagine them in a transparent medium, backlit. That would probably be the ultimate.