Merging and Wrapping

From Ultrafractal Wiki

Jump to: navigation, search

Hi Ruy,

I'm still puzzling much of this out, but maybe I can help.

Regarding the merge concept:

In UF4 you might make a shape in layer #1 and a different shape in layer #2. You would then combine (or merge) these two shapes by selecting a merge mode (such as multiply, screen, overlay, soft light, etc.) in the tiny box located at the top of the Fractal Properties window which lists your layers.

What we are doing now is making two or more shapes and combining (merging) them in a single layer. In order to have the ability to combine the two shapes in a single layer, in the Orbit Traps Gradient coloring (Public/dmj5.ulb/) go to the first instance of "Trap Shape." Instead of inserting the name of a shape formula such as the default Asteroid, you insert the facility that allows for merging, Trap Shape Merge (Public/common ulb).

Regarding the Wrappers: Think again about the two layers you had in UF4. For each layer you could fiddle with a variety of settings independently from the other layer. Now, in order to do this in a single layer, it is necessary to have a "holder" or wrapper for settings so that you can change for each shape independently. I haven't yet learned what all these settings are, but I'm sure that will come.

To those on the list with greater understanding, please do correct my inaccuracies. I'm sending this despite the possibility of error because, when I had trouble explaining a concept to a student, occasionally another student would successfully teach the concept by simplifying to the point of inaccuracy. The inaccuracy wouldn't matter because once the initial hurdle was overcome, the concept could be refined.

I hope this is helpful.

All the best, Diane

***

Diane, Ruy,

"In UF4 you might make a shape in layer #1 and a different shape in layer #2. You would then combine (or merge) these two shapes by selecting a merge mode (such as multiply, screen, overlay, soft light, etc.) in the tiny box located at the top of the Fractal Properties window which lists your layers. What we are doing now is making two or more shapes and combining (merging) them in a single layer.'"

This is correct, but I want to expand on it a little bit to help show the contrast, and also to point out how similar effects were done with UF4.

Let's say you have a UF4 image with two layers, and you have Orbit Traps on each layer with one trap shape. Here is the flow of data:

 location           inside
 mapping   fractal  outside                                layers

  point -> orbit -> trap distance
           orbit -> trap distance
           orbit -> trap distance
             .
             .
             .
           orbit -> trap distance
                    (final) distances -(trap/color mode)-> color
                                                             |
  point -> orbit -> trap distance                            |
           orbit -> trap distance                            |
           orbit -> trap distance                            |
             .                                               |
             .                                               |
             .                                               |
           orbit -> trap distance                            |
                    (final) distances -(trap/color mode)-> color
                                                             |
                                                           result


My apologies if the plaintext diagram doesn't look right; I don't have time to make a graphic right now. I've labeled the tabs that effect each column at the top. For each pixel in the image, we take the point for it, use the fractal formula to generate the orbit, and the coloring formula then looks at trap distances and trap modes and trap colorings to produce a final color for that layer's pixel. Then the layers are merged together using color merge modes, like you said: multiply, screen, overlay, etc.

Now, let's suppose instead of making two separate layers, you make one layer, but use two trap shapes on it. Here is the flow of data:

 location           inside
 mapping   fractal  outside                                layers

  point -> orbit -> trap1 distance
                    trap2 distance -(merge)-> distance
           orbit -> trap1 distance
                    trap2 distance -(merge)-> distance
           orbit -> trap1 distance
                    trap2 distance -(merge)-> distance
             .
             .
             .
           orbit -> trap1 distance
                    trap2 distance -(merge)-> distance
                    (final) distances -(trap/color mode)-> color


Note two things. First, for each orbit value we produce a trap distance twice (one for each trap shape), and we merge them right away; this merged distance is used in place of the single trap distance in the trap mode and trap colorings. Trap distance merge modes are different from color merge modes because trap distances are only single values (distances) and colors are triplets (red, green, and blue components).

Second, notice that because we only have one layer, we don't have to use a color merge mode at all to get the result, we get it directly.

The point here is that we are doing basically the same thing with each method, except we moved where we did the merging between the traps. In the first one we didn't merge the trap results until very late, at the color stage; in the second one we did it very early.

There is not one wrong and one right way. They are each used to produce different effects. Primarily, the first method (two separate layers) allows the use of two separate gradients, and thus the color merge can produce a range of colors resulting from any color in one gradient interacting with any color in the other gradient. Sometimes this is what you want. The second method (one layer) uses only one gradient and the output colors are guaranteed to be from that gradient. That means you can use one trap shape to modify the other without introducing new colors.

Now I'm going to talk briefly about "direct traps". We haven't talked about them much and they're not part of Ron's challenges (yet?) but they are very related to this specific discussion. With the alternative "Orbit Traps Direct" method, the flow of data looks like this:

 location           inside
 mapping   fractal  outside                                layers

  point -> orbit -> trap distance -(color mode)-> color
           orbit -> trap distance -(color mode)-> color
           orbit -> trap distance -(color mode)-> color
             .
             .
             .
           orbit -> trap distance -(color mode)-> color
                    (final) colors -(merge)--------------> color


With this model, we actually take the trap shape and convert it to a color immediately, and then use the color merge functions to combine each orbit's trap together. Again, this is not better or worse, it is just different, and can produce a huge range of color, but can also be very difficult to predict and control.

All of these methods are available in UF4. The new Orbit Traps Gradient and Orbit Traps Direct formulas provide similar capabilities, but do so using the object framework. So in the second example, where we used two trap shapes, with the UF4 formula we just selected "2" as the number of traps. With the new formulas, you put a TrapShape Merge object into the Trap Shape slot and fill the merge's slots with your new trap shapes (or, more likely, keep the TrapShape Block objects in the merge's slots and put your trap shapes in the blocks' slots). But the data flow is still the same as the second example, even though you're using the object version of the formula.

In this case, the object version *is* "better" because it has a lot more flexibility. At this stage the only really obvious advantage is being able to use ten trap shapes rather than three (the limit in the old Orbit Traps formula) but I promise we will show you more when we start to show you how other slots besides Trap Shape can be filled.

"Think again about the two layers you had in UF4. For each layer you could fiddle with a variety of settings independently from the other layer. Now, in order to do this in a single layer, it is necessary to have a "holder" or Wrapper for settings so that you can change for each shape independently. I haven't yet learned what all these settings are, but I'm sure that will come."

Again, this is correct, and it's one of the advantages of the object version of Orbit Traps: it is much better at letting you control each object independentely. And yes, we will get to more in-depth explanations of things like Transfer functions later on.

Damien Jones

Personal tools