3-D Video Imaging           – by Lawrence Dunn

A great way to breathe new life into an iconic image.

 

 

 

3D imaging is a niche activity that literally gives another dimension to our flat astro photographs. Motivated by the inspiring 2-D and 3-D astro art on J-P Metsävainio’s AstroAnarchy web site, for me, 3-D imaging can use virtually any regular 2-D image. Once acquired and processed with the normal plethora of tools and methods at our disposal, a compositing program transforms the 2-D into a 3-D diorama within the computer, such that a software camera can move through the space to create an animation. It is worth a little effort to make the 3-D model as faithful as possible, to appreciate the structure of the space. After first using Adobe After Effects®, I switched to an alternative application from Blackmagic Design, called Fusion 8®. It has a unique nodal graphical interface to composit-ing which is both interesting and fun to use and very powerful. For instance, Fusion 8 allows one to deform the image planes in 3-D, which allows more engaging 3-D animations. What follows is my current workflow, which uses a mixture of PixInsight, Photoshop, Microsoft Excel and Fusion 8:

1 establish object distances in the 2-D image

2 isolate the objects into layers according to distance

3 prepare the image in Fusion 8

4 position layers along the z-axis according to distance

5 scale each layer according to distance

6 add a camera

7 create a camera path

8 render and save the animation

Establish Object Distances in 2-D Image (1)

To create the third dimension for our image requires the object distances from Earth. There are both semi-automatic and manual ways to achieve this. With the PixInsight ImageSolver and AnnotateImage scripts it is possible to automatically generate a spreadsheet of objects and correlate them to light year (ly) distances, obtained from the VisieR on-line catalog. It is also possible to identify the objects manually and create a spreadsheet of objects and distances for later reference. Here, for brevity, we use a simple example with a few image objects and assumed distances from Earth and a more sophisticated version, with automatic object calculations, is available from the website.

Isolate the Objects into Layers (2)

This task selectively pastes the objects into layers, according to their distance. This can be done in Fusion 8 or in Photoshop. Using Photoshop, start by isolating the main stars; drag a circular marquee around a star and use the Refine Edge tool to fine-tune the selection. Adjust feathering, smoothing, contrast and the Shift Edge value to eliminate the surrounding dark sky, leaving just the star. Take some time with the first star to establish values that work well and then use similar values with the other stars, fine-tuning the boundary with the Shift Edge setting.

Having isolated the star(s), Copy and be sure to use Paste Special>Paste in Place, to place it into a new layer at the same location as the star in the original image. You should now have the original image and a new layer with a star. Rename the new layer with its distance (in ly) and the star name or reference number, to identify it later (this data should be on your spreadsheet).

You now remove the star from the original image as if it was never there. To do this select the new layer containing just the star, click the Magic Wand selection tool on the blank canvas and then invert the selection. Switch to the original image and Fill this area, selecting Content-Aware, Normal blending mode and 100% opacity. Turn the star layer off and examine the area around where the star should be. If the fill action has resulted in a noticeable boundary or other artefacts, use the blur and smudge tools to blend the content-aware fill into the background (or at least to make it a little less obvious). Repeat this process for all the major stars. (For this reason, I would avoid globular clusters!). Next, it is the turn of the various nebula. The process is similar but uses the Lasso tool to roughly draw around parts of the nebula using an appropriate feather setting. At some point, the Fill action will create obvious artefacts and liberal use of smudge and blur is to be expected. Stars where distances are unknown can be put to good use later, so place them in their own layers too.

The repeated content-aware fills cause the background to become increasingly messy but it is eventually covered by the multiple layers and ends up as the extreme background. After much repetition one should have an image separated into many layers, determined by distance (fig.2) and with them all turned on, the image should still look very similar to the original 2-D image. Save this as a PSD file (without flattening).

fig144_1.jpg

fig.1To help identify stars, after running the PixInsight ImageSolver script, the AnnotateImage script usefully creates a visual map of the object references, with an option to create a text file, listing the objects and their details too.

fig144_2.jpg

fig.2 A close-up of some of the Photoshop layers. Some of the layers have been excluded for clarity.

Prepare the Image in Fusion 8 (3)

It has been mundane ground-work up to this point. The 3-D fun starts now and, to bring our multi-layered 2-D image to life, the PSD file is opened in composit-ing software. Compositing software is used in film and video production to combine multiple images and effects into a single image stream_ This example uses Black Magic Design’s Fusion 8 application, available for Mac OS, Windows and Linux platforms. Fortunately, the free download version is more than sufficient for our simple purposes.

Fusion 8 is in the same camp as PixInsight; powerful, but works in a totally different manner to any other software and has a steep learning curve. It uses a node-based graphical editing system rather than layers. Nodes can be images or tools that are linked together to perform operations and manipulations on images and 3-D objects. Multiple nodes can be joined together in complex and flexible ways. Fusion 8 has that rare factor that makes exploration fun, rather than frustrating. As ever, the Internet provides a rich training resource including online tutorial videos. We only scratch the surface of what Fusion 8 can do but it is worth covering a few basics first.

Fusion 8 Screen

The application screen has 4 main areas (fig.3); a control pane on the right, two node preview windows on the top and a node construction area underneath to create and link nodes. Each requires a little explanation:

The Node Construction Area

To add a node, right-click and select Add Tool from the submenu and the required tool or node type. A selected node is highlighted in yellow, whereas de-selected nodes have other colors, depending upon their type. When the mouse hovers over a node, a section extends at the bottom of the node that contains two dots, clicking on a dot displays the node output in one of the preview windows, or alternatively, dragging the node up to one of the preview windows displays the node in that window. Nodes also have small colored triangles and squares around their edge; anchor points used to link nodes together. To link two nodes together, hover and drag one node’s small red square to extend a line out to another node. Releasing the mouse button snaps the line onto the second node. Nodes can be joined to multiple other nodes. When the nodes occupy more space than can be accommodated in the pane, an overview map will appear in the upper right of the node construction area to aid with navigation. In this case click and drag the box on the map to move the view on the main pane. A node is renamed by hovering over it, right-clicking and selecting Rename or alternatively, by selecting it and pressing F2.

The Preview Windows

The preview windows can show different views; the view type is shown in the lower corner. A right-click shows the options: Perspective, Top, Front, Left, Right and Camera. A 3-D view is rotated by holding the Shift and right mouse button while dragging. Similarly, to shift the preview, hold Shift-Control and the left mouse button while dragging. The + and - keys perform zoom functions.

The Node Control Pane

The information in this control pane changes dynamically depending upon the selected node. There are usually multiple pages; the main ones being: Controls, Materials and a 3-axis icon (referred to as “3D page” from now on). There are five sections to the 3D page: Translation, Rotation, Pivot, Scale and Target, these are the main ways in which we can directly manipulate an ImagePlane.

The Time-Line

Running along the very bottom of the Fusion window is a time-line. It defaults to 1000 frames starting at 0. The number of frames that an animation runs over can be adjusted by changing the number in the time-line boxes. This area also controls forward, backward, play and render controls.

Getting Started

The layers in the PSD file are important and to keep them intact, import the PSD file via the top menu (File>Import>PSD). The individual layers from the Pho-toshop file are shown as separate nodes (as green boxes).

Hover over any node and click on either of the dots to show the contents of the layer in one of the preview panes. The green nodes (the Photoshop layers) are connected with a short line to grey rectangles (named Normals) to the right of each green node. In turn, these grey nodes are connected to the grey node below each of them. Hover over a grey node and click on one of the preview dots to see the from these in the window.

By going down the list of grey nodes and previewing some of the lower ones, you will see that the Normal previews are additive and contain the contents of their connected green node, plus all the nodes above them. In effect, the green nodes correspond to viewing one layer only at a time in Photoshop, and the grey nodes are like turning on multiple layers progressively from top to bottom. Here, the layers are manipulated independently and one can ignore the grey Normal nodes. You can select the Normal nodes with the mouse and delete them if you want.

Position Layers along the Z-Axis (4)

To translate a 2-D image into 3-D requires it to be joined to a ImagePlane3D node. These nodes uniquely can be moved in a 3-D space so that in our case, its distance along the z-axis is set, according to its distance from Earth. To create a ImagePlane3D node, right-click in the node construction area and select Add Tool>3D>Image Plane 3D from the pop-up. A new ImagePlane3D node appears in yellow. Now attach a green 2D layer image node to the ImagePlane3D node by dragging its small red square to the newly created node. The red square turns white and a white line should join the 2D image node (corresponding to a Photoshop layer) to the ImagePlane3D node. (To break a link, click on the white line.)

fig144_3.jpg

fig.3 An overview of the Fusion 8 screen. At the top are two preview windows, in which our 2D, 3D Image Plane, Camera or Render nodes are displayed. Beneath those is the node construction pane, where the layers and links are organized. Down the right hand side is the control pane, which allows node parameters to be edited.

It is a good idea to rename the ImagePlane3D node for later reference. It is useful to name the object and include its distance in light years too. (As in PixInsight, names cannot contain spaces, but an underscore is allowed to break up multiple words.) This process is then repeated, linking each green 2D image node to its own ImagePlane3D node (fig.4). (It helps to use copy / paste or the keyboard shortcuts to speed things along.)

The ImagePlane3D nodes have to be joined before you can view them collectively. This employs another new node; right-click in the pane and select Add Tool>3D>Merge 3D. Now join all the ImagePlane3D nodes to the Merge3D node (dragging the small red square as before). Do this for all the ImagePlane3D nodes and then view the Merge3D node in one of the preview screens.

By default, all our newly created ImagePlane3D nodes are at located at x,y,z location 0,0,0 and require shifting in the z-axis to give the appearance of depth. To do this, select one of the ImagePlane3D nodes. The node controls appear in the right window pane. Click the 3D page icon and enter the number of light years (as a negative number) in the small box to the right of the Z Offset slider. This moves this image plane in 3-D space (in this case closer or further away to the viewer). Repeat this operation for all the ImagePlane3D nodes (this is where one appreciates having the ly value in the node name).

fig144_4.jpg

fig.4 This shows a part of the node pane, showing the linkages between the PSD layers, ImagePlane3D, Merge3D, Camera 3D and Render3D nodes. The final node in the chain is the node that saves the output in the designated format.

Scale Each Layer (5)

As an object is moved further away from a viewer, it is perceived as getting smaller. A 2-D photo, however captures the size of objects from different distances from a static vantage point. Separating out the objects into different image planes and moving those image planes in 3-D space loses their relative size from a fixed viewpoint.

To maintain the relative size of the objects in the 2-D photo, the ImagePlane3D nodes are scaled up, relative to their distance from the viewer. It is possible to manually scale each image plane empirically but there is a way to do this automatically (and yet still be able to manually fine-tune, in case one later decided to angle or rotate an image plane and need to compensate the scale slightly).

This requires a user control added to each Image-Plane3D node. To do this, click on the a node, right-click and select Edit Controls. In the dialog box click in the name box and change it (say “Plane Scale”). Click on the ID box and the ID name will change to the name you have just typed, less any spaces. Leave the Type on Number, change Page to 3D, Input Ctrl to SliderControl, Range to 0–2, Default to 1 and click OK to confirm. Conceptually, this is like adding a user-defined variable in computer program. This creates the new adjustment tool in the node control pane on the right (if it is needed later to scale the image independently of the auto scaling).

Selecting the 3D page icon in the node control window, should show the newly-created Plane Scale control. All of the tools on this page can be adjusted via the sliders, or by typing numbers directly into them. There is another, less obvious option, for entering in the result of a formula, which we now make use of, to auto-scale each image.

Click in the box for the Scale number (leave Lock XYZ checked). Type = and return. Drag the plus-sign to the left of the new box that appears up to the Z Offset field. This adds the z-axis translation into the formula field. Type *-1 to make it negative, * and the name of the node. The formula should read something like this:

Transform3-DOp.Translate.Z*-1*DeepSpace.PlaneScale

This formula automatically controls the Image-Plane3D node’s scale, based upon the value you enter in the Translation Z Offset field. As the image plane moves away into the distance, it will get larger, to maintain its size from the camera’s starting point of z=0. Yes, you guessed it, you now repeat this for all the other ImagePlane3D nodes.

If you do not have the distance data for all the stars, this is where a few layers of random stars, with a little creativity, fills in areas where there are large gaps in your z-axis. When all the ImagePlane3D nodes are viewed directly head on, the overall image should resemble the original 2-D photo. If it does not, then something has gone terribly wrong!

Add a Camera (6)

The 3-D scene is now ready to fly through. To do this, add a Camera3D node (Add Tool>3D>Camera 3D) and join this to the Merge3D node. With the Camera3D node selected, its controls should be shown in the control pane. The type of camera and lens can be adjusted, as can its position and direction via the 3D page. By default the camera is at x=y=z=0, which is the position set for an observer on Earth.

Create a Camera Path (7)

Up to this point, there has been no regard for the 4th dimension, time. The time-line at the bottom of the window shows 0 to 1000 frames. With a video typically running at 25 frames per second (fps), 1000 frames creates 40 seconds of animation. To alter the video duration, change 1000 to a new value. A quick fly-through works well with 10–15 seconds or less, suggesting 250–400 frames as a good starting point.

Fusion 8 animation works using key frames. If you define the start and end points of your animation with them, the software will move the camera evenly between the two over the total time. Adding more key frames between the start and end points facilitates further control of the camera’s movement path.

Key frames are added to the Camera3D node’s 3D page for Translation, Rotation and Pivot groups. Adding key frames in Fusion is not particularly obvious: In the 3D page, right-click over the Translation heading and select Animate Translate Group (or Rotation/Pivot groups depending on needs). The Translate group changes green, indicating that it can be animated. Still hovering over the Translate heading, right-click again and select Set Key on Translate Group. This adds a key frame to the camera translate group at the current frame point indicated on the time-line. Now drag this indicator in the time-line to a new position, say to the end point of the animation. Now move the camera via the Translation group controls (XYZ) to a new camera position. Try starting with a z-axis value equivalent to the nearest object in your layers/ ImagePlane3D nodes and make the figure negative, i.e. if the first layer/Image plane node is 300 ly. Move your camera −300 in Z which will move your camera into your scene. Now, right-click the Translation title again to add the key frame. Clicking the triangular play button under the time-line, moves the camera slowly between the start and end key frames, as it renders each frame.

fig144_5.jpg

fig.5 This perspective view shows the camera path between key frames, at which point the camera orientation changes.

To make the animation more interesting, as the camera moves through space, bank slightly with a change in direction (like a plane dipping its wing as it slowly stars to turn). Moving in X and Y and/or rotating the camera makes for a more engaging animation. It is worth spending some time experimenting with the path’s key frame controls and adding key frames in-between the endpoints.

With the Perspective view in one of the previews, you may be able to see and modify the camera’s animation path. Initially, the animation path is a straight line between each key frame but, by hovering over the joint between two lines in the animation path, the joint turns white. A right-click produces a popup menu and at the bottom is a submenu item for the 3D camera path. Within this, select smooth and one of the options. This changes the two angled straight lines of the animation into a flowing curved line joining the key frames (fig.5). Space animations look better with smoothed animation paths.

Render the Save the Animation (8)

To render the animation, one introduces another new node type (Add Tool>3D>3D Renderer) and connects the output of the Merge3D node to the input of the Render3D node (fig.4). (One can create multiple render nodes to create different resolution outputs.)

To save your rendered animation to a file, requires an input/output (I/O) node (Add Tool>I/O>Saver). The Save dialog window will open for the path and file name, file type and a suitable video format, like a Quicktime file. The Saver node’s controls allow changes to these settings later on, if required. Connect the output from the Render3D node to the input of the Saver node. (As with Render3D nodes, one can set up multiple Saver nodes to save with different settings.) In the Saver node control page, you can also add a link to an audio file to accompany the video. Finally, clicking on the green render button at the bottom of the screen opens up the Render Settings window where the rendering is started. With this, you should now have the makings of an animation from your 2-D astro image.

Enhancements

Depending on the subject, it is worth experimenting by reducing the opacity settings for those ImagePlane3D nodes that contain nebulosity. This allows the animation to partially look through the nebulosity; increased translucency reduces the feeling of flying through a solid object.

In addition, visually, some nebula may not be perpendicular to our view from Earth, i.e. one side of the nebula appears closer. To create this look, the image plane is angled. There is a small snag, however, when the camera views a plane at an angle it becomes relatively smaller. To recover the size, the ImagePlane3D node is increased in scale slightly. This is where the earlier-created user Plane Scale tool comes in handy. The ImagePlane3D nodes are initially scaled proportionally by their distance from the zero datum point. The newly-added manual Plane Scale tool allows one to increase the scale, taking care of any slight angling of the plane.

Angling image planes (rather than having them all parallel) to each other helps improve the look and feel of the video by making the animation more organic and less structured. It is worth experimenting with angles in the 1–10° range. (An angle of more than 10° may create undesirable effects.)

There are some other node types that distort an image plane that can work well with a nebula. For example, the Displace node and/or Bump Map node using a grey scale image or Fast Noise Texture to deform it from a flat plane into 3-dimensions, may give a better impression of a gas cloud. The possibilities are endless.

Once the animation is nearly done, it is time to consider special effects (in moderation of course). These include the Hot Spot node, to create a lens flare effect for bright light sources and the Highlight node, to create start spikes, as they sweep by in the animation.

Obviously the printed page has limitations and for this first light assignment, the Photoshop image, Fusion 8 file and example video are available from the book’s support website, along with the technical details of creating automatic object and distance look-up tables.

Lunar Surface 3-D.

Since nebulae are popular 2-D targets, this chapter focuses on 3-D modeling a 2-D astro image with prominent nebulosity. With a little adaptation some of these techniques can be applied to galaxies too. Some of my earlier attempts of 3-D animations of galaxies used the luminance data as a grey scale displacement map, but it was only partially successful on account of the bright stars (though they could be removed). Grey scale displacement mapping, however, works well for lunar surface 3-D fly-overs and is a lot simpler than the previous nebula approach. Using the methods described earlier, the first step is to take your 2-D lunar image and create an ImagePlane3D node. It then requires a grey scale image to deform this flat plane to match the features in the 2-D lunar surface photo. Using the 2-D photo luminance as the displacement map, however, falls down due to side-lighting on the craters, causing some very odd-shaped surfaces (I know, I tried!). There is a much better approach that uses real, grey-scale elevation maps of the moon as the displacement map. These maps are available on line from the USGS Astrogeology website (the website is being redesigned and it is best to do an Internet search for the latest link).

After locating the moon elevation map, zoom in on the area of the elevation map that corresponds to your image, increase the resolution of the elevation map and copy-save the part of the map that you need.

The next step is to align the elevation data with your lunar photo. In Photoshop, open this and then grey scale elevation image, as a layer above the lunar photo. Set the top layer opacity to 50% (it may also help to temporarily colorize the layers red and blue to help with the aligning process). Using Photoshop’s Free Transformation tools, size, rotate, skew and generally deform the elevation grey scale image until all the craters, mountain ranges and features are nicely aligned with those on the lunar photo. Crop the elevation image to the same size as the lunar photo and save the grey scale elevation image.

In Fusion 8, add a new node (Add Tool>I/O>Loader) and select your lunar image and then repeat for the elevation image. Now, create a ImagePlane3D node (Add Tool>3D>Image Plane 3D) and link the 2-D moon photo to this node. Add a Displace3D node, attach the 2-D image of the moon photo to the scene input (the triangle on the end) and connect the grey scale elevation image to the displacement input (the triangle in the middle) of the Displace3D node. This deforms the image plane in the third dimension relative to the grey scale elevation data (craters, mountains and valleys will look very realistic). The remaining steps follow a familiar route; the output of the Displace3D node is linked to a Merge3D node, as is a Camera3D node. The Merge3D node is linked to a Render3D node. Set up the camera key frames as before (tilted angles work well) and render the animation as per the nebula process and you should have a wonderful fly-by, or orbit, across your lunar surface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset