Loonim

From PowerUI
Jump to: navigation, search

Loonim is a runtime procedural texture engine, using either the CPU or the GPU to draw graphics (GPU is the default). It's primarily used for complex image effects (e.g. the -spark-filter CSS property) as well as the underlying rendering engine for SVG.

Loonim is designed to be used directly - to generate flooring or wallpaper textures too, for example.

Nodes, graphs, surface textures, filtering and textures - what?

To avoid unnecessary confusion, let's quickly define what these actually are:

  • A 'Loonim node' is one of the many available operations that you can use whilst building up an image effect. There's over 110 of them - Add nodes, sepia nodes etc. A node accepts zero or more inputs, performs some operation, then has one output.
  • A 'Loonim graph' is the graph that forms by combining multiple Loonim nodes.
  • A 'filter' aka a 'surface texture' is a complete Loonim graph with runtime definable properties. These are represented with the SurfaceTexture class. For example, you might have a filter which adds a sepia effect to an image - it will always have an image input property (the image to apply the effect to) as well as e.g. a variable sepia intensity property.

Whilst 'filter' and 'surface texture' are typically used interchangeably, there's a slight difference - a 'filter' always has at least one image input property called 'source0' (the image to apply the effect to).

HDR

The Loonim image pipeline requires high dynamic range (HDR) support but it can attempt to work without it. Typically if your platform does not support HDR and Loonim is set to use HDR, you will often see unusual colouring (The advanced Loonim example scene seems to regularly turn red when this happens). To force Loonim to attempt to work without HDR, turn it off in your DrawInfo:

myDrawInfo.HDR=false;

Physically based rendering

Loonim surface textures can output multiple channels (such as normals, a heightmap etc) via the 'Output' node.

File format

Loonim describes a very simplistic binary file format (.lim) which can be used to save/ load/ share Loonim surface textures.