//----------------------------//
ArtMatic 4 in 3 out components
//----------------------------//


RGB Mix
RGB Multiply
RGB Alpha
RGB Interpolate
Maths
w Offset
w Scale
w Rotate
w Multiply
w Divide
w Scale & Offset y
w Space Distorts #
w Color Shift
w Color Fade
Memory Add
Memory Max
Memory w Alpha
Memory_wMin
Memory_wMax
Packed Depth sort
Packed RGB w Sort
Packed RGB w Sort Blend
3D Tree Structures #
Add 3D Derivative
w Infinity mask
Packed Blend *w & Blend
Packed Add & Blend *w
Packed Add & Mul +w
Packed Mul & Add *w
Packed Add & Add *w
Packed x*w alpha z
Packed (x+w) alpha z
Packed Blend & alpha w
Packed alpha z *w
Looper F(G)
Looper G(F)
Cross Looper
Compiled tree (Subtree)

//----------------------------//

Introduction

Many of these components are mixers that were designed to mix RGB-based images with gradient-based images -- such components treat the leftmost three inputs as an RGB image and the rightmost input as a gradient-based image (shaded with the active gradient). Some 43 components are essentially 33 components with the fourth input acting as a controller for the component -- these are especially useful in iterative systems since the output of the i component can be used to offset, scale or rotate the iterations. 43 components also include the Looper family of iterative components. An essential in-depth discussion of function categories is found in the Getting Deeper chapter and is recommended reading for everyone.

Input notation convention: By convention, the inputs are sometimes referred to as x,y,z and w where x is the leftmost input and w the rightmost. x,y and z do not refer to spatial coordinates except where explicitly stated.




43 RGB Mix

ArtMatic script function :RGB_Mix

parameters :
A : A level (0.0 : 2.0)
B : B level (0.0 : 2.0)

discussion :
Mix the input xyz RGB stream with a color value created by Gradient(w) (input w mapped into current gradient to generate a color) . If w is a packed RGB stream RGB mix will behave as
23 Packed RGB Add.

Parameters A and B control the relative level of the left and right images.



43 RGB Multiply

ArtMatic script function :RGB_Multiply

parameters :
A : A amount (0.0 : 1.0)
B : B offset (0.0 : 1.0)

discussion :
Mutliplies an RGB stream with a color value created by Gradient(w) (input w mapped into current gradient to generate a color) . If w is a packed RGB stream RGB mix will behave as
23 Packed Vector Math Multiply.

Parameter A controls the strength of the filtering and B is a luminance (brightness) offset that is useful since multiplication can sometimes yield dark images.



43 RGB Alpha

ArtMatic script function :RGB_Alpha

parameters :
A : Threshold (-1.0 : 1.0)
E9 options
B : Feather (0.0 : 1.0)

discussion :
Mix the RGB stream in xyz with a color value created by Gradient(w) with an alpha value (opacity) derived from w using "Threshold" and "Feather" to build the alpha channel. "Feather" will essentially scale w to control the spread of blending. At zero the transition between full transparency and full opacity will be abrupt.

If w is a packed RGB stream it will create the alpha channel using the luminance.

If w is a packed RGBA stream it will use the alpha of the input w to generate the alpha channel. Use Feather at 1 and "Threshold" at 0 to keep the w alpha channel unchanged. In that case RGB alpha is equivalent to 23 Packed RGB Alpha

This component is great for creating dramatic dissolve effects for movies and video.

Example: A simple example where a sine is shaded and alpha-mixed to a RGB color multifractal noise.



43 RGB Interpolate

ArtMatic script function :RGB_Interpolate

parameters :
A : Blend % (0.0 : 1.0)

discussion :
Similar to RGB mix this component blends between the input xyz RGB stream with a color value created by Gradient(w) (input w mapped into current gradient to generate a color). If w is a packed RGB stream RGB mix will behave as
23 Packed RGB Crossfade.



43 Maths

ArtMatic script function :Maths

parameters :
A : A (-10.0 : 10.0)
E9 options
B : B (-10.0 : 10.0) E9 options
C : C (-10.0 : 10.0) E9 options
D : Blend % (0.0 : 1.0)

discussion :
Maths coming soon

algorithms :



43 w Offset

ArtMatic script function :w_Offset

parameters :
A : Offset x (-32.0 : 32.0)
E9 options
B : Offset y (-32.0 : 32.0) E9 options
C : Offset z (-32.0 : 32.0) E9 options

discussion :
w Offset is a parametric 3D vector transform that adds the vector (Offset x * w, Offset y *w, Offset z *w) to input (x,y,z). It is a space displacement if xyz input is a space coordinate and a color shift if xyz is an RGB value. The w-input acts as an offset multiplier/displacement vector.

Tip: Use w Offset whenever you need displacement to be controlled by another component or by an iteration value.



43 w Scale

ArtMatic script function :w_Scale

parameters :
A : Amount (0.0 : 1.0)
B : Floor (-4.0 : 1.0)
E9 options
C : Roof (1.0 : 8.0)

discussion :
Scale the x, y, and z inputs with w acting as a scale multiplier. When "Amount " =0 no scaling occurs. "Floor" and "Roof" clamp the w input so that (Floor<= w<= Roof).

Roof must be higher than the Floor parameter. Use w Multiply for a straight multiply without clamping. Formula: (x,y,z) * mix(1, w,Amount);



43 w Rotate

ArtMatic script function :w_Rotate

parameters :
A : Angle xy (oZ) (-180.0 : 180.0)
E9 options
B : Angle xz (oY) (-180.0 : 180.0) E9 options
C : Angle yz (oX) (-180.0 : 180.0) E9 options

discussion :
3D Rotate the (x,y,z) inputs with the rotations given by the parameters multiplied by w . When w is 1 the rotation will be exactly the one specified by "Angle xy", "Angle xz" and "Angle yz".

Use w Rotate whenever you need the rotation to be controlled by another component or by an iteration value.



43 w Multiply

ArtMatic script function :w_Multiply

parameters :
A : Amount (0.0 : 1.0)

discussion :
This component simply multiplies the x, y, and z inputs by w (the fourth input) . This is similar to 43 w Scale but the output values are not clipped. "Amount" blends from the original values when 0 to the w multiplied values when 1.

Formula: (x,y,z) * mix(1, w,Amount);



43 w Divide

ArtMatic script function :w_Divide

parameters :
A : Amount (0.0 : 1.0)

discussion :
Divide the x,y and z inputs by w and pass out the results. "Amount" blends from the original values when 0 to the divided values when 1.

Formula: (x,y,z) * mix(1, 1/w,Amount);



43 w Scale & Offset y

ArtMatic script function :w_Scale_n_Offset_y

parameters :
A : w scale amount % (0.0 : 1.0)
B : w offset amount % (-2.0 : 2.0)
C : Offset y (-64.0 : 64.0)

discussion :
This component uses the w input to control scaling and/or a Y-offset. When used above a DF object, this allows the vertical positioning and object size to be modulated with an external controller. This can be useful for animating motions.



43 w Space Distorts #

ArtMatic script function :Space_Distorts

parameters :
Algorithm slider : (0 : 13) integer
B : Amount (-2.0 : 2.0)

discussion :
W Space Distorts provides similar 3D space distortion to
3D Distorts and Bends with the addition of a fourth input (W) which controls the amount of distortion. Use of the W input, is useful for animating motion. See 33 3D Distorts and Bends to see illustrations of the sorts of distortion that this component can create.

algorithms :



43 w Color Shift

ArtMatic script function :w_Color_Shift

parameters :
A : Hue w shift (-360.0 : 360.0) angle in degree
B : Lightness modulation % (0.0 : 1.0)
C : Saturation w shift (-1.0 : 1.0)
E9 options

discussion :
This Color manipulation component uses the fourth input (w) to shift the HLS values of the RGB image passed into the three left inputs. The parameters determine how much the HLS values are shifted by the fourth input (w). The w input is used to shift the Hue and Saturation values by an offset whereas it is used to scale the Lightness (luminance) by a percentage.

The rightmost input may be either scalar or packed input. If the 4th input is a scalar value, this component maps the value to the current gradient to create the color.



43 w Color Fade

ArtMatic script function :Alpha_Fade

parameters :
A : Feather (0.0 : 1.0)
B : Level adjust (-1.0 : 1.0)
E9 options

discussion :
This component uses the fourth input (w) to blend the first auxiliary color with the RGB channels received in the first three inputs. "Feather" is the amount of feathering/blending done at the edges of the alpha channel. "Amount" is a multiplier applied to the w input. When Amount is positive, the auxiliary color appears where the w input value is 0. When the value is negative, the auxiliary color appears where the alpha channel is greater than 0. This component is functionally identical to the 44 version Alpha Fade except that it does not pass out an alpha channel.

The rightmost input may be either scalar or packed input. If the 4th input is a scalar value, this component maps the value to the current gradient to create the color.

algorithms :



43 Memory Add

ArtMatic script function :Memory_Add

parameters :
A : Start Value (-1.0 : 1.0)
E9 options
B : Sum Gain (0.0 : 2.0)
C : Auto Gain % (0.0 : 1.0)

discussion :
This component adds the value of each iteration to the value accumulated in the previous iteration with the fourth input scaling the incoming values.



43 Memory Max

ArtMatic script function :Memory_Max

parameters :
No parameters.

discussion :
This component stores the maximum of the current iteration and the stored values with the fourth input scaling the incoming values.



43 Memory w Alpha

ArtMatic script function :Memory_wAlpha

parameters :
A : Start Color Red (0.0 : 1.0)
B : Start Color Green (0.0 : 1.0)
C : Start Color Blue (0.0 : 1.0)

discussion :
Memory Alpha mixes the current RGB values with the stored RGB values by interpreting the fourth input (w) as the transparency of the current values. A high w value makes the current value (pixel) opaque. A w value less than 0 makes the current value (pixel) completely transparent (and, hence, invisible). See the file MemAlpha Clouds for an example of this powerful component. We recommend rendering the animation to get a sense of the incredible effects you can achieve with this component. One can simulate volumetric-3D rendering with this component. The parameters are the starting RGB color values. This component is great for simulating 3D volumetric rendering.



43 Memory_wMin

ArtMatic script function :Memory_wMin

parameters :
No parameters.

discussion :
Memory_wMin coming soon



43 Memory_wMax

ArtMatic script function :Memory_wMax

parameters :
No parameters.

discussion :
Memory_wMax coming soon



43 Packed Depth sort

ArtMatic script function :Packed_Depth_sort

parameters :
A : z offset (-16.0 : 16.0)

discussion :
Mix four 3D objects into a single 3D stream. This component is just like the other Packed Depth Sort components (23, 33) and requires that each input be a packed stream. Parameter A acts as an offset in the third (z) dimension. Each input should be a 3D object whose output has been packed.



43 Packed RGB w Sort

ArtMatic script function :RGB_wSort

parameters :
No parameters.

discussion :
Packed RGB w Sort coming soon

algorithms :



43 Packed RGB w Sort Blend

ArtMatic script function :RGB_wSortblend

parameters :
A : B transparency (0.0 : 1.0)

discussion :
Packed RGB w Sort Blend coming soon

algorithms :



43 3D Tree Structures #

ArtMatic script function :Tree_Structures

parameters :
A : N rotate (2 : 20) integer
B : Angle A (5 : 160) integer
C : Angle B / Slope % (0.0 : 100.0)

discussion :
This component creates a tree-like branching of space using a variety of techniques (symmetries, rotations, translations and repetitions) that are especially useful for creating trees and plants for ArtMatic Voyager. When used inside a recursive CT (compiled tree), this component may be sensitive to the iteration level (depending on which tree algorithm is selected) which results in a more varied structure than if each level were simply a scaled down version of the parent.

To create an tree-like object, the component is used in conjunction with a component such as 3D DF shapes A (providing DF branches primitives) since by itself Tree Structures # is just a space manipulation function. It partition the space very much like other Jitter and repetition functions works. So care must be taken that the volume inside each cell does not reach the cell boundaries to insure correct rendering. This means keeping the scaling ratio between iterated levels pretty high (2.5 and above) so that sub levels are smaller enough to fit the cell space. It is a strong limitation but makes the rendering way faster than if each branches were separate especially with high recursion numbers where you can easily reach 10 000 branches. Tricks to densify a tree and add more branches that can overlap exists but they all involve more complex trees where you mix several instances of a tree with rotations and different seeds.

Most users will want to use one of our many examples as a starting point for their creations since using the component from scratch requires a solid understanding of ArtMatic structures and recursion. However, it is fairly simple to make modifications to the many example files that are provided with ArtMatic Voyager.

Inputs and outputs. The four inputs are a 3D Space (the left 3 inputs) and w which acts as a random seed for the random numbers used internally to determine the branch spacing. When the 4th output of Jitter Tile xz is connected to w, it will randomise the aspect of repeated trees by giving a unique random seed to every tree instances. You can also connect w to a constant to control the spacing globally.

The best way to get started using this component is to start from one of the plant-related examples in Voyager's examples.

Parameters:

Options controls the number of repeats along the main tree axis.

Algorithms Illustrated (3D Tree Structures): The tree algorithms are also referred to as "tree rules" since strictly speaking some of the algorithms are rule sets sensitive to the number of iterations. Example: Palm Tree - Level of recursion 2, scaling ratio 2. No repeats so branches burst at the tree top and branches top.



Example: SR Tree B1 - Tree Rule 1 (3 iterations)



Example: Random SR Tree BN - tree rule 4 rendered with leaves (3 iterations)



Example: Alternate Rotate 1 -



Example: Alternate Rotate 2 - Level of recursion 2, scaling ratio 3.2. Repeats at 5



Example: Alternate Ferns - Level of recursion 3, scaling ratio 3 Repeats at 5



Example: Rotating Branches - Tree Rule 9



Example: Rotating Branchs & SR - Level of recursion 3, scaling ratio 2.5



Recursion and 3D Tree Structures:

When used inside a recursive CT, one must set the scaling ratio for each level carefully to avoid having branches grow outside the plant's boundaries. Our example systems are already set up with the necessary scaling components and should generally be your starting point. In general, scaling values of 2 to 5 work best. Because the structures are recursive, they are quite sensitive to parameter values and can be computationally intensive.

algorithms :



43 Add 3D Derivative

ArtMatic script function :Add_Derivative

parameters :
A : Bump gain % (-1.0 : 1.0)
E9 options
B : Details % (0.0 : 1.0)

discussion :
Takes 3D derivative of the fourth input "D" ( df/dx, df/dy, df/dz) ,scales it by "Bump Gain" and adds it to the input vector. Typically used to add a bump texture to an existing normal.

The input D is meant to be a 3D scalar function. If 2D the df/dz will be zero but it will still work. The Details % parameters changes the size of the delta to compute the derivative. Less details will appear with low values.



43 w Infinity mask

ArtMatic script function :w_Infinity_mask

parameters :
No parameters.

discussion :
w Infinity mask Echoes infinity on each outputs whenever infinity is found in input 1 or 4 (alpha).



43 Packed Blend *w & Blend

ArtMatic script function :Packed_Blends

parameters :
A : Blend B (0.0 : 1.0)
B : Blend C (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
This component is equivalent to a packed mix (using addition) of inputs a and b with the result being crossfaded with the c input. The resulting output is then scaled with w acting as a scaling factor. Parameter A controls how much of stream b is added to the base image. Parameter B controls the crossfading with stream c. Parameter C determines the influence of input w.

Tip: w will usually be connected to a component that provides global illumination.

Formula: ((a + A*b) crossfaded with c ) * w



43 Packed Add & Blend *w

ArtMatic script function :Packed_Add_Blend

parameters :
A : Add B (0.0 : 1.0)
B : Blend C (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
This component is a procedural shader in which input A (the first input) is mixed with input B (the second input). The result is multiplied by the w (fourth) input and mixed with the C (third) input.

Formula (pseudo-code): blend( blend(A,B) * w , C)



43 Packed Add & Mul +w

ArtMatic script function :Packed_Add_Mul_Add

parameters :
A : Add B (0.0 : 1.0)
B : Mul C (0.0 : 1.0)
C : Add w (0.0 : 1.0)

discussion :
Add inputs a and b. Multiply the result with input c and add w to the result. Parameter A controls how much b is added to a. Parameter B controls how much c will multiply the result. Parameter C controls how much w is added at the end. w can be used to provide the shading and can create specular highlights.

Formula: ((a + A*b) * c ) + w



43 Packed Mul & Add *w

ArtMatic script function :Packed_Mul_Add

parameters :
A : Mul B (0.0 : 1.0)
B : Add C (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
Multiply inputs a and b and add input c. Multiply the result by w. Parameter A controls the influence of input b. Parameter B controls the influence of input c. Parameter C controls how much w will multiply the result. w will usually be connected to the component that provides the global illumination. This component is used in the Gated bilateral B metal ground compiled tree which acts as a custom shader to provide a realistic illumination of the "beast".

Formula: ((a * b) + c) * w



43 Packed Add & Add *w

ArtMatic script function :Packed_Add_Add

parameters :
A : Add B (0.0 : 1.0)
B : Add C (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
Add inputs a, b and c and multiply the result by w. Parameter A controls how much b is added to a. Parameter B controls how much c is added. Parameter C controls how much w will multiply the result. w will usually be connected to a component that provides the global illumination.

Formula: (a + b + c) * w




43 Packed x*w alpha z

ArtMatic script function :PackedAlphaMix_xmulw

parameters :
A : Threshold (-1.0 : 1.0)
E9 options
B : Feather (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
Mix the a and b inputs (usually RGB inputs) and treat input c as an alpha mask. w multiplies the source prior to the masking and makes shadow effects possible. Inputs c and w should both be scalar (non-packed) values.

Parameter A determines the threshold over which masking occurs. Parameter B provides feathering at the mask border and determines the definition of the mask borders. Parameter C determines how much the w input influences the result.




43 Packed (x+w) alpha z

ArtMatic script function :PackedAlphaMix_xaddw

parameters :
A : Threshold (-1.0 : 1.0)
E9 options
B : Feather (0.0 : 1.0)
C : Add w (0.0 : 1.0)

discussion :
Mix the a and b inputs (usually RGB inputs) and treat input c as an alpha mask. The w value is added to source a before masking.




43 Packed Blend & alpha w

ArtMatic script function :PackedAlphaMix

parameters :
A : Blend AB (0.0 : 1.0)
B : Threshold (0.0 : 1.0)
C : Feather (0.0 : 1.0)

discussion :
Perform a mix of inputs a and b and mix the result with input c while treating input w as an alpha mask. Inputs a, b and c should all be packed RGB values. Input w should be a scalar (single value) stream.

Parameter A controls the mix of images a and b. Parameters B and C control the mask threshold and feathering.




43 Packed alpha z *w

ArtMatic script function :PackedAlphaMix_mulw

parameters :
A : Threshold (-1.0 : 1.0)
E9 options
B : Feather (0.0 : 1.0)
C : Multiply w (0.0 : 1.0)

discussion :
Mix the a and b inputs (usually RGB inputs) and treat input c as an alpha mask. The w value is multiplied by the final output and will usually be connected to a branch that provides global illumination. Inputs c and w should both be scalar (non-packed) values.

Parameter A determines the threshold over which masking occurs. Parameter B provides feathering at the mask border and determines the definition of the mask borders. Parameter C determines how much the w input influences the result.



43 Looper F(G)

ArtMatic script function :Looper_FG

parameters :
A : Iterations (0 : 16) integer
B : Count Multiplier (0.0 : 4.0)

discussion :
Unlike the
Iterations component, the Looper components loops the vector transforms directly connected to its inputs. In the 43 Looper F(G) case the looper loops two vector transforms F & G where F(v) is the transform that feeds x & y inputs and G(v) the one that feeds z & w inputs. In mathematical terms Looper F(G) computes F(G(F(G(v))) 'Iterations' times.
Output 3 returns the iteration number multiplied by 'Count Multiplier.
As with iterative looped tree a memory component like 11 Memory Logic# or 11 Memory Add is usually needed to accumulate all iterations results, unless you are only interested in the last transform result.



43 Looper G(F)

ArtMatic script function :Looper_GF

parameters :
A : Iterations (0 : 16) integer
B : Count Multiplier (0.0 : 4.0)

discussion :
Looper G(F) is like Looper F(G) but feeds the output of F into G (rather than G into F).



43 Cross Looper

ArtMatic script function :Cross_Looper

parameters :
A : Iterations (0 : 16) integer
B : Count Multiplier (0.0 : 4.0)

discussion :
This looper iteratively crossfeeds transforms F and G and the results of the previous iteration. In iteration 0 (the first iteration), both F(G) and G(F) are performed. In iteration 1 (the second time through the loop), there are four transforms F(G), G(F), F(G(F1)), G(F(G1). Cross iterations are extremely unpredictable and can yield richly complex results. When using Cross Looper, the number of iterations grows exponentially-so watch the number of iterations. With a computationally-intensive tree, even the fastest processor can be brought to its knees.



43 Compiled tree (Subtree)

ArtMatic script function :Subtree_

parameters :
A : Scale (0.0 : 1.0)
B : Iterations (0 : 256) integer

discussion :
Compiled trees are groups of tiles that can be used in place of single tiles as a kind of macro or subroutine. 43 compiled tree can hold any 4 inputs /3 outputs tree structures. Select a 43 tile and use "New compiled tree" to create a new CT from the selection (Tree Edit menu or type 'n' key). To save a CT on disk to use the function elsewhere use “Save compiled tree” from the Tree Edit menu. You may also copy and paste the entire CT by using Copy Tile and Paste Tile from the Edit menu. You may iterate the tree by "Iterations" number when the tree contains an
Iterations tile to modify and accumulates various values. "Scale" provide an optionnal scaling of outputs.