picture home | art | events | music | rack extensions | downloads | pixel blog | qt_tools

omino pixel blog

pixels, motion, and scripting
david van brink // Wed 2015.03.4 17:03 // {dome}

Note on om_sphere2dome

As introduced in yesterday’s post, you can download my Mac command line tools, om_sphere2dome to help convert Modo spherical projection images to fulldome domemaster images.

For reference, I’ll here post the tool’s help info, so you can see its feature set more easily.

poly@omino-8999 domework: om_sphere2dome --help

om_sphere2dome

This command line tool transforms a spherically-projected
image file to a Domemaster image file (180 degree fisheye).
The source image is a 2:1 aspect ratio equirectangular
projection, as produced by Modo's spherical camera. The
center square is extracted and transformed.

See http://omino.com/pixelblog/2015/03/03/modo-for-fulldome-
part-2/

--help
Optional. Show help.

--infile=<file name>
Required. A source .png or .jpg image, 2:1 aspect ratio,
spherically projected.

--outfile=<file name>
Required. The output .png or .jpg image to write, square,
Domemaster projection.

--vflip=<yes or no>
Optional. Vertically flip the image.

--size=<number>
Optional. Size of output image.

--azimuth=<number>
Optional. Shifts view negative-left or positive-right
in degrees.

Written by david.van.brink@gmail.com, 2015. Uses Lode Vandevenne's
excellent lodepng library from http://lodev.org/lodepng/. Uses Rich
Geldreich's wonderful single-file jpeg library from https://code.google.com/
p/jpeg-compressor/. 8x8 font created by John Hall, http://overcode.yak.net/
12, no longer with us.
oh, i dont know. what do you think?


david van brink // Tue 2015.03.3 19:26 // {dome}

Modo for Fulldome, Part 2.

This post will describe a means of creating fulldome domemaster images using Modo.

What is a Domemaster?

The interchange format for digital planetarium movies is a Domemaster (or Dome Master). Since planetaria require extremely high resolution (4k at least, some are using 8k), these are often delivered as a hard disk full of individual, numbered PNG files.

The format of each image is a disk, where the center of the image is projected to the top of the planetarium dome. Here’s a calibration image I found somewhere…

DomeCalibration1k
This is an “equal-azimuthal projection”; radius from the center corresponds directly to latitude. A nice attribute of this projection is that it looks quite natural even when it is flat. In this image, the audience would be facing South.

What Modo Provides

Modo’s camera has several projection modes, including “Spherical”. This renders a full sphere of imagery from a single camera point. It draws this into a projection known as “equirectangular”. You have probably seen a world map like this:

EquirectangularWorld

I grew up with one in the hallway. It fascinated me how Antarctica was smeared across the entire bottom edge. In this projection, latitude goes vertically from -90° South to +90° North, and longitude goes horizontally from -180° East to +180° West. To make the gridlines square, the width is generally twice the height.

I did some experiments with Modo’s spherical camera. The model is a closed sphere, with the axes labeled. Modo’s standard axes are Y-up, X-right, and Z-towards-you.

DomeModoModel

And here is Modo’s rendering, using Modo’s Spherical Projection Mode.

DomeCamera90Up

Things to notice:

  1. The center of the render is from exactly behind the camera.
  2. We only need the center square for our dome master (half the spherical scene).
  3. The image is inverted (the “y” is backwards).

To address the first two, in Modo we point the camera exactly away from our center of interest, and we use the Frame Properties’ Render Region, to skip rendering parts of the scene we won’t need. The saved files will still be twice as wide needed, though.

DomeModoModelCamDown

And here is what what gets rendered!

DomeCamera90Down

Making the Domemaster

That’s better, but still inverted, and not a dome master. I wrote a command-line tool, which reads in a JPG or PNG spherical-projection file as Modo produces, and writes out a domemaster JPG or PNG file. You use it like so, from a terminal session:

poly@omino-8999 domework: om_sphere2dome --infile=sphereImage1.jpg --outfile=dome.jpg
infile: sphereImage1.jpg (1024 x 512)
outfile: dome.jpg (512 x 512)
writing dome.jpg...
write result: ok
poly@omino-8999 domework:

Running it on the last render, we get (“ta da!”):

DomeCamera90DownDomemaster

This is a correctly formatted domemaster image. (Excepting that it’s only 512 pixels across, which will be singularly disappointing on a 75 foot dome screen. But you get the idea.)

As of today, the tool is in primitive form, and has limited image quality, and only for Mac OS X at the moment. But if you come across this and need it for Linux or Windows or have a feature request, or want the source code, please email me, poly@omino.com. It’s a living work. As it is, it’s just barely sufficient for my needs, and no more.

Also, just to reiterate, this is a command line tool; you’ll need to be comfortable with shell scripting to make full use of it. You might even need to chmod it after downloading. If that hasn’t warned you away…

Download om_sphere2Dome.

For Photoshop — Andrew Hazelden maintains this set of installable actions which can also do this transformation. For converting a whole Modo movie render, you’ll need to do a bit more scripting on top of it, and it will run fairly slowly… but it’s great to have options! His action set has many other tools as well.

oh, i dont know. what do you think?



0.0556s
(c) 2003-2013 omino.com / contact poly@omino.com