Skip to content

Commit

Permalink
Corrected errors and warning in Advanced parameters of materials
Browse files Browse the repository at this point in the history
  • Loading branch information
buddhi1980 committed Oct 22, 2020
1 parent 31a71f8 commit 9928d5b
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions mandelbulber2/manual/chapters/materials.tex
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ \subsubsection{Coloring algorithms}\label{materials-coloring-algorithms}
\end{center}
\simpleImageWithCaptionHalfWidth{img/manual/media/material_color_algorithm_sphere.png}
{orbit trap: Sphere coloring algorithm}
{material-coloring-zdotpoint}{H}
{material-coloring-sphere}{H}

\item[orbit trap: Cross] -- color index is calculated as distance of z vector from orbit trap of cross shape
\begin{center}
Expand Down Expand Up @@ -197,15 +197,15 @@ \subsubsection{Gradient for specular highlights}\label{materials-specular-gradie

\simpleImageWithCaptionHalfWidth{img/manual/media/material_gradient_specular.png}
{Gradient for specular effect colors}
{material-color-gradient-example}{H}
{material-color-gradient-specular}{H}

\subsubsection{Gradient for diffuse}\label{materials-diffuse-gradient}

Gradient for \emph{specular highlights} defines intensity of diffuse channel. 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}

\simpleImageWithCaptionHalfWidth{img/manual/media/material_gradient_diffuse.png}
{Gradient for diffusion channel}
{material-color-gradient-example}{H}
{material-color-gradient-diffuse}{H}

\subsubsection{Gradient for luminosity}\label{materials-luminosity-gradient}

Expand Down Expand Up @@ -236,13 +236,16 @@ \subsection{Advanced parameters of materials}\label{materials-advanced}

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}.

Generally, an aux.color value is generated by whether an if() condition is met on an iteration. For instance if z.x > 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.
Generally, an aux.color value is 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.

Normal Mode Color(single formula mode and boolean mode)

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.

colorIndex = colorMin * constant;
\begin{lstlisting}
colorIndex = colorMin * constant;
\end{lstlisting}


a) case coloringFunctionDefault: constant = 5000; (the most commonly assigned).
b) case coloringFunctionIFS: constant = 1000.0; (menger, octo, Sierpinski etc).
Expand All @@ -253,12 +256,11 @@ \subsection{Advanced parameters of materials}\label{materials-advanced}

e) the fifth is coloringFunctionAbox   TODO (explanation later)

\filbreak
\begin{lstlisting}
case coloringFunctionABox:
colorIndex =
extendedAux.color * 100.0 // folds part
+ r * defaultFractal->mandelbox.color.factorR / 1e13 // r or abs z part
+ ((fractalColoring.coloringAlgorithm != fractalColoring_Standard) ? colorMin * 1000.0 : 0.0);

colorIndex = extendedAux.color * 100.0 + r * defaultFractal->mandelbox.color.factorR / 1e13;
\end{lstlisting}

There are also a few transform based color algorithms :
T>DIFS Hybrid Color - for coloring T>DIFS.
Expand All @@ -269,16 +271,13 @@ \subsubsection{Extra Hybrid Mode Color Options}\label{materials-extra hybrid mod

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 + radius / aux.DE
\(final color = orbit trap + aux.color + \frac{radius}{aux.DE}\)

With the historic code the ratio of the three parts was 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).

\textit{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 "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}

Expand Down

0 comments on commit 9928d5b

Please sign in to comment.