Opacity

This random opacity illustrator script allows users to quickly and easily generate complex transparency-based designs. With four separate opacity-manipulation modes to choose from (and Randomill’s extensive suite of other features), users can dial in the exact results they want.


Randomize Mode

Randomill can randomize opacity in Adobe Illustrator with configurable transparency settings and step sizes. Used in tandem with other Randomill functions, users can make complex transparency-based designs quickly and easily.

A uniform group of lines becomes a group where each line has a random opacity.

Easily randomize the opacity of all objects in a selection in Adobe Illustrator

Randomizing opacity is  a great way to give your patterns and background textures that extra bit of variety to make them non-repetitive. It’s also a great tool for layering shapes and objects on top of each other to create interesting overlap effects. Randomizing opacity works well when combined with the random blend mode feature.

Use a step size value to further dial in your desired result

A step-size field allows for even more granular control over the generated opacity values. The step size determines what values between the min and max values can be chosen.

For example, setting an opacity minimum of 50% and maximum of 100% with a step size value of 1% would result in Randomill applying a random opacity of 50%-100% in 1% increments to all objects in a selection.

Turning the step size up to 10% would result in Randomill only choosing 50%, 60%, 70%, 80%, 90%, or 100% values, since it can only choose values between 50%-100% that are multiples of 10%.


Shift Mode

Loop through objects and incrementally adjust their opacity to create interesting and unique designs.

A uniform group of lines gets a banded pattern of opacity by having each line shift it's opacity downards by 15%.

Shift an object’s opacity by a specific amount more than the object before it

This mode can be used to increasingly shift the opacity of an object in a set by a specified amount more than the previous object that Randomill has iterated over.

For example, let’s say you have four 100pt x 100pt squares and you shift the opacity of these squares by -10%. The result would be:

  • Square 1: Unchanged (100% opacity).
  • Square 2: Opacity decreased by 10% (90% opacity)
  • Square 3: Opacity decreased by 20% (80% opacity)
  • Square 4: Opacity decreased by 30% (70% opacity)

You can restart the loop after some specified number of steps

If you only want to change the opacity of every other square in the selection, you can set this value to 1. This will result in every other square having it’s opacity decreased by 10%. This setting will essentially cause Randomill to think the next object it reaches is the first object in the selection, resulting in just every other object in the selection having its opacity shifted.

If you want to change the opacity of every square equally, and not gradually increase the opacity offset, set this value to 0. This will act like a ‘transform each’ operation, and every square will have it’s opacity reduced by 10%. This will essentially work like the ‘Transform Each’ function that’s native to Adobe Illustrator, except in this case, you can’t modify opacity with Illustrator’s version of this function.

You can also optionally include the first object to be included in the opacity shift operation as well.


Target Mode

Approach a target opacity over a set of objects by gradually modifying opacity values so that the target value is eventually achieved. Loop over a set of objects and set their opacity values to gradually change so that the last object in the selection (in terms of layer order) will have its opacity set to the target value.

A group of vertical bands of random opacities changes into an ordlery blend of opacity gradually decreasing from left to right.

The initial opacity value will be taken from the top-most object in the selection (in terms of layer order).

Example: say you have a series of 6 squares next to each other. The top-most square in the layer stack is on the left and the bottom-most square is on the right. The first square has a 100% opacity and the rest of them have random opacities. If you select all these squares and set the target opacity to be 0%, here is what the result would be:

Square 1: Unchanged.
Square 2: 80% Opacity
Square 3: 60% Opacity
Square 4: 40% Opacity
Square 5: 20% Opacity
Square 6: 0% Opacity

You can see that as Randomill iterated through the squares, it decreased the opacity of each square in equal increments until the last square was set to the target value.


Oscillate Mode

Iterate over multiple objects in a selection and bounce their opacity values between two numbers of your choice. Set the opacity of each object in a set by wave-like oscillating opacity values to over a specified number of steps.

A uniform group of lines becomes a group of lines where the opacity of the lines gradually oscillates between 100% to 25% from left to right.

Example: say you have 10 squares lined up next to each other with the leftmost square being the top object in the layer stack. All squares are at 100% opacity. If you oscillate the opacity of this set of squares from 0% to 100% over 3 steps, you would get this result:

Square 01: 0% Opacity
Square 02: 33% Opacity
Square 03: 67% Opacity
Square 04: 100% Opacity
Square 05: 67% Opacity
Square 06: 33% Opacity
Square 07: 0% Opacity
Square 08: 33% Opacity
Square 09: 67% Opacity
Square 10: 100% Opacity

The first square’s opacity was set to the From value, and took 3 Steps to get to the To value. Another 3 steps were needed to get back to the From value.