Graeme’s Blog

28 June 2018,     T> is for Transform

Fractal formulas are made up of transforming functions.
Functions that move (map) the points to new positions.

Make an Abox fractal formula:
slot#1 box folding
slot#2 spherical folding AND CHECK BAILOUT HERE
slot#3 scale the vector
slot#4 rotation
slot#5 add a constant

After building the fractal, determine which slot(s) should have a bailout termination check.

It is standard to have a single bailout_check at the end of the sequence of transforms.

However the placement of the bailout_checks can create different colorings.

It is easiest to test by turning them on and off in the different slots, or you can try and understand what is happening (not recommended).

But it is like this, the points that do not belong to the set are generally decided upon by them passing the bailout, which is generally a maximum radius. So a Rotation transform is not going to achieve bailout termination condition as the point is rotating at a set radius from the origin, not moving outwards to approach bailout radius. Whereas a spherical fold (conditional scaling) can move points, that do not belong to the set, out past the bailout radius.

Using transforms we can swap the order of the transforms in the fractal, like swap slot#4 and slot#5 in the example above. (Note: swapping the slot#3 Scale and slot#4 Rotation transform makes no difference as they are acting at right angles to each other.)

Add extra transforms, or run them on just a few iterations, or add half on the Cpixel constant multiplier after the box fold and the rest at the end. The possibilities are infinite with transforms.

# Mandelbulber settings file
# version 2.14
# only modified parameters
ambient_occlusion_enabled true;
camera 16.6711913098631 -34.99997015584672 8.234003716714858;
camera_distance_to_target 40;
camera_rotation 25.91221422492213 -14.22298264575404 -2.110319704184664;
camera_top -0.1404164646440113 0.2047534710347296 0.9686894407167383;
check_for_bailout_1 false;
check_for_bailout_3 false;
check_for_bailout_4 false;
check_for_bailout_5 false;
DE_factor 0.7;
detail_level 2;
flight_last_to_render 0;
formula_1 1025;
formula_2 1021;
formula_3 1002;
formula_4 1003;
formula_5 1007;
fov 0.5;
hybrid_fractal_enable true;
image_height 1600;
image_width 1600;
keyframe_last_to_render 0;
mat1_fractal_coloring_aux_color_false true;
mat1_fractal_coloring_aux_color_weight -0.7;
mat1_fractal_coloring_extra_color_enabled_false true;
mat1_fractal_coloring_orbit_trap_true false;
mat1_fractal_coloring_rad_enabled_false true;
mat1_fractal_coloring_xyz_bias_enabled_false true;
mat1_fractal_coloring_xyz_iter_scale 2.775557561562891e-17;
mat1_is_defined true;
mat1_surface_color a800 a200 4600;
raytraced_reflections true;
target -0.2727417446520481 -0.1242406216699191 -1.593845595472264;
mandelbox_color 1 1 1;
mandelbox_color_Sp1 0;
transf_addition_constant 1 1 1;
transf_function_enabledCx_false true;
transf_function_enabledCy_false true;
mandelbox_color 0 0 1;
mandelbox_color_Sp1 0;
transf_addition_constant 1 1 1;
transf_rotation 2 0 0;
transf_scale 2.000000000000001;
analyticDE_offset_0 1;
info true;
transf_function_enabled_false true;
transf_scale 2;

16 June 2018,     V2.14 coloring in Medium mode  openCL
In medium mode you can use only one material. The coloring method used for the fractal is used for any primitives.
The option to do this may be added to Full_Mode and CPU_Mode ( and possibly some options and controls??).
The effect can be animated. Currently for complete symmetry you need the primitive based around the origin and also the proximity of the fractal to the primitive is important.
Animating inside a hollow primitive world you can have the coloring animating on the inner surface of the primitive.

This image is the mandelbulb using standard_orbit_trap.

# Mandelbulber settings file
# version 2.14
# only modified parameters
ambient_occlusion_enabled true;
background_3_colors_enable false;
camera 3.005203820042826 -2.368807716974934 0;
camera_distance_to_target 3.8;
camera_rotation 45.00000000000005 0 0;
camera_top 0 0 1;
detail_level 0.25;
flight_last_to_render 0;
formula_2 1002;
formula_3 1065;
image_width 600;
keyframe_last_to_render 0;
limit_min -10 0 -10;
limits_enabled true;
main_light_alpha 0;
mat1_coloring_speed 0.5;
mat1_is_defined true;
primitive_sphere_1_empty true;
primitive_sphere_1_enabled true;
primitive_sphere_1_radius 1.5;
raytraced_reflections true;
target 0.3181980515339463 0.3181980515339463 0;
view_distance_max 9.256357731414731;




7 June 2018, testing volumetric light in openCL mode.

I only use volumetric light with openCL because it is slow to render.

There is a big difference between rendering an image that is all fractal (no background visible), compared to where the fractal is only in the center of the image.

When there is no background visible, all the raymarching from the camera finds a surface. So it does not matter what the maximum_view_distance limit is set to on the rendering engine tab, as long as it is beyond view.

However when there is background visible, the raymarching continues stepping out to the maximum_view_distance limit. This can take a lot of computing time (even more so if the raymarching step is a small value.)

Volumetric light is already compute expensive, so  if these is a lot of background visible, then it is best not to use volumetric lightbeams that are in a direction away from the camera. This way,  you can keep the maximum_view_distance limit down and save render time.

I blocked off the rear lightbeam by placing a primitive cube in the back of the menger sponge. I changed maximum_view_distance limit from 50 down to 10, and the render time dropped from 22min to 14min at 1600 x 1200. However you can see the 10 limit effecting the lefthand volumetric lightbeam where it reaches this maximum limit, so i should increase the maximum or block off that volumetric ray.

The  Custom_light_options  visibility parameter on the Effects – Lights tab is disabled and the  visability parameter in the Effects – Volumetric tab is used instead.

I find it difficult to use volumetric light, balancing  the volumetic light parameters ( visibilty, size and intensity) with the possible inclusion of main light, ambient occlusion and fog.

# Mandelbulber settings file
# version 2.13
# only modified parameters
ambient_occlusion 0.3;
ambient_occlusion_enabled true;
aux_light_colour_1 ff00 ff00 7f00;
aux_light_enabled_1 true;
aux_light_intensity_1 0.6701749032921814;
aux_light_position_1 0 0 0;
aux_light_volumetric_enabled_1 true;
aux_light_volumetric_intensity_1 9.931817982164144;
background_3_colors_enable false;
background_color_1 0000 0000 0000;
camera 2.045630052505397 -5.063112049909394 0;
camera_distance_to_target 5.460742251896799;
camera_rotation 22 0 0;
camera_top 0 0 1;
DE_factor 0.9;
DE_thresh 0.0041;
detail_level 4;
flight_last_to_render 0;
fog_color_1 a400 e600 a200;
fog_color_2 5200 7e00 5500;
formula_1 61;
formula_stop_iteration_1 1;
glow_enabled false;
julia_c -0.08522538649718259 -0.3810545299401547 1.109432956274097;
keyframe_last_to_render 0;
main_light_colour ff00 ff00 7f00;
main_light_intensity 0.4;
mat1_coloring_palette_offset 71.76000000000001;
mat1_coloring_palette_size 250;
mat1_coloring_speed 12;
mat1_is_defined true;
mat1_surface_color 0000 0000 7f00;
mat2_is_defined true;
mat2_texture_mapping_type 0;
mat2_use_colors_from_palette false;
penetrating_lights false;
primitive_box_1_enabled true;
primitive_box_1_position 0 1 0;
primitive_box_1_size 0.5 0.5 0.5;
primitive_sphere_1_enabled true;
primitive_sphere_1_material_id 2;
primitive_sphere_1_position -3 0 0;
primitive_sphere_1_radius 0.5;
primitive_sphere_2_enabled true;
primitive_sphere_2_material_id 2;
primitive_sphere_2_position 3 0 0;
primitive_sphere_2_radius 0.5;
primitive_sphere_3_enabled true;
primitive_sphere_3_material_id 2;
primitive_sphere_3_position 0 0 2.5;
primitive_sphere_3_radius 0.5;
primitive_sphere_4_enabled true;
primitive_sphere_4_material_id 2;
primitive_sphere_4_position 0 0 -2.5;
primitive_sphere_4_radius 0.5;
primitive_sphere_5_enabled true;
primitive_sphere_5_material_id 2;
primitive_sphere_5_position 0 -2 0;
primitive_sphere_5_radius 0.5;
reflections_max 2;
view_distance_max 10;
volumetric_fog_density 0.125;
volumetric_fog_enabled true;
volumetric_light_DE_Factor 0.0078125;
transf_addition_constant -0.4 0 0;


6 June 2018 coloring a primitive in no-openCL mode

In Material editor,  use_color_texture_from_an_image,   attach a radial symmetrical-ish .jpeg like the one below:

with these settings you need to set a file path  in use_color_texture_from_an_image

i.e. C:\Users\Graeme\mandelbulber\my textures\Inside a Mandelbulb Void.jpg;

You will see a central vertical cut in the rendered image, you may need to orientate your camera view to avoid this.

Then go down the UI to find fractalize_texture for more options

now go down to mapping_type and look at the tooptip and see what the different types do.

# Mandelbulber settings file
# version 2.13
# only modified parameters
ambient_occlusion_enabled true;
background_3_colors_enable false;
background_color_1 0000 9500 ff00;
camera 0 -11.81484602170778 0;
camera_distance_to_target 11.81484602170778;
camera_rotation 0 0 0;
camera_top 0 0 1;
DE_factor 0.6;
flight_last_to_render 0;
formula_1 14;
fov 0.5;
frames_per_keyframe 60;
hdr true;
image_height 800;
keyframe_last_to_render 0;
main_light_alpha 45;
main_light_beta 0;
mat1_coloring_palette_offset 6.07;
mat1_coloring_palette_size 250;
mat1_coloring_random_seed 535927;
mat1_is_defined true;
mat1_metallic true;
mat1_surface_color_palette ffffff 000000 ffc4a8 000000 c6fd63 000000 593bf1 000000 e44ad6 000000 843e40 883e72 773c81 4d428b 3e5881 3d7b7e 3c7c4b 587f3e 6e743d 7e633e 7d443a ffe44f ffffff c376b5 660063 a2bc45 71edc2 0ef3fc ff78ff 3263ff 7948c0 392749 b4bdab ff445d aac656 c82c5e 00d5a2 67b1c6 591b24 24142c 2205c4 d3ff69 88777a 0015e5 003b58 726468 56876d dce4b1 6ab93c 5d2610 5aa37d e0ffe4 add677 00510c c4697a 7d46ff 8d7b53 f749db 714489 8e4fb2 c67257 54d730 ff917a 9c9ebc 0ed189 542093 ff482f 0f4164 21d14c 49f3d2 ab3f94 99ffb7 112c1c bdc500 5b0000 64c2af 171d68 d64755 ffc7a8 ff5e65 a8e30b 2effd4 a0ffff 01ccdb 00b5d0 62e464 720a63 a7c200 ff7352 ff999b 6a3eff e47fb3 59ffff 39d236 d88335 407032 ce9739 e1fadb 62ab00 7b700e 449ad3 009f53 52ffbb b08daa 0f000f 3b4700 ffd5e6 75d200 bb82ff a22800 ca5913 c35dbf 94b849 c67e45 6d4af7 0ebba1 4cbb80 ffd617 81c82e 9dbe26 490f26 47218d 007ea2 273cd7 8ff941 8037cc 64e726 cdd16d 4f4600 5d0900 ffff86 228ecb 999e7a 007f00 546ec2 b1e597 77dcb4 3d9105 7b9599 ffff4e 06ca4b 883044 ff462f fa36d3 38ff41 88e029 ebffea 6c8a12 69d3af 6e3f7e 85298a ffffff 4e2d52 d2c6d2 9488c8 4a2fe2 a80000 dfecb2 7c1100 0017d6 4c6464 de0022 b00000 8263ff 616067 346df8 1897e1 9a24c5 c6a8ba a7af47 080087 4cba47 6b6e95 637a9c caabe5 88cf2b 3c180b 615489 f8caf9 6e6129 00c409 002636 305ba6 93ec67 51997b 498a6c e65860 783e25 8bede4 29342b 94678e 9effff 5cd889 009600 4aa085 fd6c8a 674b99 70df48 ffd6ff 82fd92 e1eb00 ab378c 432f28 1e2748 531d90 948b85 406bc5 000c68 007303 932e81 a6bf85 ffffca b3b7ff 494f14 6effc7 9fdf35 ff8af2 b47d58 3e4e35 c5025b 294700 457a1e 665848 2643c6 75876f f4c734 0ae79a 327beb 000067 926099 17d6e6 6ea3ff bdffcc 0e4f60 d3cd68 6b520d 2414c0 164e4c 8168ca aedec9 99be52 ac49ff 6a3aff 5bfff6 b330e3 009536 b6fbff 656722 9dcbff 842c61;
mat1_texture_fractalize true;
mat1_texture_mapping_type 0;
mat1_use_color_texture true;
primitive_sphere_1_enabled true;
primitive_sphere_1_radius 2;
raytraced_reflections true;
view_distance_max 27.8068709137278;



1 June 2018 MsltoeSym4, rendered openCL Full mode

I use this formula in Julia_mode, or with Don’t_add_global_C_constant ticked
For this image, Constant_detail_size is used to keep the color from varying over distance

The color is iteartion based, producing areas of constant colorValue.
If feasible, increase Detail_level to 4 with this type of fractal.

# Mandelbulber settings file
# version 2.14
# only modified parameters
ambient_occlusion_enabled true;
camera 0.7162210541274655 0.2660862901816427 -0.119661768895475;
camera_distance_to_target 0.01646379373706499;
camera_rotation -155.1559072450269 -54.71157682786411 -177.0093301770479;
camera_top -0.295137700222596 0.7616254335151639 -0.5769059168791347;
constant_DE_threshold true;
DE_factor 0.9;
DE_thresh 1.220703125e-06;
dont_add_c_constant_1 true;
fog_color_3 3e00 5500 3700;
formula_1 69;
fov 0.6;
image_height 2400;
image_width 3600;
main_light_beta 79;
mat1_coloring_palette_size 32;
mat1_coloring_random_seed 261153;
mat1_fractal_coloring_extra_color_enabled_false true;
mat1_fractal_coloring_i_start_value 1;
mat1_fractal_coloring_iter_group_enabled_false true;
mat1_fractal_coloring_orbit_trap_true false;
mat1_fractal_coloring_rad_div_de_squared_false true;
mat1_fractal_coloring_rad_div_log_de_false true;
mat1_is_defined true;
mat1_metallic true;
mat1_surface_color_palette 2f003c aa2a10 55007f aa2420 aa2218 265528 dfdfdf eaeaea 3a5535 385536 0100d4 a58c7a aa1f15 aa0a0a c5d1ad ffd0ff aa2f19 345537 690042 aa2816 524fad aa2311 dedede aa1e14 e6e6e6 a57a31 c09374 a3c2b9 ffda75 fff3f8 f2bbae 4b0dad;
raytraced_reflections true;
target 0.7202171117315623 0.2574554788998646 -0.1331004118500181;
volumetric_fog_colour_1_distance 0.0003632535166213782;
volumetric_fog_colour_2_distance 0.0007265070332427565;
volumetric_fog_density 0.125;
volumetric_fog_distance_factor 0.0007265070332427565;
volumetric_fog_enabled true;
info true;
transf_addition_constant -0.8 0 0;
transf_rotation_enabled true;


28 May 2018  PseudoKleinian Formula

I had to relearn knighty’s pseudoKleinian formula. These are some notes

The iteration loop is normally terminated by maxiter. Increase maxiter until you don’t want or see any more replications. For fast rendering you don’t want to be computing extra mini versions that you will not see.

The fractal is represented by thin surfaces made of cuts that have been joined together, it is easy to damage..

Formula iteration loop starting with vector3 z0

cSize is a maximum size condition,
if (z0 > cSize) then z1 = cSize else z1 = z0 (no change in value);
part code: if (z.x > cSize.x) tempZ.x = cSize.x;

scaling and offsetting
z2 = z1 * 2.0 – z0
code: z = tempZ * 2.0 – z;

Making a conditional inversion scaling factor
k = max(inversion_scale / (x*x + y*y + z*z) or 1.0);
code: k = max(fractal->transformCommon.minR05 / z.Dot(z), 1.0);

Using the factor
z3 = z2 * k;
code: z *= k;

Update and tweak the DE
newDE = oldDE * k + DE tweak;
code: aux.DE *= k + fractal->analyticDE.tweak005;

If (iteration value < maxiter) then run the loop again

SizeR2 is the inversion scale

DE tweak. Normally leave at default settings, but if the image is good you can try reducing it for more detail. Increase to reduce image deterioration but detail will be lost.
DE factor controls the size of the holes, normal use maximum 1.0. This parameter does not change the fractal formula, but changes DE maths.

Pseudo Kleinian _ Mod 1 has a z.z tweak scale( name is to be changed), normal use is small numbers like 1.06.

These settings produce a strange coloring effect with light and dark areas that may change with resolution, I do not know why.

# Mandelbulber settings file
# version 2.13
# only modified parameters
ambient_occlusion_enabled true;
ambient_occlusion_quality 8;
camera 7.281299365810486 -6.064734307392453 9.91922484642445;
camera_distance_to_target 0.5096124637126928;
camera_rotation 30.89374581806501 -28.9248280843596 3.148366828143016;
camera_top -0.2008306357821378 0.4426132330676509 0.87393396869829;
DE_factor 0.9;
detail_level 2;
formula_1 104;
image_height 2400;
image_width 3600;
mat1_fractal_coloring_extra_color_enabled_false true;
mat1_fractal_coloring_orbit_trap_weight 7.5;
mat1_fractal_coloring_rad_div_de_enabled_false true;
mat1_fractal_coloring_rad_div_de_weight 100000;
mat1_fractal_coloring_rad_weight 4;
mat1_is_defined true;
mat1_surface_color_palette fd6029 698403 fff59c 00aa7f 0b5e87 00ff00 aa2918 3b9fee d4ffd4 aba53c;
N 12;
raytraced_reflections true;
target 7.052280758495762 -5.681977290359352 9.672744813588386;
transf_scaleB_1 1.04

16 May 2018 Animating using CSV (comma seperated value) files

Once you have created an animation, open the settings .fract file in a simple text editor.

Near the bottom the settings files is the [Keyframes] data. Copy this to clipboard and save in a new file called fileName.csv.




Perform a simple find & replace  semicolons to commas ( “;” into “,”).

Save the .csv file.

And then open it into a spreadsheet for editing.

Once edited, save your spreadsheet .csv file, open in text editor and find & replace the commas back to semicolons. Copy and paste the edited keyframes data back into the animation settings file, load back into Mandelbulber and test render.

Blurry image? Here I have copied the Target xyz coordinates for each keyframe,  and pasted them over the Primitive Box coordinates, but staggered by one keyframe such that the box is placed ahead at the next keyframes target coordinates.  Last keyframe I guessed the box coordinates.

With the data in spreadsheet form, values can be tweaked or new values generated for input.  This was a very basic example, but I could make it more complex, say, by generating values to be at a diverging offset to the target tracking line.

5 May 2018   aux.color and color_by_numbers

Aux.color color component values are collected inside the iteration loop.  Aux.color is part of the  Hybrid mode color function, that means when in hybrid mode, any formulas/transforms that include aux.color,  can normally be used. The aux.color option on the formula tab may be either enabled or disabled by default, (mainly for some backwards compatibility.)

If in color_by_numbers mode, and aux.color is not required, it is then good practice to ensure it is not enabled on the Color_by_numbers UI. Also ensuring aux.color is disabled on all formula tabs can save some render time.

Historically aux.color updates the colorValue every iteration IF a condition is met. It has non-zero default settings so that it works in Hybrid mode. When using Color_by_numbers mode, it is best to zero all the aux.color parameters before you start.

Example maths: when iterating a point, IF z.x is greater than a limit then add a factor to the colorValue, if not, then there is no change in colorvalue. This results in a jump in colorValue at the limit (not a smooth transition). The aux.color parameter starts at 1.0, so for any point the increase in colorValue = 1.0 + (factor * number of iterations where the condition is met.)

Generally all points that meet the condition get the same value increase, however there are a few other aux.color modes being trialled.

There is also an aux.colorA component that starts at 0.0, BUT this is only used with the experimental transf_hybrid_color transforms that are a work in progress, and should not be used.

Some points to note, generally:

a) If in a spherical fold the minimum R2 or Radius is very small or zero, then it is likely to be insignificant to the colorValue.

b) With a spherical fold, the maximum R2 or Radius aux.color parameter generally works, it sometimes depends on location. i.e if your location is 5.0 away from the origin and maximumR2 is 1.0 you may not see any change.

c) If the settings are such that both spherical fold aux.color parameters are working, do not have the same value for both. There will be no distinction between their effect on the color .

d) With the box fold, aux.color can produce speckled areas. Although in some situations this can be a good effect.

Because the equation starts with 1.0 there is an initial colorValue change when aux.color is used, all points have 1.0   added to their colorValue,  so it is the same as moving the palette_offset parameter. When using color_by_numbers a user needs to be aware of  when adjusting a parameter has the result  of simply cycling through the color palette.

2 May 2018   Replicating hybrid mode coloring in Color_by_numbers v2.13.

Historic HYBRID MODE color was made of three components: color = (minimum orbit trap value during iterations) + (aux.color accumulating every iteration) + (radius/DE at termination)

Most fractals (other than box/surf types), did not have any aux.color components, and with a lot of fractal settings, the “radius/DE at termination” was probably fairly constant for all points and/or was an insignificant number.

So often color in hybrid mode was just = “minimum orbit trap value during iterations” ( code: colorIndex = minimumR * 1000.0).

Therefore, if replicating HYBRID MODE color, often only the orbit trap component is required to be enabled.

Example (KIFS settings by Knighty), is in Hybrid_mode, enable Color_by_numbers_mode and the coloring should be replicated. Disable Orbit Trap component and all color variation is gone (i.e the two other enabled components were not creating color variation so were wasted computing.).

# Mandelbulber settings file
# version 2.13
# only modified parameters
ambient_occlusion_enabled true;
aux_light_intensity_1 1.41254;
aux_light_position_1 5 -3 3;
camera -3.374822150421505 -5.670216364656566 0.3785009479675853;
camera_distance_to_target 5.000000000000002;
camera_rotation -27.10000666422716 -4.220055082387339 2.577041457929873;
camera_top 0.07351478024855854 0.04495955280643608 0.9962801893525994;
DE_factor 0.7;
flight_last_to_render 0;
formula_1 10;
formula_2 1025;
formula_iterations_1 2;
fractal_rotation 0 270 0;
hybrid_fractal_enable true;
keyframe_last_to_render 0;
main_light_alpha 0;
main_light_beta 0;
mat1_fractal_coloring_aux_color_false true;
mat1_fractal_coloring_aux_color_weight 0.39;
mat1_fractal_coloring_extra_color_enabled_false true;
mat1_fractal_coloring_orbit_trap_weight 3.9;
mat1_fractal_coloring_rad_div_de_enabled_false true;
mat1_fractal_coloring_rad_div_de_weight 19.5;
mat1_is_defined true;
mat1_surface_color_palette fd6029 0e0eaa fff59c f5bd22 0b5e87 c68876 a51c64 3b9fee d4ffd4 aba53c;
target -1.103272508511132 -1.231220416195507 0.01056454873101664;
view_distance_max 20.9136294036183;
IFS_abs_y true;
IFS_abs_z true;
IFS_direction_0 0.866 -0.5 0;
IFS_direction_1 0 1 0;
IFS_direction_2 0 -0.707 0.707;
IFS_direction_3 0 1 0;
IFS_distance_3 0.5;
IFS_enabled_0 true;
IFS_enabled_1 true;
IFS_enabled_2 true;
IFS_enabled_3 true;
IFS_offset 0.866666 1.5 1.5;
IFS_scale 3;
mandelbox_color 4 0.05 4;
transf_addition_constant 1 1.8 1;
transf_offset_000 0 0 1;

1 May 2018   Some examples, previously  posted at

These are some zip files of examples. There is no guarantee that they all still work. It would be helpful if we are advised of any broken setting so they can be fixed (message Carbuncle Grim at Facebook or mclarekin at



PrismShape examples



inv Cyl examples


benesi examples