How to make Stereograms
Begin
with updating your system and installing the needed
applications, in this case I'm using Debian Linux.
sudo apt-get update && sudo apt-get upgrade
Next, install the free applications
you'll need. These apps are all available in the Debian free
repositories with no need for adding lines to
/etc/apt/sources.list. We need three apps for this, Blender for
the depth map image, GIMP for creating a random texture, and
OpenStereogram for assembling the depth map image and the
texture into your stereogram.
sudo apt install blender openstereogram
gimp
Apt shows about a 500Mb download. Go
ahead and press Y or enter to accept the download and wait for
it to finish installing.
When the installation is finished, open
up Blender.
I will not be going over the full
capability and usage of Blender in this article, there are many
more comprehensive guides online that go in depth on how to use
Blender. Blender is used for 3d modeling and uses .stl files and
more than can be imported from the file button at the top left,
as shown here. Of course, you could also open another project
youve already made in Blender.
For the sake of simplicity, the only
object we will be working with in this guide is the default cube
that is already loaded into the scene when you open Blender, but
feel free to import your own objects or projects, position the
scene how you wish, and move the camera to the proper position
if you desire at this point.
Now that your scene is set up, switch
to the Compositing tab at the top of the window.
Check the box at the top left that
reads "Use Nodes" and when you do, two boxes labeled Render
Layers and Composite will appear.
Next at the top left of the window, go
to Add > Output > Viewer, and place it anywhere for now.
Then Add > Vector > Map Value, place it anywhere,
and finally Add > Color > Invert, for a total of 5 boxes.
Then arrange them like so:
Render Layer Depth Output > Map Value Input
Map Value Output > Color Input on Invert
Invert Color Output > Composite Image Input
Invert Color Output > Viewer Image Input
The check boxes for using alpha I would recommend to leave
checked.
Now, the Map Value's "Size" Value makes
it more sensitive, or less sensitive, sometimes (scene
dependent) this value makes sense to be raised, but often and in
this case, we lower it to a low value like .100 or even .050 (or
a negative value). This will make sense later, when you adjust
the Map Value's "Offset" Value. Adjusting the Offset Value when
the Size value is positive, results in objects closer to the
camera being lighter, and darker as they get farther away. When
size is a negative value, it makes objects closer to the camera
darker, and lighter the further away they are. This is useful
for inverting the 3D effect of a stereogram, but for a normal 3D
stereogram that we are making today, we leave the Size Value at
a low positive value of .100 .
I checked Map Value's Use Maximum and
set it to 20, adjusting this value can sometimes help the image
and the value varies between different scenes, but in this scene
it can be safely ignored, as it made no difference setting it to
20. As you can see in the screenshot above, the Map Value Offset
I found which worked best for this particular scene was -12.4
and the size was .100 . This causes the furthest corner of the
cube, at the top, to appear darker, as it should be, and the
closer edges and corners to appear lighter. Ideally, a stronger
contrast in your depth map image that we are generating will
result in a cleaner image with better 3D effect. Adjust the
values around until you find one that works for your scene. If
an area of the scene that's supposed to be 3D is too close to
solid black or solid white in color, the area may or may not be
rendered properly, but instead show up in the finished
stereogram as raised out flat to its furthest point possible if
white, and if black will be rendered at the level of the
background, or not rendered at all. If you want to see the
rendered scene in the background of the Compositing tab like you
see above, you must first render the scene at least one time
using F12 or go to the top left and press Render > Render
Image. Then you can play with the map value box and see a
real-time output of the values you're changing.
At this point you should have a final
scene and depth map, and if so then you're ready for rendering.
Press F12 or press Render > Render Image and save it as a
.png
Close Blender, and open GIMP, this step
is optional if you already have a texture in mind for use with
your depth map. If you dont have a texture continue from here,
otherwise skip this section. Start by creating a new image and
set its height and width, I chose 2000px by 1500px.
Now you'll have a blank white canvass.
Select Filters > Render > Noise > Simplex Noise.
I chose 20 iterations and a scale of 5.
Next export the file as a .png from
File > Export as.
Close GIMP and start the a last
application, OpenStereogram. Here you can adjust the width and
height as you please, I chose 2000px by 1500px. Make sure Hidden
Element is set to depth map.
Select your depth map .png you created
in Blender.
Finally, select your texture .png you
created in GIMP.
Press generate, save it, and your
Stereogram is finished!
Make Stereograms on
Windows. For Linux, click here.
CSS
Styling and more from thesitewizard.com