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


Introduction
Alpha scale & offset
XYZW Offset
XYZ Scale
3D Rotate
Smooth floor
S-Space Scale
S-Space Transforms #
S-Sphere Invert+offset
S-Perspective distort
S-Polar space
RGB * alpha
Alpha Fade
Alpha Shade
Alpha gradient
Color Shift
Contrast & offset
Color Controls #
(xziy) City Textures #
VY Themes Filters #
Line shader
Memory Add
Memory Fractal Add
Memory Weighted Add
Memory w Logic #
Memory w Maths #
Memory w Alpha
Packed index (w) Mixer
44 Compiled tree


Introduction

44 components are generally used to process RGB+Alpha or 3D space + Alpha information (Remember Alpha can hold (channel/elevation/DF field). They can be quite similar to 33 or 34 components. The output is generally of the same type as input. In this chapter, the left three inputs and outputs may be called either x y z or RGB. The fourth input and output may be called either alpha or w. In general we use X and Y capital case to refer to vector values and x y lower case to refer to scalar coordinates.
Some 44 components can be useful for modifying the RGB with the alpha channel value to implement various shaders like Alpha Fade or Alpha gradient. In many cases, the fourth input is passed through to the fourth output without change.
A bunch of 44 components serves as transforming a 3D space while maintaining a space scaling information in w as in the S-Space cases.

An essential in-depth discussion of ArtMatic structures Trees and components is found in ArtMatic Designer References and in Building trees.


44 Alpha scale & offset

parameters :
A : Scale xyz (0. : 4.)
B : Scale w (alpha) (-4. : 4.)
C : Offset w (alpha) (-4. : 4.)

discussion :
Scale inputs (x,y,z) using parameter A, and independently scale and offset the fourth input(w/alpha) using B and C. Infinity passes through unchanged.
'Scale xyz' multiplies the (x,y,z) inputs which is often a color. Value above 1 will brighten the color before passing it out.
'Scale w' multiplies to the (w/alpha) while 'Offset w' is added to the (w/alpha). Options (ArtMatic engine 8.06): 'Pass infinity' and 'Discard infinity'. Discarding infinities might be necessary to avoid discontinuities in iterative fractal shaders or to discard the implicit infinity masking. When 'Discard infinity' is set incoming infinities in RGB are shaded with the
Depth cue color.



44 XYZW Offset

parameters :
A : Offset x (-32. : 32.)
B : Offset y (-32. : 32.)
C : Offset z (-32. : 32.)
D : Offset w (-32. : 32.)

discussion :
Add independent offsets to the (x,y,z,w) inputs. It functions identically to 33 3D Offset. The fourth input should generally be kept unmodified.



44 XYZ Scale

parameters :
A : Scale X (-4. : 4.)
B : Scale Y (-4. : 4.)
C : Scale Z (-4. : 4.)

discussion :
Scale the (x,y,z) inputs using the vector (A,B,C) . The fourth input is passed out unchanged. This is functionally identical to the 3D Scale component. Infinity passes through unchanged.



44 3D Rotate

parameters :
A : Angle xy (oZ) (-180. : 180.)
B : Angle xz (oY) (-180. : 180.)
C : Angle yz (oX) (-180. : 180.)

discussion :
This is simply a 3D Rotate (like 33 3D Rotate) with a fourth input that is passed through without influencing anything. This behavior is convenient when working with the various S-Space components.

algorithms :


44 Smooth floor

parameters :
A : Floor level (-16. : 4.)
B : Roof level (0. : 100.)
C : Smoothness % (0. : 4.)

discussion :
Apply a Smooth clamping function to the alpha channel (fourth input) and pass through the other channels unchanged.'Roof level' has to be higher than 'Floor level'. See also the
11 Smooth Clamps component. The output is clipped to a valid color range (i.e. no negative values are passed out). Infinities in RGB are shaded with the Depth cue color in any cases.
Options 'Pass infinity' and 'Discard infinity'. When 'Discard infinity' is set infinity in alpha are mapped to -1. Discarding infinities might be necessary to avoid discontinuities in iterative fractal shaders or to discard the implicit infinity masking.



44 S-Space Scale

parameters :
A : Scale (-50. : 50.)

discussion :
Scale the space uniformly and send out an adjusted scale value in output 4. This component takes a 3D space (xyz) plus a scale value as its inputs (such as the values generated by the
34 S-Space Scale component. The output is the scaled space (from the xyz outputs) and the fourth input (S) multiplied by the 'Scale' parameter value. In other words it outputs the vector (Scale*x,Scale*y,Scale*z,Scale*S).
The scale 'S' value is important for DFRM trees that distorts space to make sure that the system converges correctly ( Divide the Distance field value by the S-Space scale 4th output).
Learn more about DF modeling in Building 3D Objects : DFRM guide.



44 S-Space Transforms #

parameters :
A : Scale (-4. : 4.)
B : Offset x (-32. : 32.)
C : Offset y (-32. : 32.)
D : Offset z (-32. : 32.)

discussion :
This component implements many interesting non-linear space transforms that would normally be challenging for DFRM (Distance Field Ray-Marching). Many of these are mind-bending transforms especially useful for creating 3D fractals. Most of the algorithms result in non-uniform space scaling and require use of the S (fourth) output to adjust the scaling of DF fields to avoid convergence problems.



Example: A fractal obtained with "Rotation Sym xz & Spherical fold"



algorithms :


44 S-Sphere Invert+offset

parameters :
A : Radius (1. : 16.)
B : Offset x (-32. : 32.)
C : Offset y (-32. : 32.)
D : Offset z (-32. : 32.)

discussion :
This component reflects the space around a sphere. The scaling is non-linear; so, make sure to use the s-output (the fourth) to divide the DF amplitude at the end of the tree to avoid convergence problems. S-Sphere Invert+offset is typically used in conjunction with the
S-Space Scale component.

Example: The component's s-output needs to be used to scale the DF object field. In this example, the compiled tree creates a color DF object (RGBA). The input is a 3D space in the xyz inputs and a scale value in the fourth input. The output is a 3D space plus a scale value :




44 S-Perspective distort

parameters :
A : Amount (0. : 1.)

discussion :
This component creates a perspective distortion of the space and is useful for deforming DF objects. As with S-Sphere inversion, you should use the s-output to scale the DFRM object's amplitude (as shown in the S-Sphere Inversion explanation) in order to make sure the convergence is accurate in ArtMatic Voyager.
The input is a 3D space in the xyz inputs and a scale value in the fourth input. The output is a 3D space plus a scale value.
S-Perspective distort is typically used in conjunction with the
S-Space Scale component.

Learn more about DF modeling in Building 3D Objects : DFRM guide.




44 S-Polar space

parameters :
A : Radial Scale (1. : 100.)
B : Dist Scale (0.12 : 1.)
C : Dist Offset (-16. : 64.)
D : Radial Offset (-32. : 32.)

discussion :
Polar space transform with a scale factor to compensate for dist estimate distortion. This replaces the one that was in 33 spaces. It has the following options to use oY or oZ as the center axis and to use or not a symmetric mapping. S-Polar space is typically used in conjunction with the
S-Space Scale component.



44 RGB * alpha

parameters :
A : Alpha contrast (0. : 25.)
B : Highlights level (0. : 2.)
C : Alpha level (-4. : 4.)

discussion :
Multiply the R, G and B channels with the w/alpha channel. The w/alpha input is passed out unchanged through the fourth input. This is often very useful for helping visualize the alpha channel. 'Alpha Contrast' controls the contrast of the alpha channel before it is multiplied with RGB. 'Highlights Level' provides highlights where the alpha channel amplitude is large. This parameter controls the brightness of the highlights. These are added on top of the RGB.
"Alpha Level" is a scaling factor applied to the alpha before the alpha is multiplied with the RGB.

Options:

Example: Orbit trap fractals RGB alpha shaded.

algorithms :

Note : the 44 Memory Weighted Add component perform a similar operation for accumulated iterative RGBA data.

44 Alpha Fade

parameters :
A : Feather (0. : 1.)
B : Algorithm dependent

discussion :
44 Alpha Fade uses the alpha channel (w) to blend the first auxiliary color (
Depth cue color) with the RGB channels. 'Feather' parameter controls the rate of the blending : use low value for a sharper transition. When alpha/w is a distance the Exponential algorithm will yield nicer results.
You may use this component to implement a customized depth cuing or to fade a texture into a constant color. The incoming alpha/w is returned unchanged. When alpha is unneeded you have the 43 w Color Fade which provides the same service.

Options (ArtMatic engine 8.06): 'Pass infinity' and 'Discard infinity'. Discarding infinities might be necessary to avoid discontinuities in iterative fractal shaders or to discard the implicit infinity masking. When 'Discard infinity' is set incoming infinities in RGB are shaded with the Depth cue color.

algorithms :



44 Alpha Shade

parameters :
A : Amount (0. : 1.)
B : Alpha contrast (0. : 4.)

discussion :
Alpha Shade shades the w input alpha channel with a gray scale ramp and mixes it with the incoming RGB according to the 'Amount' parameter.

The Alpha Contrast parameter is applied to w before the shading is applied. The alpha channel is also passed out unchanged through the fourth output.




44 Alpha gradient

parameters :
A : Amount % (0. : 1.)
B : Scale X (0. : 2.)
C : Offset (-2. : 2.)

discussion :
Alpha gradient shades the w input alpha channel with the main Gradient and blend it with the RGB channels. It is similar with the
43 RGB mix but with an alpha output. The alpha channel is also passed out unchanged through the fourth output. 'Amount' controls the mix of the RGB and Alpha/Gradient channel. 'Scale X' and 'Offset' controls the mapping of w to the Gradient : Gradient( Scale* w + Offset). See also 13 Main Gradient if you need more control over how the mapping is performed.




44 Color Shift

parameters :
A : Hue shift (-6. : 6.)
B : Lightness % (-2. : 2.)
C : Saturation % (0. : 2.)
D : W hue shift % (0. : 1.)

discussion :
Adjust the HLS (Hue, Luminance/Lightness and Saturation) of the RGB image passed into the component. This component is very convenient for adjusting the HLS of an RGB image without having to convert color spaces and can be used with straight RGB images (no alpha) by leaving the fourth input unconnected. Sophisticated color processing effects can be created by adjusting HLS. The output is clipped to a valid color range (i.e. no negative values are passed out). The
Depth cue color is used where the output value is infinity.
The Alpha channel is left unchanged except infinities are discarded and mapped to a alpha transparent value. If you need infinities to be passed on use the 43 w Color Shift or the 33 Color Shift versions.




44 Contrast & offset

parameters :
A : Color contrast % (0. : 2.)
B : Scale w/alpha (-4. : 8.)
C : Offset w/alpha (-4. : 4.)

discussion :
Adjust the color contrast of the XYZ inputs (which are treated as RGB), and scale and offset the fourth input. Parameter A adjusts the color contrast of the RGB channels. B and C scale and offset the fourth input (w/alpha) and have no influence on the RGB input/output. Contrast & offset always discard infinities in w and maps infinities in RGB to the
Depth cue color.




44 Color Controls #

parameters :
Algorithm dependent

discussion :
44 Color Controls # provides the same services as the
33 Color Controls # and passes the alpha channel unchanged.

algorithms :


44 (xziy) City Textures #

parameters :
Algorithm slider : (0 : 7)
B : Color Cycle (0. : 1.)
C : Frequency (0. : 8.)

discussion :
This component is an RGB + Alpha component for creating ArtMatic Voyager terrain-based cityscapes. It provides the color texture for building exteriors and an alpha output that can be used for special effects (like embossing) in ArtMatic Voyager. This component generally provides the color shading for buildings created with the
24 City Maps # (xziy) component and has a special interpretation of the input values.

The inputs are (from left to right):

Output values: The left three outputs are RGB values used as the color texture. The rightmost output (the alpha value) is meant to be used as an extra output in ArtMatic Voyager. It is a 'bump' value that can be used as an 'extra output' value in ArtMatic Voyager (see the image below) rather than an elevation map. The tree below shows a typical use of this component.

The available patterns are:

algorithms :


44 VY Themes Filters #

parameters :
Algorithm slider : (0 : 9)
B : Level (0. : 1.)
C : Frequency (0. : 8.)

discussion :
This is an RGB+Alpha component used to enhance the visual complexity and realism of terrains for ArtMatic Voyager landscapes and includes vegetation such as grass bushes and trees. The input will be RGB+Alpha and the output is RGB+Alpha.

"Algorithm slider" selects the texture/theme implemented by the component. The "Level" parameter generally shifts the texture vertically but can also modulate the amount or contrast of particular features.

Examples can be found in ..Voyager folder/Voyager Scenes/Theme Filters Scenes.


An ArtMatic Terrain passed trough both Erosion & White Rocks & Beach themes filters.

algorithms :


44 Line shader

parameters :
A : Contrast % (0. : 100.)
B : Width (0. : 5.)
C : Background Color Ramp (-1. : 1.)
D : Contours Color Ramp (-1. : 1.)

discussion :
Takes an RGBA input and assuming Alpha is a balanced DF field Line Shader creates and shades contour line at the Alpha values zero crossings while using a background flat color for negative A values. So practically it is a "contour" shader and will transform any DF functions or any balanced surfaces into a 2D graphic drawings.

The 44 Line shader is similar to 11 line and 21 line and can accommodate high resolution outputs. (See 21 Line discussion). Negative A input values are shaded with the background color taken procedurally from the "Background color ramp" parameter. The color of the Lines (default black) are taken procedurally from the "Contours Color Ramp" parameter. When negative it returns a ramp from white to black (0). When positive it cycles the hues from dark to bright.

44 Line Shader provides an easy way to get a 2D graphic view of a 3D object slice. Here for example is a rendering of almost the same system in 3D and in 2D the only difference being the 2D version uses the 44 line shader at the output of the tree:

Examples:


ManyOverlay DF 3D view in Voyager (Voyager Examples/DF modeling/Geometry/Grafic ManyOverlay DF.vy)


ManyOverlay DF LineShaded




44 Memory Add

parameters :
A : Sum Gain (0. : 1.)
B : Auto Gain % (0. : 1.)

discussion :
Each iteration inputs is accumulated by adding the (x,y,z) and w to the 4D vector output sum. The alpha (w) is added only when positive. In most of the case you will use it to accumulate RGBA data to compose image layers produced iteratively but it can also be used to accumulate any 4D data as the process don't assume inputs represents RGBA data in particular.
When 'Auto Gain' is set at 1 the weight will be calculated using the context iteration max to keep the sum independent of the iteration number. Lower values will blend with the 'Sum Gain' setting. "Memory Add" discards infinities.




44 Memory Fractal Add

parameters :
A : Power slope (0.06 : 2.)
B : Sum gain (0. : 2.)

discussion :
Memory Fractal Add accumulates the color by first shading the RGB with the alpha value (zero and negatives turns black) and adding the shaded color with a weight that depends on 'power slope' parameter. At 1 the sum has an equal weight for all iterations. 'power slope' below zero will fade higher iterations while values above zero will fade out the starting iterations. In many fractal systems when iterations scales the frequencies upward the amplitude is scaled inversely. So to maintain this relationship between frequency and amplitude (1/f noises means amplitude is related to inverse frequency) you will typically set the power slope to 0.5 if the frequency is scaled by 2. The 'Sum gain' parameter scales the overall result.
"Memory Fractal Add" discards infinities.

See also the 1D version
11 Memory Fractal Add .




44 Memory Weighted Add

parameters :
A : Alpha Contrast (0. : 2.)
B : Alpha Offset (-2. : 2.)

discussion :
Use the alpha channel to adjust the pixel brightness before an iteration is added to the accumulated image. Unlike with Memory Fractal Add the weight is constant and depends on incoming alpha value (4th input ) scaled by 'Alpha Contrast' and offseted by 'Alpha Offset'. In other words the color are shaded with the alpha value before being accumulated.
See also
44 RGB * alpha for alpha brightness shading.
"Memory Weighted Add" discards infinities.



44 Memory w Logic #

parameters :
A : Level (-1. : 1.)
B : Smoothness % (0. : 16.)
C : Blend with last % (0. : 1.)
D : Smooth power (0.75 : 2.50)

discussion :
Memory w Logic is used to accumulate RGBA streams using logic operations in the context of iterated systems. It has great application for recursive graphics, fractals and multi-layer texturing. Memory w Logic can be used as well for color images with alpha than color-textured DF fields (with the field value being in the alpha channel).
This component can be used with the iteration component when the tile is in feedback mode to accumulate all iterations with a memory component. When creating 3D fractals, it is often useful to mix the various iterations levels together instead of rendering just the the limit set which can be just a very fine dust.

Options (ArtMatic engine 8.06): 'Pass infinity' and 'Discard infinity'. Discarding infinities might be necessary to avoid discontinuities in iterative fractal shaders or to discard the implicit infinity masking. When 'Discard infinity' is set incoming infinities in RGB are shaded with the
Depth cue color and alpha is set to transparent.

Notes: Xor, Overlay and Underlay expects the w alpha value to be balanced (negatives and positives).

algorithms :


44 Memory w Maths #

parameters :
A : RGB Blend or Smoothness (0. : 1.)
B : RGB Gain % (0. : 1.)
C : Algorithm dependent (0. : 1.)

discussion :
Memory w Maths accumulates RGBA streams using various mathematical functions. Infinity are preserved and incoming infinities in RGB are shaded with the
Depth cue color and alpha is set to transparent.
See also the scalar implementation 11 Memory Maths #

algorithms :


44 Memory w Alpha

parameters :
A : Alpha Level (-1. : 1.)
B : Feather (0. : 2.)
C : Start Color (0. : 1.)

discussion :
Memory w Alpha accumulates RGBA streams in iterated systems using alpha channel compositing (alpha value sets the blending amount of incoming RGB with background, zero and below being transparent, 1 being opaque). The 'Start color' sets the starting background color from a procedural color ramp and is visible when the output alpha is ignored in final shader like in RGB Multi
Shading mode. Infinities are discarded : incoming infinities are set to 'Start color' with transparent alpha. The output alpha is computed as the maximum of incoming alphas.
Keep 'feather' at 1 to have a strict alpha blending (alpha values are not scaled).
'Alpha Level' offsets the alpha values for each iterations.
Memory w Alpha has great application for recursive graphics, fractals and multi-layer texturing. For more control on the order of iterative layers compositing you can use the 44 Memory w logic # component with Overlay or Underlay modes as described above.




44 Packed index (w) Mixer

parameters :
A : Feather % (0. : 1.)
B : Red % (0. : 1.)
C : Green % (0. : 1.)
D : Blue % (0. : 1.)

discussion :
This is a very powerful component that mixes 3 RGBA (or Color/DFRM) inputs using the fourth input to control the mix. This component is generally used with an index value (like the one created by the 24 xyza components or 34 UVID Sweep Volumes) as the fourth input. You may also generate this index with the special logical function
32 Indexed Logic tools # component.
This allows composite objects to be created with different color textures for different parts of the object. Additionally, auxiliary colors can be mapped to some values depending on the parameter option settings.

The output is determined by the index (fourth input) value. Input A is used where the index value is between 0 and 1. Input B is used where the the index is between 1 and 2. Input C is used where the input is between 2 and 3.


44 Packed Index Mixer is used to provide different color textures for different tiles.

Depending on various Parameter Options indexes that are outside the range can be mapped in different ways :




44 Compiled Tree :

parameters :
A : Blend (0:1)
B : Recursions

discussion :
Compiled Trees are groups of tiles that can be used in place of single tiles as a kind of macro or subroutine. 44 Compiled Tree with 4 inputs and 4 outputs can process a lot of data at once, in particular if the 4th input is a packed RGBA vector. You can then see the 44 CT as a way to process space + color + alpha data which makes 7 variables, 3 for space and 4 for the RGBA stream. 44 Compiled Trees are often used to create recursive 3D fractal-like objects. For fractal-like objects, the input to the CT will be a 3D space in inputs xyz and the fourth input (w) will be a density field (DF). When using a RGBA stream in the 4Th in/out you can also accumulate an associated RGB fractal texture inside the CT.

usage :
Select a 44 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.
44 compiled trees can be made recursive with the option “allow Feedback" ON. That means outputs of the CT will feed inputs after the first iteration. In that case the result will be a recursively transformed 4D space or a transformed 3D space with a packed RGBA stream on output 4. When the option is turned off you will need a memory component at the end inside the CT to accumulate the results. (see
Memory w Logic # discussion).
The fourth input can also be a packed RGBA stream. In that case the first 3 input can just carry the space coordinates that are transformed recursively while the 4th accumulates the RGBA data. This setup allows to create complex colored 3D objects like trees, complex plants or 3D fractals.
Even without recursion, the advantage of using 3D Space + packed RGBA input/output is that you can mix the output with other similar CTs to build up complex plant structures. For example, a first 44 CT might create the first level of branches while a second will add a different secondary branching structure and a third would add the leaves. Each CT will both transform the space for the next and add something in the fourth channel.