With the Blender Compositing and Pass Render features, the need for a more advanced Imaging system in Blender was evident. Many much wanted features now are available, such as:
The new MultiLayer image is transparently integrated in the UI. It can be used for textures, for backdrops, compositing, painting or viewing. As format it uses OpenEXR, loss-less compressed float channels (no other compression or 'half' float support yet).
This image type uses the same extension (.exr) by default. Whether it is a regular RGBA file or a MultiLayer file is detected automatically (files have a custom "BlenderMultiChannel" attribute, as discussed with the OpenEXR team.) Unfortunately no other imaging programs support OpenEXR multilayer files yet... will be worked on!
Internally the file is organized in three levels:
- Layers (user defined names, max 19 characters)
- Passes (defined by enabling passes in RenderLayer panel)
- Channels (R, G, B, A, X, Y, Z, U, V, W)
When Compositing was enabled in Blender, the composite result is written in an own layer.
When loading a MultiLayer picture in a Image Node, it will add a Layer menu to its buttons, and reveil the available passes in the Layer as output sockets.
Since there are no Composite button Panels (yet), the options for the Image are compressed a bit. The top-right icon menu shows the Image type, the small "Auto" icon indicates to do "Auto Refresh" for this node on frame changes.
As for the previous Panel, all options here are local for the Node, so a single MultiLayer image sequence can be used for different Layers and/or for different frame numbers within a single composite.
Painting
Painting now supports:
- paint on Sequence Images
- paint in MultiLayer Images (but not in MultiLayer sequences!)
- paint in Packed Images (but not packed MultiLayer images)
Packed Files
- MultiLayer Images can be packed
- Procedural Images (UV test grid) can be packed (as PNG)
- Images can be re-packed, for example after painting or baking. Repacking only happens in PNG format. The 'pack' icon turns blue to denote a changed packed file, and to allow re-pack.
- New UnPack option: "Remove Pack", which will not require to save the packed file right away.
Image file saving
- When using "Save As" in the Image Window, a menu in the header allows to view and change its file format. (Note: it still uses compression quality as set in the Scene buttons).
- New option: "Save Changed Images". This will save all painted Images
Image Window
- Jkey (swap to show spare picture) now works in ImageWindow. Also for Composite editing.
- Sampling an Image with left mouse also shows correct information for float images with less than 4 channels.
Compositing
- hotkey Ekey now invokes an execute for changed Nodes.
- optimized Compositor to ignore non-image node types.
- Click on an Image node will show it in an Image Window (if it does not show a Viewer Image)
- click on RenderLayer node will set active layer for Scene buttons.
TimeLine window
- new option: playback of ImageWindow.
3D window Background Image
- the clumsy bypass to use Textures for animated backdrops now is gone. It does mean you have to create this again, when reading older files.
Notes about memory use
- using anim playback for Images allocates memory for all shown frames, so it can get to limits easily.
- on each render, all unused pictures in Image caches are removed
- todo: check on using the "Sequencer Cache Limitor".
Code refactor notes
- blenkernel/BKE_image.h has a complete new API for working with Images
- most notable change: introducing the "ImageUser" next to an Image.
- moved MipMap storage and calculation to ImBuf
- ImBuf float images now stores amount of channels; this isn't finished for all float options in ImBuf... nor for Painting.
- MultiLayer read/write was recoded. Previous "Save Buffer" temp files now are not readable anymore. With the OpenEXR we are talking about standardizing multi-layer formatted files.
- Unfortunately OpenEXR channel names have a limit of 32 characters... so in Blender a Layer name is max 19, a Pass name max 10 characters now.
- Python API might have minor issues... I've added notes in code for important changes. Hopefully someone can go over this.
- Changed event queue storage to ignore double events. Will solve memory issues when using flipbook playback or ALT+A playback.
- Bugfix: found very old memory issue with going 'full window' or back.
- Changed FileSelect usage, to allow three types of callback functions. This eliminates the need for bad globals (and solves bugs)
There are five main types of "Image" in Blender now, based on where the picture came from:
Image File
A single file with the contents of one "frame". This can be a regular PNG, but also the new MultiLayer file.
Image Sequence
Based on a naming rule (name contains 0001, 0002, ...) and the current frame, a file gets read. This can be for regular files or MultiLayer files.
Movie File
A single file, like an AVI, containing a series of pictures.
Generated Image
This picture actually doesn't exist as a file, but gets generated. Currently it supports a black picture or the "UV test grid". Such Images are always re-generated on each use, and don't need to be saved. It can also be used for the "Verse bitmap".
Viewer Image
These pictures are only a wrapper to show something else, like the output of a Viewer Node in Composite, or the result of a render. Viewer Images are excluded from browsing (or linking) in Blender, except for the UV Image Window.
Another major change is that one Image can cache multiple pictures. This allows a "Movie File" to have all frames available for the Image, for flipbook playback or for multiple textures using the same Image. Same goes for MultiLayer images, all of its layers and passes are always available for a user of that Image. The Viewer Image also can store multiple pictures for flipbook playback.
Image Panel
All options for Images now are in its own buttons Panel. These Panels are also uniform across the UI, used for Textures, for the UV Image Window or the 3D Window background Image.
The top row buttons, "Still, Movie, Sequence, Generated", this show the main Image type. Changing type is possible here too. On loading files, Blender tries to find out if it is a Still or Movie.
The next row shows the Image (data) name, and its entire path. The folder icon button allows to load a new image.
In the left-bottom corner the old options to indicate Video Field images and Antialiasing can be found.
Until now, the options were per-Image. Below the options are mentioned for 'using' an Image, which can be different for each Texture, Node or Viewer.
- In case the Image is MultiLayer, it shows menus and buttons to browse the Layers and Passes.
- In case the Image is a Sequence or a Movie, it shows the options for how to retrieve a picture. Note the new "Auto Refresh" option, which forces a redraw (or preview render. or re-composite) on frame advances.
Next to the usual Image browse option, the "Render Result" or a MultiLayer Image now shows a menu to quickly browse its contents as well. Note that you can press Nkey to see the Properties Panel in the window for all options.
New is also an icon for playback (Movie or Sequence Images). You will have to set the frame range using the Properties panel first though.
If you Paint in images, the Lock icon button will send events to the Compositor while painting.
The Properties Panel for a Composite Viewer image shows options to make a cache for playback. The "record" button will execute a full Composite, with exception of re-rendering the RenderLayer nodes.
The Playback button (but also ALT+A) will play the animation.
Note that a cache can take up some memory!