Logo by S Nelson - Contribute your own Logo!
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. October 02, 2014, 04:27:11 PM


Login with username, password and session length



Pages: [1] 2 3   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Multiwave coloring for Mandelbrot  (Read 2184 times)
Description: UF coloring
0 Members and 1 Guest are viewing this topic.
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« on: June 14, 2012, 01:04:13 AM »

Based on what I'm developing. Requires UF 5 or later, I think.

This coloring merges several waves of colors or varying brightness of different periods into one another, and with the gradient, which can be mapped linearly, by a power, or exponentially. It takes some getting used to but when used on deep mandelbrots (or, especially, whole zoom movies) its advantages particularly shine.

With a simple gradient, if it's mapped linearly it tends to highlight the features away from the minibrots and other "deep features", whereas the latter get several copies of the gradient compressed into them and become a low-contrast fuzz or weakly-banded color. If it's mapped logarithmically, the gradient highlights deep details at the expense of the shallow features becoming faint and poor-contrast.

This scheme is designed to be capable of producing contrast for features at many different scales at the same time. At the same time it can "discover" interesting new colors and color combinations for you, and it generally produces a pleasingly complex gradient over almost any image.

There are a lot of parameters, but many have parallel behavior.

Exponent (re)
Exponent (im)

Default 2; set this the same as for the Mandelbrot formula on the Formula tab to get proper smoothed iterations for your Mandelbrots. Should work for Julias too.

Hue 1A
Hue 2A
Hue 3A
Hue 4A
Short hue shift period (iters)

The four colors here will be interpolated cubically, similar to a UF gradient with those colors at positions 0, 100, 200, and 300, and the resulting gradient will be mapped linearly (if the color tab's transfer function is left at its default) to iterations, repeating every N iterations where N is the value of the fifth parameter.

Hue 1B
Hue 2B
...
Hue 4E
Long hue shift period (iters)

Another 16 colors, in blocks of 4. The cycle of A colors above will gradually permute into a cycle of the B colors, then the cycle of C colors, then D, then E, and back to A. This longer cycle will repeat every M iterations where M is the value of the 17th paramerter.

Actually, the "long hue shift period" can be set comparable to or even shorter than the "short hue shift period". If it's much shorter, the effect is for the five 1 colors to form a cycle and change gradually to the five 2 colors, then the 3s, then the 4s, and then back to the 1s -- so you get four cycles of five colors each instead of five cycles of four each. If the two are comparable, the results are more complex. The A colors will cycle, but at the same time they'll be changing to the B, C, D, and E colors and back to A. The color to iteration assignment will still vary smoothly, but it may vary more chaotically, which may be desirable, particularly for making striking still images.

Superslow bias color 1
Superslow bias color 2
Superslow bias color 3
Superslow bias period (iters)

As the name implies, intended to be used to slowly shift the whole of the above on even longer iteration scales, particularly to vary the scheme during very deep sequences or to highlight highly-layered structures, such as deep embedded Julias, that will be repeating.

However, it can be given any period, even a very short one.

Superslow bias mode
Superslow bias sensitivity

Determines how the superslow bias gradient is merged with the gradient described previously.

Default is HSL bias, in which the sensitivity setting does nothing. In HSL bias, it is similar to if the first gradient were applied to the layer by itself and the second gradient were applied to a copy of that layer and the layers merged with "HSL addition". However, unlike HSL addition, HSL bias avoids a) discontinuities that HSL addition sometimes induces when a low saturation color is involved and b) whiting out or blacking out. The HSL bias luminance "addition" has the property that adding bright colors tends to approach maximum luminance (white) asymptotically; likewise black is approached asymptotically at the other end. Saturation addition behaves similarly.

Like with HSL addition, the neutral color for HSL bias is a 50% saturated, 50% luminance red.

The other bias option here is saturation bias. Saturation bias merges in a manner that doesn't resemble any of the layer merge options. Instead, the superslow cycle color acts as a selective filter on the underlying colors from the first gradient. Colors similar in hue come through unaffected while colors different in hue lose saturation towards grey. The result is that you can make the first gradient produce, eventually, a full rainbow over tens of thousands of iterations and use the superslow bias to cause some deep areas to be biased towards particular colors, such as reds. Where the superslow bias color is less saturated, the bias effect itself is weaker; the luminance is added to the underlying color's with asymptotic behavior exactly as for HSL bias. The superslow bias sensitivity affects how fast colors desaturate as the hue moves away from the superslow bias hue. So one can have a narrow range of shades of red not desaturate, or have anything vaguely reddish not desaturate and only blues and greens desaturate, or in-between.

First luminance shift period (iters)
First luminance amplitude
...
Fourth luminance shift period (iters)
Fourth luminance amplitude

All of these superimpose cyclical luminance variations of specified periods on the gradient. It is generally good to tune these to the "iteration sizes" of important features. As with other luminance additions here, white and black are approached asymptotically.

To find a good period to use you can experiment, or you can be more analytic. Consider an image of an embedded Julia set deep in a seahorse tail. You probably want one luminance shift period set short, such as a few iterations up to 20-30 iterations, with a lowish amplitude such as 0.1 or 0.2, to add some interest to the empty areas between seahorse tails. For the next one, consider duplicating the image, zooming in tight on a seahorse tail in the image, noting the minimum iterations, going a couple of windings deeper into the spiral with another zoom, and noting the new minimum iterations. (You'll want the Statistics palette displayed for this.) The difference is probably a good period for another luminance shift. The difference between a seahorse's surroundings and a tight zoom into its "eye" is probably another good choice, and the difference between the main image's minimum and a zoom in the embedded Julia set another, so the embedded Julia features will receive contrast. Usually, though not always, the longer the period the larger the amplitude ought to be.

You can also use the three coloring periods above to tune to features. For example, for the same image you may want to make the short hue shift period about twice the seahorse edge-to-eye iteration span, so each seahorse shifts through two or so of a cycle of four hues from edge to center, and make the long period such that one cycle takes over from another between the image edge and the embedded Julia features. Further zooms (or a movie) would segue into additional cycles at each level of fourfold, eightfold, etc. embedded Julia if the long hue shift period was tuned right.

Primary gradient merge mode

This controls how the UF layer gradient is combined with the gradient produced by the above. HSL bias does as described previously: an improved HSL addition, in essence. RGB bias makes the gradient behave a bit more "intuitively": where the gradient is red, the image will be red(dish), and so forth. A 50% grey is neutral for RGB bias. The more saturated a main gradient color, the more the generated gradient from above is tinted toward that color. Luminance is biased as usual.  RGB blend uses the main gradient's opacity: where the main gradient is opaque it completely determines the color and where it's transparent the generated gradient shows through. Where it's translucent, the two are blended similarly to an overlying layer with Normal merge mode and varying opacity. HSL blend is HSL bias with opacity influencing things somewhat. Hue addition is unaffected, but the saturation and luminance addition is weakened by transparency. Theoretically, the same effect can be obtained simply by using HSL bias and moving the main gradient color towards 50% luminance and 50% saturation, but it may be advantageous to be able to weaken or prevent saturation addition while keeping the main gradient hue at full saturation, and it may be simpler to create the gradient if the color changes and sat/lum changes are largely uncorrelated in position (as opacity has an independent set of control points to color in UF's gradient editor).

Fit Gradient to Range
Number of repetitions
Start iteration
End iteration
Super transfer function
Transfer power

These affect how the main UF gradient is mapped into iteration-space. Without "Fit Gradient To Range" its first color will apply until Start iteration, and then it will repeat endlessly. With "Fit Gradient To Range" it will be fit into the range from Start iteration to End iteration, and repeated Number of repetitions times. Iterations higher than End iteration will get the gradient's final color.

Because changing the Transfer Function setting at the top from Linear will affect everything, including the gradient generated by all the wave cycles above that is preferable to map linearly to iterations, a Super transfer function setting is supplied to affect the UF gradient component only. It can be linear, power (set with Transfer power), or log. Log with start iteration the image's lowest iteration and end iteration the image's highest iteration tends to work best for isolated still images.

The UF gradient can be used to adjust things where one is unsatisfied, or to add an overall trend to the coloring; for example, if it's logmapped from the start iteration to the max iters, set to HSL bias, mostly a hue 0 saturation 0.5 luminance 0.5 red, but with a quick curve up to white at the right end, it can highlight a minibrot and surrounding filaments in white.

Bail-out value

Use same as for normal smoothed iterations.

Displacement
Rescaling

Can compress or slide the whole shebang. Displacement, in particular, can be useful for testing before rendering a zoom movie: rather than render, slowly, lo-res previews of deep parts to see if the colors look good, one can find a very similar shallower structure that renders much faster due to lower precision and iterations and use displacement to temporarily shift the whole gradient left. Use the difference between the minimum iterations of the deep image and the minimum iterations of the shallow image to make the shallow image use the colors the deep one will have while tweaking the settings to get that area looking nice, then set the displacement back to zero.

Rescaling is useful for fixing up your final minibrot's filaments. The final minibrot will be slow to even preview, for a deep zoom movie, so one only wants to have to render it a few times. Render a low res preview for long enough to find out the minimum iterations and how high they get in a filament close to the minibrot, and note both numbers. Then find a shallow minibrot and find out the same numbers for that. Then you can use displacement and rescaling to map the colors that will be used for the deep minibrot to the shallow minibrot image in a similar manner. Then tweak the color scheme (probably the superslow bias, the logmapped UF gradient, or both) until the filaments stand out nicely how you want them to, and return to the deep minibrot and to displacement 0, rescaling 1.

* mandelmultiwave.ucl (27.06 KB - downloaded 202 times.)
Logged

rollercoaster158
Explorer
****
Posts: 49


« Reply #1 on: June 14, 2012, 01:11:07 AM »

First download  cheesy

Anyway, this is an amazing way of coloring the Mandelbrot set and emphasizes the true beauty of this fractal without directing attention away from anything. I will use this for all my renders and zoom movies. Thank you.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 5623


formerly known as 'Trifox'


WWW
« Reply #2 on: June 14, 2012, 01:30:56 AM »

awesome, just read 1/3 of docs wink
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« Reply #3 on: June 24, 2012, 07:45:55 AM »

BETA: an updated version with these changes:

* Renamed "superslow bias" to "overlay bias" since it doesn't really have to be slow.

* Added "random color" parameter group. After the random color start iteration, colors start to be biased randomly. The bias color changes every so many iterations, set as the random period. The random seed gives a different set of bias colors, the luminance range limit corrals the luminances of the random colors to within a band of that width about 0.5, and the hue variation parameter limits how different adjacent random colors can be. Saturated bright colors are bound to within that many hue points of their neighbors, while less saturated colors, darks, and pastels get more leeway. Anything from 2 on down prevents, e.g., bright green and bright red abutting.

* Internal color calculations no longer use hues from 0 to 6 with red, yellow, green, cyan, blue, magenta equally spaced on the hue wheel, but instead hues from 0 to 8 with red, orange, yellow, yellow-green, green, cyan, blue, magenta equally spaced. This corresponds more closely to the human brain's color processing, which seems to use a red/green and a blue/yellow axis at right angles, and a luminance axis at mutual right angles to those. As a result, small hue additions can move blue to magenta and red to yellow but not red to green, which is more dissimilar-looking to red than blue is to magenta. Interpolation of colors also uses this new coordinate system: rg, by, lum. The exception is that the UF version still uses ordinary rgb interpolation for the main UF gradient, since UF provides no way to override this.

A consequence of the above is that if you set the first two hues in the parameters to saturated red and green, and the period short, you'll get grey or a very low saturation color instead of yellow in between.

* The four luminance waves use a sine curve instead of a four-segment spline curve and now have added phase parameters, which should be between 0 and 1.

* mw2b.ucl (33.88 KB - downloaded 119 times.)
« Last Edit: June 24, 2012, 08:29:39 AM by Pauldelbrot » Logged

Pharmagician
Explorer
****
Posts: 40


« Reply #4 on: July 03, 2012, 03:46:43 AM »

Just returned from a trip to find this new version!  And many more wonderful images.  Thanks very much!

 joy
Logged
Alef
Fractal Schemer
****
Posts: 1006



WWW
« Reply #5 on: July 05, 2012, 05:14:48 PM »

Nice method, revealing more of fractal than of itself and good image quality. But not an easy one;)

I believe, this colour method was never intended to be used for kalisets. But it works nicely when you set exponent to something about 0.86984 :

Code:
Fractal6 {
fractal:
  title="Fractal6" width=320 height=240 layers=1
  credits="Asdam;7/5/2012"
layer:
  caption="Background" opacity=100 transparent=yes
mapping:
  center=-3.7268749455/0.039999997 magn=0.99505243
formula:
  maxiter=40 percheck=off filename="em.ufm" entry="Kalisetes_Sefirii"
  p_equation="1- kaleido Kaliset j" p_bailout=777000 p_settype=Julia
  p_switchsettype=Mandelbrot p_julia=-0.6/0.76 p_D=1 f_func_post=ident
  p_scale=1/-0.11 p_vectype="z/modulus(z)" p_vfactor=0.04/0.0
inside:
  transfer=linear filename="mw2b.ucl" entry="MandelMultiwave2Beta"
  p_power=0.86984/0 p_c1a=4286733096 p_c2a=4290419046 p_c3a=4294472204
  p_c4a=4283039744 p_hfreq1=530.0 p_c1b=4283248915 p_c2b=4291015555
  p_c3b=4293387031 p_c4b=4293960704 p_c1c=4278208528 p_c2c=4286943872
  p_c3c=4289977416 p_c4c=4294172755 p_c1d=4279768935 p_c2d=4287664035
  p_c3d=4282423744 p_c4d=4280266115 p_c1e=4286060054 p_c2e=4289823106
  p_c3e=4290593092 p_c4e=4280360783 p_hfreq2=5147.0 p_cx=4290723904
  p_cy=4292447372 p_cz=4288086679 p_sfreq=82117.0 p_smode="hsl bias"
  p_spow=4.0 p_rseed=57135488 p_rstart=300000.0 p_rlen=300000.0
  p_rlum=0.2 p_rhvmax=2.0 p_lfreq=17.0 p_lmag=0.2 p_lphase=0.0
  p_lfreq2=94.0 p_lmag2=0.4 p_lphase2=0.2 p_lfreq3=2544.0 p_lmag3=0.6
  p_lphase3=0.8 p_lfreq4=18544.0 p_lmag4=0.6 p_lphase4=0.0
  p_mmode="rgby bias" p_fit=yes p_fittimes=1.5 p_fitminit=1.0
  p_fitmaxit=1000.0 p_transfer=Log p_transpower=3.0 p_bailout=100000.0
  p_displacement=0.0 p_rescale=1.0
outside:
  transfer=linear filename="Standard.ucl" entry="Basic"
  p_type=Iteration
gradient:
  smooth=yes rotation=1 index=0 color=6555392 index=64 color=13331232
  index=168 color=16777197 index=257 color=43775 index=343 color=512
opacity:
  smooth=no index=0 opacity=255
}



But it somewhat harder with this, and well, not so good as previous. I think, with some finetuning this method could alsou be good method to use with kalisets / ducks insides.

Code:
Fractal2 {
fractal:
  title="Fractal2" width=320 height=240 layers=1
  credits="Asdam;7/5/2012"
layer:
  caption="Background" opacity=100 transparent=yes
mapping:
  center=-0.5/0 magn=1
formula:
  maxiter=48 percheck=off filename="em.ufm" entry="Kalisetes_Sefirii"
  p_equation="1- kaleido Kaliset j" p_bailout=777000 p_settype=Julia
  p_switchsettype=Mandelbrot p_julia=-0.35/0.8375 p_D=1.08696
  f_func_post=ident p_scale=1/0 p_vectype=None
  p_vfactor=0.018942/-0.005825
inside:
  transfer=linear filename="mw2b.ucl" entry="MandelMultiwave2Beta"
  p_power=0.87/0 p_c1a=4286733096 p_c2a=4290419046 p_c3a=4294472204
  p_c4a=4283039744 p_hfreq1=530.0 p_c1b=4283248915 p_c2b=4291015555
  p_c3b=4293387031 p_c4b=4293960704 p_c1c=4278208528 p_c2c=4286943872
  p_c3c=4289977416 p_c4c=4294172755 p_c1d=4279768935 p_c2d=4287664035
  p_c3d=4282423744 p_c4d=4280266115 p_c1e=4286060054 p_c2e=4289823106
  p_c3e=4290593092 p_c4e=4280360783 p_hfreq2=5147.0 p_cx=4290723904
  p_cy=4292447372 p_cz=4288086679 p_sfreq=82117.0 p_smode="hsl bias"
  p_spow=4.0 p_rseed=57135488 p_rstart=300000.0 p_rlen=300000.0
  p_rlum=0.2 p_rhvmax=2.0 p_lfreq=17.0 p_lmag=0.2 p_lphase=0.0
  p_lfreq2=94.0 p_lmag2=0.4 p_lphase2=0.2 p_lfreq3=2544.0 p_lmag3=0.6
  p_lphase3=0.8 p_lfreq4=18544.0 p_lmag4=0.6 p_lphase4=0.0
  p_mmode="rgby bias" p_fit=yes p_fittimes=3 p_fitminit=1.0
  p_fitmaxit=1000.0 p_transfer=Log p_transpower=3.0 p_bailout=100000.0
  p_displacement=0.0 p_rescale=1.0
outside:
  transfer=linear filename="Standard.ucl" entry="Default"
gradient:
  smooth=yes rotation=1 index=0 color=6555392 index=64 color=13331232
  index=168 color=16777197 index=257 color=43775 index=343 color=512
opacity:
  smooth=no index=0 opacity=255
}


This method works well with fractmaonk multipowerbrots I uploaded as walbrot.
p.s.
No pics;)
« Last Edit: July 05, 2012, 05:38:40 PM by Asdam » Logged

P.E.A.C.H. - please examine and critique honestly.
LhoghoNurbs
Safarist
******
Posts: 85



WWW
« Reply #6 on: July 05, 2012, 08:25:51 PM »

This coloring merges several waves of colors or varying brightness of different periods into one another ... This scheme is designed to be capable of producing contrast for features at many different scales at the same time.

This reminds me of the fractal antenna, which profile repeats itself at several scales...
Logged
kjknohw
Explorer
****
Posts: 41


« Reply #7 on: September 16, 2012, 08:54:12 PM »

This reminds me of the fractal antenna, which profile repeats itself at several scales...

We have a fractal coloring algorithm for a fractal image. Good work. I have been trying to implement the same idea, but yours seems to get better results.
Logged
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« Reply #8 on: September 16, 2012, 10:03:06 PM »

We have a fractal coloring algorithm for a fractal image. Good work. I have been trying to implement the same idea, but yours seems to get better results.

Thanks.
Logged

panzerboy
Fractal Lover
**
Posts: 209


« Reply #9 on: September 17, 2012, 02:55:44 AM »

Interesting.
I do something similar with multiple renders in Fractal Extreme and layering the results with avisynth or GIMP.
Its a lot more convenient to have the tools right there in your fractal explorer.
Its a lot less convenient to have that fractal explorer re-calculate every time you change a colour or mapping.
Am I missing a setting in UltraFractal with this annoying recalculation?
Or is it crippleware feature?
If I paid for UF would I be able to change colours without the recalculations?
Logged
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« Reply #10 on: September 17, 2012, 03:44:28 AM »

Interesting.
I do something similar with multiple renders in Fractal Extreme and layering the results with avisynth or GIMP.
Its a lot more convenient to have the tools right there in your fractal explorer.
Its a lot less convenient to have that fractal explorer re-calculate every time you change a colour or mapping.
Am I missing a setting in UltraFractal with this annoying recalculation?
Or is it crippleware feature?
If I paid for UF would I be able to change colours without the recalculations?

Unfortunately, no. The friend I have with registered UF tested it and it still recalculates. That happens with all direct-coloring algorithms, apparently.
Logged

panzerboy
Fractal Lover
**
Posts: 209


« Reply #11 on: September 18, 2012, 12:14:34 AM »

I notice the rendering time is a lot longer using the multiwave colouring.
The standard of smooth mandelbrot took about 45 seconds, multiwave was estimated to take 7:50.
I guess there are multiple layers (renders) involved?
Logged
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« Reply #12 on: September 18, 2012, 07:25:40 AM »

I notice the rendering time is a lot longer using the multiwave colouring.
The standard of smooth mandelbrot took about 45 seconds, multiwave was estimated to take 7:50.
I guess there are multiple layers (renders) involved?


That shouldn't be happening. Not if you only use one layer in UF, and the same settings for the various calculation options.

Did you take a regular Mandelbrot with ordinary Smooth (Mandelbrot) coloring, then *only* change the Outside Coloring to MandelMultiwave?
Logged

panzerboy
Fractal Lover
**
Posts: 209


« Reply #13 on: September 19, 2012, 03:04:35 AM »

That shouldn't be happening. Not if you only use one layer in UF, and the same settings for the various calculation options.

Did you take a regular Mandelbrot with ordinary Smooth (Mandelbrot) coloring, then *only* change the Outside Coloring to MandelMultiwave?

For that I had been alternating between standard, smooth and multiwave so I've made a more rigorous analysis.
I kept to the standard gradient at first, changing to multiwave got me a black image so I rotated the gradient.
That's where it gets interesting, the black image was actually quicker than the smooth (mandelbrot) colouring but
the rotated gradient got the worst time.
Then I tried one of my complex all 400 indexes used gradients in case that was causing the problem.
At least this did not give a black image when converting to multiwave.
I guess its all highly dependant on the visible colours.

2:08.16 smooth (mandelbrot)
1:41.4 Multiwave colouriung black image
9:43 gradient rotation -133 multiwave
1:36.77 smooth (mandelbrot)
5:40.82 Multiwave colouring
1:35.86 0 rotation black image
1:34 Smooth (Mandelbrot)

1:59 400-index palette smooth (mandelbrot)
7:15 multiwave (Not a black image this time)
5:17 -133 gradient rotation multiwave
 
If you want to try the image I was using paste the following into your fractal parameters.

mwptst {
fractal:
  title="mwptst" width=640 height=480 layers=1
  credits="Jeremy Thomson;9/19/2012"
layer:
  caption="Background" opacity=100
mapping:
  center=-0.78643771789343857902991165/0.16585435320609372283672185
  magn=5.4451401E15
formula:
  maxiter=500 filename="Standard.ufm" entry="Mandelbrot" p_start=0/0
  p_power=2/0 p_bailout=128
inside:
  transfer=none
outside:
  transfer=linear filename="Standard.ucl" entry="Smooth" p_power=2/0
  p_bailout=128.0
gradient:
  smooth=yes index=63 color=13331232 index=167 color=16777197
  index=256 color=43775 index=342 color=512 index=-1 color=6555392
opacity:
  smooth=no index=0 opacity=255
}
Logged
Pauldelbrot
Fractal Senior
******
Posts: 2547



pderbyshire2
« Reply #14 on: September 19, 2012, 04:48:21 AM »

You're testing it on an image that has very low iterations and is just into arbitrary precision. The second version has a fair amount of math in it, which adds a bit of overhead per pixel. With arbitrary precision this can add a few minutes to the image calculation time. However, it would add the same few minutes if the image was taking hours, with ten thousand iterations typical for the pixels in it, instead of only a minute or so.

The older version has less overhead and gives almost no noticeable time difference.

It doesn't help that your computer is apparently fairly slow. (The times I get on a single box here are half yours.)
Logged

Pages: [1] 2 3   Go Down
  Print  
 
Jump to:  



Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 1.001 seconds with 32 queries. (Pretty URLs adds 0.044s, 2q)