diff --git a/img/manual/media/aux_color_parameters.png b/img/manual/media/aux_color_parameters.png index 1347fcc..89357a4 100644 Binary files a/img/manual/media/aux_color_parameters.png and b/img/manual/media/aux_color_parameters.png differ diff --git a/mandelbulber2/manual/chapters/materials.tex b/mandelbulber2/manual/chapters/materials.tex index ce0da8f..9e5b8f1 100644 --- a/mandelbulber2/manual/chapters/materials.tex +++ b/mandelbulber2/manual/chapters/materials.tex @@ -4,7 +4,7 @@ \subsection{Defining and assigning materials}\label{defining-materials}\index{ma A material defines the appearance of the surface and volume of an object and can be used to give an object an interesting or even a realistic look. A material which can be used in Mandelbulber can be just plain colors, colors generated by fractal properties, or colors from external files with textures. A material can also define physical properties of an object like transparency, reflectance, roughness or luminosity. -In the program materials can be defined as distinct entities which can be assigned to multiple objects. In the easiest scenario only one material could be used for all objects. +In the program, materials can be defined as distinct entities which can be assigned to multiple objects. In the easiest scenario, only one material could be used for all objects. All defined materials are visible in the \emph{Materials} dock (figure \ref{materials_dock}). From this window the user can manage the materials. @@ -21,15 +21,15 @@ \subsection{Defining and assigning materials}\label{defining-materials}\index{ma \item[New material] -- add new definition of a material \item[Delete material] -- delete selected material \item[Edit material] -- open separate window with \emph{Material editor} - \item[Load material] -- open file selector for loading an already defined material + \item[Load material] -- open file selector for loading an already-defined material \item[Save material as] -- open file selector for saving a material into a file \end{description} -A material can be assigned to different types of objects: main fractal, boolean fractals or primitives. One material can me assigned to many objects. For every object there needs to be one assigned material. +A material can be assigned to different types of objects: main fractal, boolean fractals or primitives. One material can be assigned to many objects. For every object, there needs to be one assigned material. \pagebreak \subsubsection{Assigning material to main fractal}\label{assigning-material-to-main-fractal} -To assign a material to the main fractal object go to \emph{Objects} dock and \emph{Global parameters} tab (figure \ref{materials_assign_to_main_fractal}). Clicking on the material icon will bring up the \emph{Material manager} window where the material can be selected. This selected material will be associated with the main fractal object. Further changes of the material properties in \emph{Material editor} will directly affect all objects with this assigned material. +To assign a material to the main fractal object, go to \emph{Objects} dock and \emph{Global parameters} tab (figure \ref{materials_assign_to_main_fractal}). Clicking on the material icon will bring up the \emph{Material manager} window where the material can be selected. This selected material will be associated with the main fractal object. Further changes of the material properties in \emph{Material editor} will directly affect all objects with this assigned material. \nopagebreak \simpleImageWithCaptionThirdWidth{img/manual/media/material_assign_to_main_fractal.png} {Material icon in Global parameters} @@ -59,7 +59,7 @@ \subsection{Editing parameters of materials}\label{materials-parameters}\index{m \subsection{Gradients}\label{materials-gradients} -Gradients can be applied to fractal objects. If a material with gradients is assigned to a primitive object, then the gradient will be ignored and the plain color is used instead (parameter \emph{Surface color}) -- see figure \ref{materials_gradient_on_primitive} +Gradients can be applied to fractal objects. If a material with gradients is assigned to a primitive object, then the gradient will be ignored and the plain color is used instead (parameter \emph{Surface color}) -- see figure \ref{materials_gradient_on_primitive}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradients_on_primitives.png} {Gradient applied to fractal and primitive objects} @@ -67,7 +67,7 @@ \subsection{Gradients}\label{materials-gradients} \subsubsection{Gradient editor}\label{materials-gradient-editor} -For every parameter which uses a gradient there is the same type of gradient editor. A gradient can have up to 100 intermediate colors. The first and the last color are always the same, because the gradient is repeated in a loop. +For every parameter which uses a gradient, there is the same type of gradient editor. A gradient can have up to 100 intermediate colors. The first and the last color are always the same, because the gradient is repeated in a loop. \simpleImageWithCaptionHalfWidth{img/manual/media/material_gradient_editor.png} {Gradient editor} @@ -76,27 +76,27 @@ \subsubsection{Gradient editor}\label{materials-gradient-editor} The gradient editor has the following buttons (figure \ref{materials_gradient_edtor}):\index{materials!gradient editor} \nopagebreak \begin{description} - \item[Defined colors (1)] -- colors used in the gradient. A double click on the color opens a window where the color can be changed. The color box can be moved along the gradient (only the first and last color cannot be moved) - \item[Randomize colors (2)] -- randomizes all colors in the gradient - \item[Randomize all (3)] -- randomizes the number of colors, their positions and the colors - \item[Increase brightness (4)] -- increases brightness of all colors - \item[Decrease brightness (5)] -- decreases brightness of all colors - \item[Invert (6)] -- inverts all colors - \item[Increase saturation (7)] -- increases saturation of all colors - \item[Decrease saturation (8)] -- decreases saturation of all colors + \item[Defined colors (1)] -- colors used in the gradient. A double click on the color opens a window where the color can be changed. The color box can be moved along the gradient (only the first and last color cannot be moved.) + \item[Randomize colors (2)] -- randomizes all colors in the gradient. + \item[Randomize all (3)] -- randomizes the number of colors, their positions and the colors. + \item[Increase brightness (4)] -- increases brightness of all colors. + \item[Decrease brightness (5)] -- decreases brightness of all colors. + \item[Invert (6)] -- inverts all colors. + \item[Increase saturation (7)] -- increases saturation of all colors. + \item[Decrease saturation (8)] -- decreases saturation of all colors. \end{description} Right click on the gradient opens the context menu which has the following options: \nopagebreak \begin{description} - \item[Add] -- Adds new color box in the position of mouse pointer - \item[Remove] -- Removes color box in the position of mouse pointer + \item[Add] -- adds new color box in the position of mouse pointer. + \item[Remove] -- removes color box in the position of mouse pointer. \item[Delete all] -- deletes all colors from the gradient. Only the first and last color are kept. - \item[Change number of colors] -- changes number of colors with recalculation of color boxes - \item[Grab colors from image] -- opens file selector to choose an image from which colors will be extracted - \item[Load colors from file] -- opens file selector to choose a text file with an already defined gradient + \item[Change number of colors] -- changes number of colors with recalculation of color boxes. + \item[Grab colors from image] -- opens file selector to choose an image from which colors will be extracted. + \item[Load colors from file] -- opens file selector to choose a text file with an already-defined gradient. \item[Save colors to file] -- opens file selector where gradient will be saved as a text file. - \item[Copy] -- copies gradient to clipboard. This can be used to copy all colors from one gradient to another one (e.g. to use the same colors for transparency as used for surface color) + \item[Copy] -- copies gradient to clipboard. This can be used to copy all colors from one gradient to another one, (e.g. to use the same colors for transparency as used for surface color.) \item[Paste] -- pastes gradient from clipboard. \end{description} @@ -106,7 +106,7 @@ \subsubsection{Gradient common options}\label{materials-gradient-common-options} All of the channels have the following common settings: \begin{description} - \item[Palette offset] -- shift colors along the color palette (figures \ref{material-palette-offset-0}, \ref{material-palette-offset-02}, \ref{material-palette-offset-05}) + \item[Palette offset] -- shift colors along the color palette (figures \ref{material-palette-offset-0}, \ref{material-palette-offset-02}, \ref{material-palette-offset-05}.) \threeImagesWithTwoCaptionsFullWidth {img/manual/media/material_palette_offset_0.png} @@ -119,7 +119,7 @@ \subsubsection{Gradient common options}\label{materials-gradient-common-options} {palette offset = 0.5} {material-palette-offset-05} - \item[Color speed] -- frequency of color changing (figures \ref{material-color_speed_025}, \ref{material-color_speed_1}, \ref{material-color_speed_4}) + \item[Color speed] -- frequency of color changing (figures \ref{material-color_speed_025}, \ref{material-color_speed_1}, \ref{material-color_speed_4}.) \threeImagesWithTwoCaptionsFullWidth {img/manual/media/material_color_speed_025.png} @@ -135,7 +135,7 @@ \subsubsection{Gradient common options}\label{materials-gradient-common-options} \subsubsection{Coloring orbit trap algorithms}\label{materials-coloring-0rbi-trap-algorithms} -Option \emph{Coloring algorithm} allows the selection of the orbit trap algorithm which will be used to distribute colors. These algorithms use particular properties of the fractal calculation (results of orbit trap algorithms)\index{orbit trap} +Option \emph{Coloring algorithm} allows the selection of the orbit trap algorithm which will be used to distribute colors. These algorithms use particular properties of the fractal calculation (results of orbit trap algorithms.)\index{orbit trap} \begin{description} \item[Standard] -- color index is calculated as the length of z vector @@ -181,7 +181,7 @@ \subsubsection{Coloring orbit trap algorithms}\label{materials-coloring-0rbi-tra \textbf{4D orbit trap color.} Enables 4D orbit trap algorithms. Result varies depending on the 4D fractal chosen and which orbit trap algorithm is used. -\textbf{Pre-V2.15 orbit trap color}. Enables backwards compatibility. In version 2.15 changes were made to make orbit trap calculations the same for both OpenCL and Non-OpenCL. +\textbf{Pre-V2.15 orbit trap color}. Enables backwards compatibility. In version 2.15, changes were made to make orbit trap calculations the same for both OpenCL and Non-OpenCL. \subsubsection{Gradient for surface color}\label{materials-surface_color-gradient} @@ -193,22 +193,22 @@ \subsubsection{Gradient for surface color}\label{materials-surface_color-gradien \subsubsection{Gradient for specular highlights}\label{materials-specular-gradient} -Gradient for \emph{specular highlights} defines the colors of the specular effect. More details about this effect are in chapter \ref{materials-specular} +Gradient for \emph{specular highlights} defines the colors of the specular effect. More details about this effect are in chapter \ref{materials-specular}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_specular.png} {Gradient for specular effect colors} {material-color-gradient-specular}{H} -\subsubsection{Gradient for diffuse}\label{materials-diffuse-gradient} +\subsubsection{Gradient for diffuse}\label{materials-diffuse-gradient}. -Gradient for \emph{diffuse} defines the intensity of the diffuse channel. A brighter gradient causes stronger light diffusion which means wider specular highlights and less visible reflections. More details about specular highlights are in chapter \ref{materials-specular} +Gradient for \emph{diffuse} defines the intensity of the diffuse channel. A brighter gradient causes stronger light diffusion, which means wider specular highlights and less visible reflections. More details about specular highlights are in chapter \ref{materials-specular} \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_diffuse.png} {Gradient for diffusion channel} {material-color-gradient-diffuse}{H} \subsubsection{Gradient for luminosity}\label{materials-luminosity-gradient} -Gradient for \emph{luminosity} defines the intensity of the luminosity channel. This property is enabled when the \emph{luminosity} parameter has a value greater than zero. More details about luminosity are in chapter \ref{materials-luminosity} +Gradient for \emph{luminosity} defines the intensity of the luminosity channel. This property is enabled when the \emph{luminosity} parameter has a value greater than zero. More details about luminosity are in chapter \ref{materials-luminosity}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_luminosity.png} {Gradient for luminosity channel with enabled Monte Carlo Global Illumination and luminosity = 10} @@ -216,7 +216,7 @@ \subsubsection{Gradient for luminosity}\label{materials-luminosity-gradient} \subsubsection{Gradient for roughness}\label{materials-roughness-gradient} -Gradient for \emph{roughness} defines the intensity of the roughness effect. This property has effect when \emph{Rough surface} is enabled. More details about roughness are in chapter \ref{materials-roughness} +Gradient for \emph{roughness} defines the intensity of the roughness effect. This property has an effect when \emph{Rough surface} is enabled. More details about roughness are in chapter \ref{materials-roughness}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_roughness.png} {Gradient for roughness intensity} @@ -224,7 +224,7 @@ \subsubsection{Gradient for roughness}\label{materials-roughness-gradient} \subsubsection{Gradient for reflectance}\label{materials-reflectance-gradient} -Gradient for \emph{reflectance} defines the amount and color of the reflected light. This property is enabled when the \emph{Reflectance} parameter is greater than zero. More details about reflectance are in chapter \ref{materials-reflectance} +Gradient for \emph{reflectance} defines the amount and color of the reflected light. This property is enabled when the \emph{Reflectance} parameter is greater than zero. More details about reflectance are in chapter \ref{materials-reflectance}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_reflectance.png} {Gradient for reflectance color and intensity} @@ -233,7 +233,7 @@ \subsubsection{Gradient for reflectance}\label{materials-reflectance-gradient} \subsubsection{Gradient for transparency}\label{materials-transparency-gradient} Gradient for \emph{transparency} defines the color of transparency and opacity. This property is enabled when the \emph{Transparency} parameter is greater than zero. -It is recommended to use bright colors in the gradient for transparency. More details about transparency are in chapter \ref{materials-transparency} +It is recommended to use bright colors in the gradient for transparency. More details about transparency are in chapter \ref{materials-transparency}. \simpleImageWithCaptionThirdWidth{img/manual/media/material_gradient_transparency_bright.png} {Gradient for transparency color - example of bright colors to get high transparency} @@ -254,7 +254,7 @@ \subsection{Surface color}\label{materials-surface_color} \subsection{Shading}\label{materials-shading} -When \emph{shading} parameter is 1.0 then the surface brightness depends on the angle of incidence of light. Decreasing this parameter reduces the strength of this rule. When it is 0, then the surface color has the same brightness at every angle. +When \emph{shading} parameter is 1.0, then the surface brightness depends on the angle of incidence of light. Decreasing this parameter reduces the strength of this rule. When it is 0, then the surface color has the same brightness at every angle. \threeImagesWithTwoCaptionsFullWidth {img/manual/media/material_shadng_0.png} @@ -349,15 +349,15 @@ \subsection{Advanced color parameters}\label{materials-advanced-color-parameters The simplest is coloring a point based on the original location of the point. Next is coloring a point based on the final location of the point at termination of the iteration process. -However we can derive more complex algorithms based on data obtained during the iteration process (e.g orbit trap algorithms and aux.color algorithms). +However, we can derive more complex algorithms based on data obtained during the iteration process, (e.g. orbit trap algorithms and aux.color algorithms). All of the above can be used together to form even more complicated algorithms. -\textbf{Orbit trap} algorithms have already been covered above, (however more complex versions can be coded but they will increase calculation time). The orbit trap output is called \textbf{colorMin}. +\textbf{Orbit trap} algorithms have already been covered above; however, more complex versions can be coded but they will increase calculation time. The orbit trap output is called \textbf{colorMin}. -\textbf{Aux.color} value is generally generated by whether an if() condition is met on an iteration. For instance if z.x \textgreater\space folding\_limit then increase the aux.color value, if it does not then the value remains unchanged for that iteration. The final aux.color value for a point is the summation of the values at termination. This generally results in color banding. However some of the newer formulas have aux.color algorithms that do not produce color banding. +\textbf{Aux.color} value is generally generated by whether an if() condition is met on an iteration. For instance if z.x \textgreater\space folding\_limit, then increase the aux.color value, if it does not, then the value remains unchanged for that iteration. The final aux.color value for a point is the summation of the values at termination. This generally results in color banding. However, some of the newer formulas have aux.color algorithms that do not produce color banding. -There are also a few transform based color algorithms, that use aux.color or aux.colorHybrid : +There are also a few transform-based color algorithms, that use aux.color or aux.colorHybrid: T>DIFS Hybrid Color - for coloring T>DIFS. @@ -365,7 +365,7 @@ \subsection{Advanced color parameters}\label{materials-advanced-color-parameters T>Hybrid Color2 - more options for coloring based on data from the iteration loop. -\subsubsection{Normal Mode Color(single formula mode and boolean mode}\label{materials-normal-mode-color} +\subsubsection{Normal Mode Color (single formula mode and boolean mode)}\label{materials-normal-mode-color} For each formula there is one of five color functions assigned. The first three are simply the output from the orbit trap calculation multiplied by a constant. @@ -382,39 +382,28 @@ \subsubsection{Normal Mode Color(single formula mode and boolean mode}\label{mat msltoe Donut aux.color divided by number of iterations. -d) case coloringFunctionDonut: colorIndex = aux.color * 2000 / aux.i; +d) case coloringFunctionDonut: colorIndex = aux.color * 2000 / aux.i; (aux.color / iterations). -e) the fifth is case coloringFunctionAbox - -This is calculated as the addition of three parts - -\begin{lstlisting} -case coloringFunctionABox: -colorIndex = aux.color * 100 -+ r * defaultFractal->mandelbox.color.factorR / 1e13 -+ ((fractalColoring.coloringAlgorithm != fractalColoring_Standard) ? colorMin * 1000.0 : 0.0); -\end{lstlisting} +e) the fifth is case coloringFunctionAbox. This is calculated as the addition of three parts: 1. \textbf{aux.color part} is made up of components from the box fold and sphere fold. \simpleImageWithCaptionFullWidth{img/manual/media/aux_color_parameters.png} {General arrangement of aux.color parameters} -{aux_color_parameters_vary_VCL}{H} +{aux_color_parameters}{H} -\underline{Box Fold} -if (z > limit OR z < -limit) aux.color += boxFoldComponent. +\underline{box fold - x, y \& z plane components}. +if (z.x > offset OR z.x < -offset) aux.color += X plane component. Note that the box fold component can create speckly areas with mandelbox type fractals. +\underline{sphere fold - MinimumR2 and MaximumR2 components}. +if (rr < minR2) aux.color += minR2 component. +else if (rr < maxR2) aux.color += maxR2 component. +And therefore, if(rr > maxR2), there is no addition of a component. -\underline{Sphere Fold}. -if (rr < minR2) aux.color += minR2Component. -else if (rr < maxR2) aux.color += maxR2Component. - -And therefore if(rr> maxR2 ) there is no addition of a component. - -With a standard mandelbox we need to cut open the fractal to see these components acting on their own. Red is the minR2 component and blue the maxR2 component. +With a standard abox/mandelbox, we need to cut open the fractal to see these components acting on their own. Red is the minR2 component and blue the maxR2 component. \twoImagesWithTwoCaptionsFullWidth{img/manual/media/box_fold.png} {Box fold component} @@ -425,26 +414,31 @@ \subsubsection{Normal Mode Color(single formula mode and boolean mode}\label{mat 2. \textbf{radius} at termination * parameter named absolute value of z / 1e13 -This parameter only works with the Mandelbox forumla and must be in the first slot. +This parameter \underline{only} works with the Mandelbox formula and must be in the first slot. 3. \textbf{colorMin} * constant, if coloring algorithm is Standard the constant = 0.0, otherwise the constant = 1000. - +\begin{lstlisting} +case coloringFunctionABox: +colorIndex = aux.color * 100 ++ r * defaultFractal->mandelbox.color.factorR / 1e13 ++ ((fractalColoring.coloringAlgorithm != fractalColoring_Standard) ? colorMin * 1000.0 : 0.0); +\end{lstlisting} \subsubsection{Extra Hybrid Mode Color Options}\label{materials-extra-hybrid-mode-color-options} -When in hybrid mode (and more than one slot is enabled) the color is calculated as the addition of three parts: +When in hybrid mode (and more than one slot is enabled), the color is calculated as the addition of three parts: \(final color = orbit trap + aux.color + \frac{radius}{aux.DE}\) -With the historic code the ratio of the three parts was fixed. +With standard hybrid mode coloring the ratio of the three parts is fixed. -With Extra Hybrid Mode Color Options enabled, the influence of the three parts can now be controlled. This also allows for some backwards compatibility with Pre V2.15 color. If Extra Hybrid Mode Color Options is disabled then the calculation is run without the scales (this is faster). +With Extra Hybrid Mode Color Options enabled, the influence of the three parts can be controlled. This also allows for some backwards compatibility with Pre V2.15 color. If Extra Hybrid Mode Color Options is disabled, then the calculation is run without the scales, and is faster. -\textbf{Notes: }The aux.color default value is 1.0, so even if the formula does not have any aux.color components there still be some influence. Depending on the formula, the \(\frac{radius}{aux.DE}\) component has little influence. +\textbf{Notes: }The aux.color default value is 1.0; so even if the formula does not have any aux.color components, there still be some influence. Depending on the formula, the \(\frac{radius}{aux.DE}\) component has little influence. \subsubsection{Color by numbers}\label{materials-color-by-numbers} @@ -452,15 +446,15 @@ \subsubsection{Color by numbers}\label{materials-color-by-numbers} Color by numbers components are mixed by weights and the summation of the colorValue components is multiplied by 256 to produce the Final ColorValue. -With the default palette gradient and the Color Speed set to 1.0, then a 3D distance of 1.0 equates to a colorValue of 1.0 and a Final ColorValue of 256. Along the default palette Final ColorValue 0 = Orange, 256 = Green, 512 = Pale Yellow, etc. +With the default palette gradient and the Color Speed set to 1.0, then a 3D distance of 1.0 equates to a colorValue of 1.0 and a Final ColorValue of 256. Along the default palette, Final ColorValue 0 = Orange, 256 = Green, 512 = Pale Yellow, etc. Knowing colorValues numbers allows us to manipulate colors in specific ways (from simple to complex). -The color palette size is 2560 Final ColorValue units long. In color by numbers the palette repeats the sequence until it reaches the Maximum ColorValue limit. +The color palette size is 2560 Final ColorValue units long. In color by numbers, the palette repeats the sequence until it reaches the Maximum ColorValue limit. -\textbf{Initial colorValue}. Default is 0.0, increasing this allows for the use of negative colorValues. +\textbf{Initial colorValue}. Default is 0.0. Increasing this allows for the use of negative colorValues. \textbf{ColorValue Initial Conditions Components} -By default all points have an initial colorValue of 0.0. Here it is possible to change the initial colorValue based on the coordinates of the original point "c", (using radius\_c and c.x, c.y \& c.z.) Coloring can be applied using these functions alone or with other functions. +By default, all points have an initial colorValue of 0.0. Here it is possible to change the initial colorValue based on the coordinates of the original point "c", (using radius\_c and c.x, c.y \& c.z.) Coloring can be applied using these functions alone or with other functions. \twoImagesWithTwoCaptionsFullWidth{img/manual/media/initial_conditions.png} {Mandelbox 12.0 high with 1.0 bands based on intial conditions} @@ -484,7 +478,7 @@ \subsubsection{Color by numbers}\label{materials-color-by-numbers} \textbf{radius / DE components} -A component value is added based on the distance of the point from the origin divided by the DE value at termination. If the fractal has only DE based on scale then this will have little effect as the radius will remain proportional to DE, but does work with pseudo kleinian. This is mainly used for some backwards compatibility issues. +A component value is added based on the distance of the point from the origin divided by the DE value at termination. If the fractal has only DE based on scale, then this will have little effect as the radius will remain proportional to DE, but does work with pseudo kleinian. This is mainly used for some backwards compatibility issues. \simpleImageWithCaptionThirdWidth{img/manual/media/pseudoK_Cbn_rad_de.png} {Radius / DE components} @@ -492,10 +486,12 @@ \subsubsection{Color by numbers}\label{materials-color-by-numbers} \textbf{Axis Bias} -These functions are tools to globally manipulate/distort the color across the fractal surfaces. +These functions are tools to globally manipulate/distort the color across the fractal surfaces. + Examples maths: $XYZ_bias component = abs(z.x) \ast biasScale.x;$ + $Plane_bias component = z.y \\ast z.z \ast biasScale.y;$ \twoImagesWithTwoCaptionsFullWidth{img/manual/media/xyz_bias.png}