Ultra Fractal Tutorial -- Using Transparency with Transformations


This tutorial assumes that you are familiar with working with layers and using and setting transparency with the Solid Color button in the Inside and Outside tabs. If you need to review those concepts, please check the list of tutorial links at the bottom of this page.

In my mind, I divide transformations into two categories. There are those which modify your image with kaleidoscopic, symmetry, tiling, skewing, stretching (etc., etc., etc.) effects -- and leave you with a design-filled image (inside and/or outside areas of your fractal). The other category includes such transformations as Frederik Slijkerman's "3D Mapping", which maps the fractal onto a shape (such as an egg, sphere, or plane); Sylvie Gallet's "Checkerboard" transformation which alternates squares of your image with solid color squares in a checkerboard effect; and Luke Plant's "Scissors" and Damien Jones' "Clipping" transformations which help you create masks to block out parts of or shape your fractal. All of the transformations in this second category will, by default, give you black, opaque areas on your fractal, but the color and degree of opacity of those solid areas can then be changed using the Solid Color button on the Mapping tab. There are many places this will come in handy, and I'll point you toward some examples later on, but first let me talk you through a sample image.

Let's say you have a great image that you would like to frame. (Well the one I'm going to use isn't exactly great, but it'll work for our purposes.) Highlight and copy (Ctrl-C) this parameter set and paste (Ctrl-V) into UF.


GoldenHandkerchief {
; Created with Ultra Fractal.
; Copyright 1998
fractal:
  title="Golden Handkerchief" width=480 height=480
  author="Janet Parke" created="August 26, 1998" numlayers=1
layer:
  method=linear caption="Layer 1" visible=yes alpha=no
mapping:
  center=0/0 magn=1.46788990825688 angle=0
formula:
  filename="dmj.ufm" entry="dmj-Julia2-Step2" maxiter=1000 percheck=normal
  p_seed1=0.5/0 p_seed2=0/0 p_switchseeds=no p_pattern=21 p_power=2/0
  p_bailout=1E20
inside:
  transfer=none repeat=yes
outside:
  filename="dmj.ucl" entry="dmj-Triangle" transfer=sqrt repeat=yes
  p_apower=1 p_aflavor="normal" p_power=2 p_bailout=1E20
gradient:
  smooth=yes numnodes=4 index=99 color=1144742 index=208 color=0 index=273
  color=3158085 index=354 color=14736366
}

Now go to the Mapping tab and click the Add (+) button to select a transformation. Choose "Clipping" from the dmj folder. Your image is going to go black here temporarily. Don't panic. What we need to do is set a few parameters. In this case, our fractal center is 0,0 so we don't need to adjust the clipping center, and the default clipping shape is square, which is just what we need to put a square border around this fractal, so go to the Clipping Right Edge parameter and click on the eyedropper icon. Now move your mouse to position the eyedropper near the right border, at approximately the desired width of your border. Click. Putting a border around your image is as simple as that!

A few notes before we go on: This image happened to already allow room for a border. In some cases, you might need to zoom out before you add the Clipping mask in order to provide adequate space around the area you wish to frame. The Clipping transformation also currently has circle, rectangle and ellipse shapes. With the latter two, you'll need to set both the Right Edge and the Top Edge to define the shape. Also, the default setting is Clipping Region = outside, but if you wanted the center of your image blocked out instead of the outside, you would change that parameter to "inside".

You can change the width of your border simply by clicking the eyedropper again and selecting a new location. You can also enter the coordinates by hand, but you'll probably only want to do that for minute adjustments. You can change the border color by clicking the little black mandelbrot icon on the Mapping tab. You can also use another fractal image as the border by placing that layer under this one and setting the transparency of the Clipping mask to 0. Let me show you what I mean. Highlight and copy (Ctrl-C) this layer and paste it on your fractal with the Paste button on the Layer tab. (Ctrl-V won't work this time because UF is smart enough to know that you only have the parameters for a single layer on your clipboard, not those of an entire fractal!)


TextureLayer {
layer:
  caption="Texture layer" visible=yes alpha=no
mapping:
  center=-0.777170043945312512/0.126894287109375008
  magn=4655.86814435919296 angle=0
formula:
  filename="Standard.ufm" entry="FastMandel" maxiter=1000 percheck=normal
  p_Start=0/0 p_Bailout=128
inside:
  transfer=none repeat=yes
outside:
  filename="dmj.ucl" entry="dmj-Trap" transfer=cube repeat=yes
  p_trapshape="pinch" p_trapcolor="distance" p_traptype="closest"
  p_traporder=4 p_trapfreq=1 p_trapcenter=0/0 p_trapdrift=0/0
  p_traporbit=0/0 p_movetrap=no p_aspect=1 p_threshold=0.25 p_diameter=1
  p_angle=0 p_anglestep=0 p_skew=0 p_skewstep=0 p_trapstart=0
  p_trapiter=10000 p_trapskip=0 p_gauss=0 p_gaussr=0 p_gausss=0
  p_gausscenter=0/0 p_radialmode="kaleidoscope"
gradient:
  smooth=no numnodes=2 index=86 color=6311968 index=251 color=0
}

Click and drag this new texture layer so that it is below the original layer and set the Merge mode of your top layer to Normal at 100% Opacity. Remember, if you can't see the new "Texture" layer, it's because you must set the opacity of the Clipping transformation to 0! Do that now if you haven't already. Your image should now look more or less like this (depending on the width of your border):



This is a neat effect, but we can improve upon it by adding a tiny little border around the inside fractal which will help delineate the fractal inside from its textured frame. You can see examples of this effect in these two images in my Gallery VIII: Delarue and Bratu (use your browser's Back button to return here). To create this effect, we need to add another layer between the texture layer and the fractal. I'm going to talk you through this step (rather than just provide a layer you can copy and paste) because making a solid color layer is a handy skill to have.

Click on the Texture layer in the list on the Layers tab and then on the Add (+) button. This will put your new layer inbetween the other two. Name this layer something like "Thin border" and set its Merge mode to Normal at 100% Opacity. Switch to the Formula tab. In this case, we are already using the "Built-in fast Mandelbrot" formula, but if we weren't you would click the ellipse (...) button and select that formula from the Standard folder. Go to the Location tab and click the Reset Parameters (>|<) button. Shift-click the visibility icon on the new layer so that you see only this layer. Now we want to zoom in on this layer only to the middle of the Mandelbrot lake, so Shift-Click the magnifying glass on the "Thin border" layer to toggle all the other layers' magnifying glasses off. Now whatever zooming or location editing we do will only affect this layer. Zoom into the lake so that you have a solid black image (for that layer). To make things easier when adding the mask, change each of the center coordinates again on the Location tab to 0.

Now we're going to add a square mask that is slightly larger than the one on our top layer. Add the Clipping transformation to the "Thin border" layer just as you did earlier. Change the solid color of the mask to any color other than black and set the opacity of the transformation to 0. Shift-click the visibility icon on this layer again to make all layers visible, and then use the eyedropper to select the Right Edge. Choose a point just outside the right side of the inside square. You should now have a thin black border separating the inside "Golden Handkerchief" image from your outside texture layer border. You can adjust the width of the black border if necessary. (If you want this thin border to be a color other than black, you can set that with the Solid Color button on the Inside tab. Make sure your transfer function is set to "None")

There's one more neat thing I want to show you with this tutorial, but first let me make a few comments. This tutorial is not meant to be a complete guide to using the Clipping transformation. As with all transformations, you might want to experiment on a simple, single-layer image like the Default Mandelbrot to see what each parameter does -- such as how to rotate the mask.

If you use Clipping on an image whose center coordinates are not both 0, and you want your mask to be perfectly centered, you're going to have to copy and paste (using the right-click context menu commands) each of the center coordinates separately from the Location tab to the Clipping Center parameters on the Mapping tab.

If your image has more than one layer, you'll probably need a mask on each layer. If the center and magnification is the same for each layer, you can just use the Copy and Paste buttons on the Mapping tab to add the transformation to each layer. But if the layers have different locations you will have to position and size each mask separately. If you want to achieve this framed look, always put your border layer(s) on the bottom, then the inside border (if you have one), then your fractal layers, the bottom-most of which should have its merge mode set to Normal at 100% opacity.

Ok, now for one last effect. As I was thinking about writing this tutorial, I thought "Hey, there's no reason we can't do drop shadows right here in UF!" Many people post their images on white pages with drop shadows, so wouldn't it be great to just do all that in UF without having to go to another graphics program? We've already got the basic concept going -- a fractal with a narrow border and then a transparent border area outside of that. Now all we need is a drop shadow layer to use on the bottom which will show through the layers.

If you want to keep the image we just made as an example, save it now, because the next thing I want you to do is delete the bottom ("Texture") layer. Now highlight and copy (Ctrl-C) this layer text and paste it on your image (again using the Paste button on your Layers tab).


DropShadow {
layer:
  caption="Drop Shadow" visible=yes alpha=no
mapping:
  center=-0.0584953912343803845/0.0584120661022083095
  magn=1.74999999999999977 angle=0
formula:
  filename="Standard.ufm" entry="Mandelbrot" maxiter=1 percheck=normal
  p_start=0/0 p_power=2/0 p_bailout=1E20
inside:
  filename="dmj.ucl" entry="dmj-Trap" transfer=log repeat=yes
  p_trapshape="astroid" p_trapcolor="distance" p_traptype="first"
  p_traporder=100 p_trapfreq=1 p_trapcenter=0/0 p_trapdrift=0/0
  p_traporbit=0/0 p_movetrap=no p_aspect=1 p_threshold=0.1 p_diameter=1
  p_angle=0 p_anglestep=0 p_skew=0 p_skewstep=0 p_trapstart=0
  p_trapiter=10000 p_trapskip=0 p_gauss=0 p_gaussr=0 p_gausss=0
  p_gausscenter=0/0 p_radialmode="kaleidoscope"
outside:
  filename="dmj.ucl" entry="dmj-Trap" transfer=arctan repeat=yes
  p_trapshape="astroid" p_trapcolor="distance" p_traptype="closest"
  p_traporder=1000 p_trapfreq=1 p_trapcenter=0/0 p_trapdrift=0/0
  p_traporbit=0/0 p_movetrap=no p_aspect=1 p_threshold=0.25 p_diameter=1
  p_angle=0 p_anglestep=0 p_skew=0 p_skewstep=0 p_trapstart=0
  p_trapiter=10000 p_trapskip=0 p_gauss=0 p_gaussr=0 p_gausss=0
  p_gausscenter=0/0 p_radialmode="kaleidoscope"
gradient:
  smooth=yes numnodes=4 index=0 color=8882055 index=65 color=14474460
  index=293 color=16777215 index=333 color=16777215
}

Click and drag this layer so that it is the bottom-most layer on your list. Now instead of a solid color or patterned border around your fractal, we have a white background and drop shadow effect. If you need to better position the shadow, make sure that you first Shift-Click its magnifying glass icon to toggle off the other layers' movement and then Ctrl-Drag it around until you get the effect you want. You can also edit its "grayness" with the Gradient editor.

This Drop Shadow layer is sized and positioned for this sample image. If your borders are sized differently than mine, or if you use it on other images, you may need to zoom in or out (use the handy Alt-Drag feature) to adjust the size of the shadow. If you use this layer on a 4:3 landscape-shaped image, change the Aspect parameter on the Inside tab to 1.33. If you're using it for a portrait image (3:4), the Aspect should be .75. (And if you use it for any other ratio, you're on your own :-) ). Please feel free to keep a copy of this Drop Shadow layer around in your parameters folder for use at any time. (And thanks to Damien for providing it!)

These framing effects are just examples of the many possibilities for using transparency with transformations. The same effects can be accomplished with Luke's Scissors transform, but you don't currently have the option of using an eyedropper to select centers and edges. You'll probably need a calculator, too, to do the math for the coordinates, and things get ever so much more confusing when your image is rotated, but the Scissors transform does have more available shapes. Before Damien wrote the Clipping transform, I used Scissors to make these images: At Tierce, Vespers and Compline and Kundalam. The latter uses masks to split the spirals so that different coloring algorithms can be used on each side. (There are three layers of coloring for the left spiral and four for the right.)

There are many, many other uses for the Clipping and Scissors transforms. You should also take a look at Luke's Martian Landscape image, for which he originally wrote the Scissors transform, and Samuel Monnier's Space Scenes make extensive use of Scissors. And for examples of using transparency with other transformations, check out the entries in the Easter Egg Decorating Contest and Challenge #8.



Back to UF Tutorials

Copyright © 1997-2009
J       a       n       e       t             P       a       r       k       e