3D Images / Stereoscopy in Beamer

1,379

Here are two options, none of them using a special package:

  1. Just include the original image (\includegraphics{...}), and look at it in a cross-eyed fashion. This might be a bit painful, thus do it at your own risk. However, special prismatic goggles are available in order to avoid cross-eying.

enter image description here


  1. Produce an anaglyph from the two halves of the original, embed it into the document (\includegraphics{...}) and use cheap red-cyan goggles to look at it. These are the steps for creating such an anaglyph using ↗ImageMagick command line tool magick:

2.1. Get the original size:

$ magick identify 92vc6.jpg
92vc6.jpg JPEG 3232x1080 3232x1080+0+0 8-bit sRGB 232083B 0.000u 0:00.000

2.2. Save the left half (for the right eye) and the right half (for the left eye) into separate files:

$ magick convert -crop 1616x1080+0+0 92vc6.jpg shark-right.png
$ magick convert -crop 1616x1080+1616+0 92vc6.jpg shark-left.png

2.3. Produce the anaglyph by compositing the red channel of shark-left.png and the green and blue channels of shark-right.png into one image file shark-ana.png:

$ magick composite -stereo +0 shark-right.png shark-left.png shark-ana.png

If you have a sequence of anaglyphs (set of PNG or JPEG, or animated gif) making up an animation, you could embed this sequence using the animate package. The same applies to animated pairs of stereo images (like the above) where you may want to use prismatic goggles (or cross-eying).

shark-ana.png:

enter image description here

Share:
1,379

Related videos on Youtube

Shaman
Author by

Shaman

Updated on August 01, 2022

Comments

  • Shaman
    Shaman over 1 year

    Is it possible to create "real" 3D effects within a Beamer presentation using Stereoscopy (for 3D monitors)?

    What I mean by that is:

    • Duplicate the slides left and right (for both eyes)

    • Animations so that certain parts of the slide pop out of the screen, i.e. different translation in the left and right view

    • Support for stereoscopic images, or even videos (with the multimedia or movie package). An example for a stereoscopic image:

    Simple stereoscopic image

    Is there a package that allows creating these kinds of effects? Or a workaround with the normal Beamer package? Thanks.

    • Sebastiano
      Sebastiano almost 6 years
      Welcome to TeX.SE. Personally I do not think that exists a specific package for what you ask.
    • AlexG
      AlexG almost 6 years
      The cheapest option: \usepackage{graphicx}+\includegraphics{...} and cross-eyed looking at the result (at your own risk).
    • Shaman
      Shaman almost 6 years
      Hi, thanks for the ideas. I think I wasn't clear enough: the 3D images are the simple part. The difficult part is to duplicate the slides (with text, equations, ...) for the left and right eye. The monitor doesn't use analygraphics (red-cyan), but two completely different images side by side. (polarization glasses)
  • davyjones
    davyjones almost 6 years
    Cross-eye is really low conf yet very efficient!
  • Shaman
    Shaman almost 6 years
    Hi AlexG, thanks for the idea. But the monitor uses two completely different images for the left and right eye, arranged horizontally side by side, and then uses polarization glasses. I'm not looking for an analygraph.
  • AlexG
    AlexG almost 6 years
    Ok, for this you will have to prepare two versions of the presentation PDF, one with the left-eye, the other with the right-eye images. Then, you will have to join them somehow.