Open CL working like a beauty

  • 36 Replies
  • 1243 Views

0 Members and 1 Guest are viewing this topic.

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« on: December 12, 2019, 11:14:39 PM »
Congratulations!
installed nvidia-cuda-dev in kubuntu 19.10, Compiled mandelbulber2 from latest git with prepare_for_dev_ubuntu.sh
With intel xeon 12x E5-2620 and nvidia Geforce gtx 1060 6GB
The render is about 60 times faster with 'full' opencl compared with no opencl option.

You have made a fantastic work! 

ps. Should mention somewhere that with the option 'fast' opencl does not perform background settings and materials.


Linkback: https://fractalforums.org/mandelbulber/14/open-cl-working-like-a-beauty/3230/
mfg

Offline mclarekin

  • *
  • Fractal Freak
  • **
  • Posts: 784
« Reply #1 on: December 12, 2019, 11:48:13 PM »
Hi Manuel;

"Fast" has no effects or color controls. It is for  exploring shape or doing a quick animation test.
"Medium" has only one material, and no fog etc
"Full" has everthing.

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #2 on: December 13, 2019, 01:53:13 AM »
Brilliant Mclarekin! congrats to all of you who make mandelbulber2 an extraordinary and up to date (bleeding edge) programme!

I wonder if 'wrong percentage estimations' will be implemented in opencl.
As you may recall, this figure is important for scator algebra fractals.

yours,

Offline mclarekin

  • *
  • Fractal Freak
  • **
  • Posts: 784
« Reply #3 on: December 14, 2019, 02:42:07 AM »
Quote
if 'wrong percentage estimations' will be implemented in opencl.
It is on the TODO list to investigate, but apparently it may not be easy to implement

But the scator algebra problem  is more related  to the use of distance estimation versus the "thin bits". 

I have been planning to try  non_DE method,  Trafassel's program gestaltlupe   http://www.gestaltlupe.com/bin/Gestaltlupe-3-5.zip
« Last Edit: December 14, 2019, 02:53:47 AM by mclarekin »

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #4 on: December 27, 2019, 05:48:52 AM »
Thank you for your kind replies.

There may be a small bug, see what you think:
I render the same fractal with opencl and without opencl. With opencl I get a dark brown area on the left that should not be there.
The .fract settings for each image are in the zip file.

yours,

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #5 on: December 27, 2019, 05:51:59 AM »
Two questions:
1 Please remind me how to modify the colours on the surface of a slice (not the fractal surface)
2 long time ago you told me what the colouring on the slice meant, or how it is performed. Can you tell me again please?

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #6 on: December 28, 2019, 01:58:12 AM »
I just had a look at the source files. Let me comment compute_fractal.cpp

in compute_fractal.cpp line 225 and thereafter, the distance 'r' is correct for imaginary scator algebra but not for real scator algebra. (my comments in green). I shall be most grateful if you correct the code.

      switch (fractal->formula)
      {
         case scatorPower2:               // add v2.15
         case scatorPower2Real:         // add v2.15
         case scatorPower2Imaginary: // corrected v2.14
            // case testingLog:
            {
               CVector4 z2 = z * z;
               r = sqrt(z2.x + z2.y + z2.z + (z2.y * z2.z) / z2.x);   this is correct for imaginary scators
               // initial condition is normal r, becomes aux.r

               // r = sqrt(z2.x - z2.y - z2.z + (z2.y * z2.z) / (z2.x)); this should be used for real scators
               break;
            }
         // scator magnitudes
         // magnitude in imaginary scator algebra

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #7 on: December 28, 2019, 02:49:15 AM »
Let me comment fractal_formulas.cpp
In fractal_formulas.cpp line 10484 imaginary scator algebra quadratic mapping is stated
In fractal_formulas.cpp line 10511 real scator algebra quadratic mapping is stated
In fractal_formulas.cpp line 10535 both algebras are dealt with. However, notice that for each of them a different r will be required as mentioned in the previous post. I suggest to keep them independent because each of them give rise to a different topology.
--------------------------
I notice that for example 'mandelbulber' fractal has 'Don't add global C constant' not enabled by default.
For scators the option reads 'Add global C constant' and should be enabled by default. (not disabled)
I suggest that the C constant is enabled as default either with 'Don't add' disabled or 'Add' enabled for scators, so that the confined set is obtained as default.
-------------------------
      Thank you in advance,

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #8 on: December 28, 2019, 04:36:58 AM »
One more query.

How would you like to see your program  cited in a scientific publication?

Offline mclarekin

  • *
  • Fractal Freak
  • **
  • Posts: 784
« Reply #9 on: December 28, 2019, 04:40:54 AM »
I will change the add global c to default

Offline mclarekin

  • *
  • Fractal Freak
  • **
  • Posts: 784
« Reply #10 on: December 28, 2019, 05:06:18 AM »
the compute_fractal cpp has been changed in dev v2.21 to speed up the main loop.

the r calculation is now in the formula code for "scator power 2", i can add the option of :

 "r = sqrt(z2.x - z2.y - z2.z + (z2.y * z2.z) / (z2.x)); this should be used for real scators"

but from memory, when i last tried it it did not work very well.


The r calculation is used for two things
a) bailout check. This is to save calculations ie any point that goes outside this radius is assumed to not belong to the set (unlikely to return when iterated) and not really required when using Maximum Iterations
b) for analytic DE calculations. (not required when using DeltaDE ie "Scator Power 2 Real"  and "Scator Power 2 Imaginary" formulas)

I have had one attempt of coding scator in Gestaltlupe-3-5 program, but could not get it work (yet)


Offline mclarekin

  • *
  • Fractal Freak
  • **
  • Posts: 784
« Reply #11 on: December 28, 2019, 05:16:15 AM »
I will have a look at bug zip, but  the difference may be due to single versus double precision floating point'

the standard coloring function is based on  the minimum distance the point gets to the origin during the iterations

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #12 on: December 29, 2019, 03:20:03 AM »
I will change the add global c to default

excellent, thank you.

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #13 on: December 29, 2019, 03:30:09 AM »
the compute_fractal cpp has been changed in dev v2.21 to speed up the main loop.

the r calculation is now in the formula code for "scator power 2", i can add the option of :

 "r = sqrt(z2.x - z2.y - z2.z + (z2.y * z2.z) / (z2.x)); this should be used for real scators"

but from memory, when i last tried it it did not work very well.


The r calculation is used for two things
a) bailout check. This is to save calculations ie any point that goes outside this radius is assumed to not belong to the set (unlikely to return when iterated) and not really required when using Maximum Iterations
b) for analytic DE calculations. (not required when using DeltaDE ie "Scator Power 2 Real"  and "Scator Power 2 Imaginary" formulas)

I have had one attempt of coding scator in Gestaltlupe-3-5 program, but could not get it work (yet)

The real scator magnitude is not necessarily positive definite and that has creates some difficulties. Nonetheless it is the one that should be used. This metric is in a sense, similar to the relativistic metric that is not positive definite and thus has spacelike, timelike and lightlike events.

 Regarding Gestaltlupe, it was the programme I used before yours. A rendering is shown in a previous publication:
 "Imaginary Scators Bound Set Under The Iterated Quadratic Mapping In 1+2 Dimensional Parameter Space."
In: Int. J. of Bifurcation and Chaos 26, No. 1, p. 1630002.
https://luz.izt.uam.mx/mfg/arti/16-20/frac-imsca-intro-ijbc-7final.pdf.

The code I used in fractrace can be found in:
https://luz.izt.uam.mx/drupal/node/19

However, I now feel more comfortable using mandelbulber.

Offline mfg

  • *
  • Fractal Fanatic
  • ***
  • Posts: 20
    • servidor de luz
« Reply #14 on: December 29, 2019, 03:44:21 AM »
I will have a look at bug zip, but  the difference may be due to single versus double precision floating point'

the standard coloring function is based on  the minimum distance the point gets to the origin during the iterations

Thank you for your reply regarding the coloring function. Precise answer, very useful.

I usually modify this coloring in: material surface -> surface color -> color speed.
But I wonder whether there a way that this can be modified independently in the surfaces that are exposed when the bounding box 'cuts ' the fractal volume?


xx
Open CL not working with AMD pro drivers/ cards

Started by Dievolve on Mandelbulber

3 Replies
436 Views
Last post October 08, 2019, 02:01:46 PM
by R-TEAM
xx
version 2.17: open cl working gtx 1080 with hitches (linux)

Started by JerryS on Mandelbulber

1 Replies
302 Views
Last post April 27, 2019, 06:03:42 AM
by mclarekin
xx
The beauty of self-similarity

Started by Nintendokater on Fractal Image Gallery

2 Replies
246 Views
Last post August 19, 2020, 07:45:46 PM
by Caleidoscope
xx
Another way to see the inner beauty of fractals

Started by kohlenstoff on Fractal movie gallery

0 Replies
225 Views
Last post August 28, 2018, 11:12:37 PM
by kohlenstoff
xx
Into The Beauty - Mandelbrot Set Zoom vs Julia Set

Started by mfcc64 on Fractal movie gallery

8 Replies
257 Views
Last post October 15, 2020, 08:48:36 PM
by Adam Majewski