Painting with Satori

Extract from PC Plus magazine February 1998

Canvas & RIR files mentioned here are not supplied on the Satori web site.  All references to screen shots refer to the printed tutorial.   Some, but not all, screen shots will be included here

Part 1 – Introduction to photo enhancement
Part 2 – Layers and masks
Part 3 – Advanced Tools
Part 4 – Putting it together

 

One of the ways in which Satori differs from simple bitmap editors is its use of layers. If you think of a bitmap file as a single plane, a Satori canvas file can be a stack of planes. The extra layers contain any objects it’s possible to lead or create – other bitmap files, the effect of the painting tools and so on. Portions of a layer can be made transparent, allowing whatever’s underneath to show through.

If you put a bitmap of Stan Laurel on one layer, and a bitmap of Oliver Hardy on another, provided the background of the upper layer had been made transparent, Satori would display a composite image of the pair. What you saw on the screen could then be output as a conventional bitmap.

That isn’t the only way the layering feature can be put to good use. For example, all parts of a layer could be left equally opaque, but the opaqueness turned down to give a degree of transparency. The top layer would then be a ghostly overlay on the layer underneath. Layers and the associated feature of masks have a lot of potential. They also benefit from a degree of skill and understanding, which we’ll be concentrating on this month.

BETTER BY PLANE

First, let’s become familiar with Satori’s controls for handling layers. Create a new file with File, New. This is just for fiddling around with, so make a small canvas – say 640x480. This isn’t a ready-made item in the list, but you can type in the values of the left.

Leave the background setting on Transparent. Otherwise Satori will place a rectangle object on the first layer, to give it a solid-colour background. This will obscure anything on background layers. A transparent background leaves the spaces between objects clear. Then click OK and Satori will create a blank picture canvas that follows your specifications.

PREPARING THE CANVAS

Imagine that all the layers are drawn on clear film. Where the stack of films doesn’t contain an object, you can see through to the table underneath. This is the default-chequered background. It isn’t part of the picture and will not appear in any bitmap that you generate from the CVS file.

I find the square tacky and distracting. If you feel the same way, you can make the canvas show as a solid colour by pressing the Canvas button. Use Colour and Apply the Current. If you dislike black, bring up the Colours window (press the Colour button), pick a new colour, click in the black square next to Use Colour, and then Apply to Current.

At present there is just one layer. We’ll put a few objects on it with the painting tools. Try this: press Geometry button, and then the polygon tool – it has a pentagon on it. On the right of the screen is a tabbed setup dialog. Click on setup and set the number of sides to six. Click on Star Shaped and believe it or not, this tool will now draw six-pointed stars.

Click the Colour button (not the Colour tab) and then on a colour other than black. This is the colour you will be painting with. Make sure the Filled and Colour buttons are depressed on the left of the tool area, and drag out a couple of stars. Before moving on, we’ll take a minute to look at some of the editing options available to us by changing the stars’ fill colour. Click on Edit Shape, and the most recently drawn star will be selected. Click on the Colour tab in the polygon tool setup dialog.

The shading style is currently set to flat – it’s a solid fill of the colour selected in the Colour window. Try picking a new colour, then click on Finish Edit. The star will be updated with the new fill. Click Edit Shape again and change the shading style from flat to box corner. The star’s fill will now match the graduated shading shown in the box with paint pots at its corners.

Edit the graduated fill by picking a new colour in the Colour Window, then clicking on one of the graduated square’s paint pots. That corner will switch to the chosen colour, changing the gradient fill. Click Finish Edit to permanently apply the fill. Now move on to the next star by pressing Edit Shape and then Next button. Try changing the number of sides on the Setup tab. Now drag the handles at the external and internal corners - the shape is infinitely flexible. On the Mapping tab click Use Mapping. This enables you to use a picture file as a fill. Click Browse and choose any bitmap you’ve got handy. Click Window, and watch the file fill the star. Click Finish Edit. That’s the end of our digression.

Bring up the layer toolbox by pressing the Layer button, you can see that the current layer is named Layer 1. Change this name to ‘Two Stars’ by editing the text and then clicking Set. Giving layers meaningful names helps you keep track of where you are when editing complex canvas files.

Now create an additional layer with the New Layer button, and call it Stripes. At this point the Stripes layer is active and anything you do now will act on this rather than the Stars layer. Bring up the layer list window by pressing the button of that name, just right of centre at the top of the toolbox. Here you can see that the two layers have their own entries. More on this in a moment.

Back in the picture, use the rectangle tool in the Geometry section to draw a couple of stripes obscuring the stars. I rotated mine – select a stripe for editing, right-click on it and choose Rotate. The mouse pointer turns into a circular arrow. If you grab a handle at the corner of the selected rectangle with the point of the arrow, you can swivel it round. Click on Finish Edit to update the picture (alternatively, right-click and choose Finish).

STRIPE SHOW

Now, we have the Stripes layer sitting on top of Stars. Swap them round by pulling Stripes down below Stars in the layer list. Sometimes this action is not recognised by Satori – you need to be careful exactly where you drop the layer entry.

Bring Stripes to the front again, and make sure it is selected in the layer list. Now go to the Layers section. Stripes should be named as the active layer. Try winding down the opacity to 50 per cent and pressing Set. See how the layer becomes partly transparent? Now fiddle with the colour correction tools. Notice how they are only applied to the active layer, leaving the stars intact?

Now go to the transformations tab over on the right. Select Rotate, use the mouse to rotate the layer, then right-click and choose Apply Settings. Click Rotate once more, to turn off rotation mode. You might also like to tinker with Shear and Scale. But, as always, they only work on the current layer.

A small exercise for you; use the layer tools to modify this picture so that one stripe overlays the stars, while the other falls behind them. It involves making an extra layer at the back and putting one stripe there.

There’s one more thing worth playing with before pressing on. Go back to the Stars layer and press Edit Shape. If the smaller star isn’t selected, press Next or Prev to move the selection to the next or previous object list. An alternative is to click on the required object list and press select For Edit. Drag the smaller star on top of the larger. The filled button is depressed, indicating that the star changes into a hole cut through objects underneath it in the same layer, revealing the layer underneath. The same thing can be done with the tools in the Paint section – give them a go.

It’s all very much like a vector drawing program, except that Satori is short of facilities for grouping and alignment and the editing process is clumsy. Still, the effects are editable, and open up possibilities unavailable in traditional bitmap editors.

MAKING MASKS

Separating a picture into layers has advantages, but only if parts of more than one layer can be seen. Our current idea of layers is that they are like a stack of overhead transparencies. The objects painted on the one in front obscure what’s underneath. Underlying layers show through transparent backgrounds, shapes used as cut-outs, objects or entire layers made semi-transparent and through the use of the masks.

A mask is an area of a layer which can be made completely or partly transparent. The idea is simple, and sometimes it’s easy to implement, too, if the mask can be constructed easily. That’s most likely to be the case when the masked area is a simple shape or differs greatly in colour from other parts of the picture. Satori has tools to build a mask from parts of an image which have particular colours. If those colours do not appear in the area to remain unmasked, the jobs quick and easy. If only small parts of the unmasked area share colours with the masked portion, the masking can be fine-tuned. If there’s a lot of overlap, you’ve got problems.

One example of the easy kind of masking can be found in the image file BATH.RIR. Load it into Satori and you’ll see what I mean. Imagine you wanted to cut out the sky, leaving the building intact, so that you could use an irregularly shaped picture on a DTP or Web page. We’re going to create a mask over the sky, to make that part of the picture invisible.

Click the Masking button to display the tools used for making a mask. On the left are the main controls. Make Mask is the button to press when you’ve told Satori how you want it to distinguish masked areas from unmasked ones. Pressing Chroma causes each pixel to be examined and made masked or unmasked depending on its colour. Luma builds masks according to the brightness.

Since there isn’t actually a big difference in brightness between the building and sky, Luma isn’t a good way to build a mask for our purpose – the white-painted areas and sunlit stone aren’t readily distinguishable from sky tones, when judged on light intensity. However, there is very little blue in the area of the picture we’d like to keep, so press the Chroma button to have Satori mask on the basis of colour.

Now we have to tell it which colours to include in the mask. Click the Include tab, over to the right. Here you can build a palette by clicking on parts of the sky. Every time you hit a colour not already included, Satori will add it to the palette of hues to be included in the mask. Be sure to click places near the skyline. A quick way to build a selection of tones is to drag a box over a portion of sky. Satori will scan all the colours it contains.

Now you can click on Make Mask, to see how good a mask the current settings give. When asked if you want to add a mask layer, answer Yes. You should see most of the sky disappear, to reveal the canvas underneath. If you haven’t changed the canvas settings, it will be visible as a chequered pattern.

MASKING PARAMETERS EXPLAINED

When you ask Satori to build a mask based on colour or brightness, there are ways to fine-tune its decision making on whether or not pixels are masked. For instance, if you pick just one colour for inclusion. Satori will include colours near to it in hue. Similarly, with luminance, Satori includes a range of brightness in the mask. In both cases the spread of values can be adjusted, to optimise the action of the automatic masking. The options look complicated, but they aren’t really. It’s easier to see them demonstrated on the screen than it is to explain them in print, so look on the SuperCD and you’ll find a ScreenCam, explaining the options.

Although the mask should look right, it’s difficult to tell if there are any small areas that haven’t been masked correctly. The easiest way to find this out is to click on he Mask tab and then on the Visible Mask button. This highlights any masked areas in red. I couldn’t see more than a few pixels of unmasked sky, but there were quite a few red speckles in the buildings. Some of the stone is sufficiently blue-grey for Satori to see it as a sky tone, and there are reflections in the windows of the building, of course.

There are two ways to correct this. Firstly, you can adjust the parameters of the masking operation, in the hope that Satori can be made to make a better differentiation between part of a picture. This is often hard to do in anything less that the ideal circumstances of masked and unmasked area being very different. You can read more about it in the box Masking parameter explained.

BRUSHING IT UP

The best answer here is to manually paint out unwanted bits of mask. Press the Paint button, select one of the smaller solid brushes, and click on UnMask. You’re now equipped to erase the red speckles that indicate unwanted mask. But no matter how diligently you touch up the picture, you’re almost certain to miss bits. There’s a way to make the mask much more visible. Click on Geometry. Here you’ll find tools for drawing lines and polygons. One of the options is to draw a polygon that punches a hole through the layer rather than applying paint to it. Simply press the Cut Button to turn that option on. Make sure Filled is depressed too, and also the Colour button.

Now click on the rectangle drawing tool – it’s the second one down on the far left. Drag a rectangle over the entire picture. Everything under it will vanish to reveal the canvas, but the mask is still visible, and is now easy to see and tidy up if you pick up an unmasking paintbrush.

After the tidy-up operation we can simply go to the object list, click the Crop Rectangle, and then on Delete. This removes the hole-cutting polygon, revealing the bitmap once again, this time without a single pixel of unwanted mask. If necessary, you can zoom in on the mask boundary and tidy up minor irregularities. Be careful, though. If you pan the zoomed view, when you return to mask painting you will discover that Satori has somehow reverted to ordinary painting mode even though the UnMask button is still pushed in. So, before resuming the touch-up, you must click the button again to correct the problem.

EASIER THAN IT LOOKS

The combination of layers and masks is the easy route to some difficult-looking effects. Take the picture on the previous page, for example, with the word ‘Hello’ apparently emerging from behind the rooftops, but sitting in front of the sky. It’s a short and easy step from the previous masking exercise. First, I created a second layer to out the text on it. By ordering the layers so that the imported bitmap was in front, the unmasked portion of that layer – the buildings – obscures some of the text, while the rest is revealed through the masked-out area. The sky is on a third layer, behind the text. Follow me through this with your own copy of Satori, so that you can get a better feel for what’s happening.

With the masked BATH.CVS file you made earlier loaded in, click the Layer List button. This brings up a window showing the layers in your picture – at present only one. Press the Layers button and then New Layer. You can accept the default name, or do as I did and name it ‘Text’ for the sake of clarity when moving between layers during editing. The new layers will appear in the list. Make sure it is selected as the active layer by clicking on it.

Now apply the text. Go to the Geometry section, click the ‘T’ icon button, and make sure Filled and Colour buttons are depressed. On the far right select the Setup tab. Here you can set the font (96pt Arial Black) and the text. Move the mouse pointer into the picture window and it will change to ‘Text’. Click once on the picture, and an outline of the text will appear. Place it on the picture by clicking once. If you aren’t happy with the position, click once more and move it before placing it again.

The text is not painted until you right-click and choose Render Text. Before that, select its colour. Press the Colour button (the main one, not the Colour tab) and pick a hue. Now render the text. Alternatively, if you want fancy patterned text like mine, before rendering go to the Mapping tab. Click Use Mapping and pick a previously prepared bitmap. Whatever you choose will be used as a fill for the text shapes. Next, put the sky back. That’s simply done by copying the original bitmap to a third layer which acts as a background to the other two. Go to Layer and in the Layer List window choose the bitmap layer. Press Copy Layer on the lower left of the screen. Nothing seems to happen, other than a new entry appearing in the layer list. That’s because the mask has been copied with the bitmap, meaning that the sky is hidden in the new layer too. Fix that by clicking on ‘Copy of Layer 1’ to select it, and then on the Masking button.

You can either delete the mask entirely, or invert it – flip the mask so that masked areas become unmasked, and vice versa. Either method will reveal the sky in this layer, and because the buildings will be hidden by the ones in Layer 1, it doesn’t matter whether or not they would be visible. Mask inversion is not the preferred option, however, because it makes the file more complex and slower to work on. If you need mask inversion at any time, just click on Invert on the Mask tab. To clear the mask, you need to go to the object list, select the Chroma Mask entry for this layer, and hit the Delete button.

This masking exercise has been easy, because of the big difference between sky and foreground. Things aren’t always so simple, though. The walkthrough in The Midas touch shows how I masked a Michelangelo when the automatic masking tools weren’t up to the job.

Orson Welles wrote: "In Italy for thirty years under the Borgias they had warfare, terror, murder, bloodshed – they produced Michalangelo, Leonardo da Vinci and the renaissance. In Switzerland they had brotherly love, five hundred years of democracy and peace and what did that produce...? The cuckoo clock." I’ll be chiming with more Satori next month.

THE MIDAS TOUCH

Why settle for the finest Italian marble when you can have gold? Here’s how I applied the Midas touch to Michelangelo’s David. The technique outlined is not the only way to achieve this effect, but it’s an effective demonstration of how masks and layers can be used to alter part of a picture.

 1 The starting point. First set in my quest for gold was to mask out the background on this layer. An unmasked, plain-colour copy of the bitmap on another layer could then serve as a background.

2 Statue and background share too many tones and light intensities for automatic masking to separate one from the other. No amount of twiddling of the mask parameters gave a good result.

3 Instead, I handcrafted a mask using a solid paintbrush in Mask mode. David covers a smaller area than the background and it’s easier to hand-paint from inside a curve, so I painted the statue.

4 The solid paintbrush was set to Mask mode and its profile made sharper, as outlined last month. Different sizes were used from time to time. Unmask mode enabled me to correct over-painting.

5 Afterwards, the mask was inverted, to leave the statue visible and make the background totally transparent. Then I made a copy of the bitmap to a new layer and removed its mask.

6 Colour correction has been applied to the top layer to give a golden appearance. The background layer has been given a slight blue tint to improve the contrast, but us otherwise untouched.