//----------------------------//
ArtMatic 1 in 3 out components
//----------------------------//


Set Constant
Set Vector (Ax,Bx,Cx)
Add (x+A,x+B,x+C)
3D derivative dx,dy,dz
Unpack
Main gradient #
Indexed gradient
Shaded plain color #
RGB gamma
RGB half plane
RGB Neon line
Multi Perlin noise
Random color
Hue color
Color Sines
Linear motion
Circular motion
Random motion
Timeloop Interpolator
13 Compiled tree


Introduction

1->3 Components generally serve one of three functions: to convert a scalar (single value) stream to RGB color, to generate three independent values, or to unpack an RGB stream.


13 Set Constant

parameters :
A : X or Red Value (0. : 1.)
B : Y or Green Value (0. : 1.)
C : Z or Blue Value (0. : 1.)

discussion :
Create three independent constant values whose values are determined by parameters A, B, C and the chosen Algorithm. The input value is ignored. The output can be thought of as either three independent values or as a single RGB color.


algorithms :


13 Set Vector (Ax,Bx,Cx)

parameters :
A : A (-12. : 12.)
B : B (-12. : 12.)
C : C (-12. : 12.)

discussion :
Scale the input value using parameters A, B and C. Output is A*x, B*x, C*x.




13 Add (x+A,x+B,x+C)

parameters :
A : A (-50. : 50.)
B : B (-50. : 50.)
C : C (-50. : 50.)

discussion :
This component is sometimes referred to as Add Vector, the constant vector added being (A,B,C). The three outputs are x+A, x+B and x+C. Add Vector can be useful for adding offsets to the same axis to move several objects in the same axis.




13 3D Derivative dx,dy,dz

parameters :
A : Amplitude (-8. : 8.)
B : Normalize % (0. : 1.)

discussion :
Returns the partial derivatives dX, dY and dZ of the input function (which shall be a 3D function). When the algorithm is set to "VY Object/Terrain Normale" the normal is given directly from ArtMatic Voyager rendering in the shading phase and the input is ignored. This component is useful to implement custom shaders and textures for 3D DF objects and terrains. 'Amplitude' is usually kept at 1 but you can set it at -1 to reverse the normal. 'Normalize' can be used to force the normal to be of 1 magnitude.


algorithms :


13 Unpack

parameters :
No parameters.

discussion :
Unpack a 3D/RGB stream into its component streams. The stream must have been packed with the 3->1 Pack component or comes from a tile producing a packed stream directly. Most frequently, this is used with compiled trees: either inside of a compiled tree to unpack RGB values passed into the compiled tree through a single input or to unpack RGB values passed out of a compiled tree through a single output.
The corresponding inverse function is the 31
Pack(x,y,z) which packs the xyz input.




13 Main Gradient

parameters :
A : Gradient Scale X (0. : 8.)
B : Gradient Offset (-2. : 2.)

discussion :
Main Gradient maps input value to a color of the main gradient (the current gradient). When parameters A 'Scale' and B 'Offset' are 1 and 0 respectively, 0 maps to the leftmost color of the gradient and 8 maps to the rightmost color.


algorithms :


13 Indexed Gradient

parameters :
A : Scale X (0. : 8.)
B : Offset (-2. : 2.)
C : Index (0 : 48)

discussion :
This component is similar to
13 Main Gradient but uses parameter C (Index) to choose the gradient that will be taken from the built-in Gradient list.
Starting engine 8.08 Indexed Gradient has the same algotithm options than 13 Main Gradient.


algorithms :



13 Shaded plain color #

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

discussion :
This component maps input value to a shade of the color defined by parameters Red,Green,Blue. or a shade of its complementary color. The parameter D 'Contrast' scales the input prior the luminance shading of the color. With Ramp the shading uses D*|x| while with Contrast the shading uses clamp(mix(1,x,D),0,1) meaning a value of 0 for D will means no shading takes place.


algorithms :


13 RGB gamma

parameters :
A : Gamma red (0.12 : 8.)
B : Gamma green (0.12 : 8.)
C : Gamma blue (0.12 : 8.)

discussion :
Map a value to RGB with independent control of the R, G and B channels response curve. Gamma is an efficient way to “tint” monochrome image or to give linear grey shades a colored neon light look.




13 RGB half plane

parameters :
A : Amplitude (-8. : 8.)
B : Offset (-16. : 16.)
C : Color Cycle (0. : 1.)
D : Color Saturation (0. : 1.)

discussion :
This component can be seen as either a simple color shader or a mathematical primitive. When used as a color shader, it generates a ‘half-plane’ of the color defined by Parameter C. When the offset is 0, the color is generated wherever the input value times Parameter A is negative; everywhere else is black. There is a smooth transition from black to the defined color. With non-zero settings of parameter A that are close to 0, the transitional area increases in size. This transition area may only be visible when zoomed far in or with amplitude values very close to 0. When 'Amplitude' is 0, the output is the color defined by Parameter C. When A < 0, the color appears on the right. When A > 0, the color appears on the left. Advanced users can use this component to implement complex systems that behave differently for negative and positive input values.

Example 1: A Half-plane connected directly to the Global X generates a half-plane of the color defined by Color Cycle:

Example 2: When connected to a surface, the result is a virtually two-tone pattern with no intermediate shades except where the input value is very close to 0.




13 RGB Neon line

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

discussion :
This is a simple color shader that generates a vertical horizontal line if fed by the global X input or a horizontal line if fed by the global Y input. The component can also be thought of as a complex filter that outputs its maximum value (as an RGB color) where the absolute value of its input is 0 and generates increasingly smaller values as the absolute value of its input increases. When attached to the output of surface, the result is a monochrome image made up of shades of the color defined by parameters A, B and C.




13 Multi Perlin noise

parameters :
A : Amplitude (-8. : 8.)
B : Octaves (1. : 128.)
C : Frequency (0. : 32.)
D : Roughness (0.12 : 0.75)

discussion :
13 Multi Perlin Noise returns a 3D Vector of
Multi Perlin noise with different phases for each components. It can be seen as a triple 11 Multi Perlin Noise function. As with the 11 version the "Octaves" parameter controls the amount of higher frequencies additions and the 'Roughness' parameter the fractal dimension of the resulting noise. Values are balanced and can become negatives so when using it as a random color generator you will need to scale and offset the values.




13 Random color

parameters :
A : Color Variance (-2. : 2.)
B : Saturation (0. : 1.)
C : Luminance (0. : 1.)

discussion :
Color shader that performs a random mapping of the input value to an RGB color whose saturation and luminance are determined by parameters B and C. The color range is determined by parameter A. The output is smoothed so that there are smooth transitions from color to color when the input is continuous.




13 Hue color

parameters :
A : Hue Variance (0. : 8.)
B : Saturation (0. : 1.)
C : Luminance (0. : 1.)

discussion :
Color shader that maps input to a color defined by the HLS values defined by parameters A, B and C. The saturation and luminance of the output color are determined by parameters B and C. Parameter A, Hue Variance, is multiplied with the input value before the being mapped to a hue value. As a result, when Hue Variance is small, this component is not very sensitive to changes in the input value. When Hue Variance is large, the component is very sensitive to input value changes. The output is periodic.




13 Color Sines

parameters :
A : Red freq (-12.57 : 12.57)
B : Green freq (-12.57 : 12.57)
C : Blue freq (-12.57 : 12.57)

discussion :
Color shader that maps the input value to an RGB color by applying independent sine functions to the R, G and B outputs. This can be useful for creating sounds.




13 Linear motion

parameters :
A : Direction x (-1. : 1.)
B : Direction y (-1. : 1.)
C : Direction z (-1. : 1.)
D : Speed (-50. : 50.)

discussion :
"Linear motion" provides a 3D linear motion akin to the 12
Linear motion tile when input is connected to time (w) or z input in 2D systems. The direction is given by the "Direction" vector parameter that will be normalised internally. Use (0 ,-1,0) to move upward for example. The 'Speed' parameter scales the input time. When negative, motion will proceed backward. The motion is at constant speed if the input is linear. The resulting position has to be added to the target coordinates to actually move it, usually with a packed 3D vector add like Packed RGB Add or better Packed Vector Maths when the target is a 3D object.




13 Circular motion

parameters :
A : Radius (0. : 100.)
B : Angle oX (-180. : 180.)
C : Angle oZ (-180. : 180.)
D : Speed % (-50. : 50.)

discussion :
When the input is connected to time (w), the result is a circular motion in 3D. With angles oX and oZ at zero the circle is on the XZ plane. You may rotate the circle plane with the 'Angle oX' and 'Angle oZ' parameters (in degree). The 'Radius' sets the radius of the circle.The 'Speed' parameters scales the input time. When negative, motion will proceed backward.
The motion position produced by Circular motion has to be added to the target coordinates usually with a
Packed Vector Maths tile when the target is a 3D object.
The tile has the options to interpret the radius in various units.
Examples : Libraries/Components demo/Motion3DMetaballs.artm




13 Random motion

parameters :
A : Radius (0. : 100.)
B : Speed % (-50. : 50.)

discussion :
This component creates continuous random 3D motion when the input is connected to time (w). 'Radius' sets the radius of the motion and 'Speed' parameter scales the input time. When negative, motion will proceed backward. The random motion path is generated using a 1D vector valued (3D) perlin noise function.The motion position produced by Random motion has to be added to the target coordinates usually with a a
Packed Vector Maths tile when the target is a 3D object.
The tile has the options to interpret the radius in various units.
Examples : Libraries/Maths/Functions plots/RandomMotion3D.artm




13 Timeloop Interpolator

parameters :
A : Period (0.12 : 32.)

discussion :
Timeloop Interpolator is a utility that makes creation of seamless loops easy.
It outputs 2 overlapping cycling ramps in first 2 outputs with a blending function in third output (z). The blending function shall be used to fade whatever the 2 cycling ramps controls so that looping is continuous. Usually you will use a 31 interpolation tile to blend the 2 functions with z controlling the interpolation like
31 z Blend and the Timeloop tile will be connected to time. If the function to loop is RGBA use Packed z Blend and pass z to the alpha input. The looping take place over the given period so set the animation time to an integer multiple of the period to have 1 or several loop instances.
With Timeloop Interpolator you can create continuous periodic signals with anything as well as seamless motion loops.
Examples : Libraries/Animated Loops/FiberWaves Loop 16.artm Libraries/Animated Loops/Gamma Clouds PanX.artm Libraries/Maths/Periodic fractal signal.artm




13 Compiled Tree :

parameters :
A : Scale 0:1
B : Iterations

discussion :
Compiled Trees are groups of tiles that can be used in place of single tiles as a kind of macro or subroutine.
13 CT can hold any 1 input / 3 ouputs tree that can be seen generally as a 3D vector valued 1D function. In particular 13 CT will often be used to output an RGB color derived from elevation or time, or to define a 3D motion path (3D parametric curve). Select a 13 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 and is set at 1 by default (no scaling).