• November 28, 2021, 03:11:22 AM

Author Topic:  ColorTrial 2018  (Read 997 times)

0 Members and 1 Guest are viewing this topic.

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
ColorTrial 2018
« on: January 24, 2018, 07:38:28 AM »
I have recently revisited my colorTrials. I  will soon replace colourMcL2018, with a few smaller versions specific to learning and coding your own color.

The FragColorTrial_2018 is just a abox/asurf formula set up to use #include "DE-Kn2Colour.frag" (thanks sabine) and a #include some color code

//#include "DE-Raytracer.frag"
#include "DE-Kn2Colour.frag"
#include "MathUtils.frag"
#include "colourMcL2018.frag"
#group Abox

The additionional #include "some color code" can be retrofitted to other .frags by added this code before bailout and replacing p3, c3 and Dd with what ever is used in the code., i.e. :

      // this is matching formula names with names used in colourMcl
      vec3 Z = p3;   // ( or z or p or  vec3 ??)
      vec3 Cc = c3;  // ( c original point
      float deZ = Dd;  // running DE calc value)
      float RR = dot(Z, Z);

      ColorTrialMode(Z, Cc, deZ, RR, i); // this returns orbitTrap, orbitTrap2;  (i.e. default coloring, new color trial)
      
     if ( rr>Bailout)

In this update I have only optimised the structure a bit as I am still trying to remember what it was all about:) Next  relook at the coloring functions individually

Linkback: https://fractalforums.org/index.php?topic=758.0

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #1 on: January 26, 2018, 12:07:35 PM »
This trial is only using original point for the coloring. It is placed outside of the iteration loop so it is very fast, but also limited in its functions. Colors derived from these functions and tools  can be blended with the color obtained from the default color tab.

For the basic functions, a distance of 1 along the palette equals  a distance of 1 in the fractal maths and image. That means that in default conditions,  color1 will be seen at a distance of 1 from the origin if coded correctly.

The formula frag is M.Benesi's pinetree frag from example folder. With initial i redefined as 0, and the colorTrial added/implemented.  These color controls using the original point do not work well with bulbs, they are more suitable for IFS abox/surf klieinan boxbulbs.

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #2 on: January 29, 2018, 05:09:52 AM »
as always, ignore any earlier files, the structure  has now been simplified even more for PartA - the simple coloring using original point. The example frag this time is an asurf colored by depth

The coloring algorithms and the palatte algorithms are now in separate #include frags, which will make it easier to code new  coloring functions

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #3 on: February 01, 2018, 08:29:22 AM »
I have optimized the palette code a bit and got the cos transitions working. That finishes the "color from original point" code. I just found "The Book of Shaders", which has a lot of cool stuff that could be implemented in the palette frag.  The color algorthms can be edited to implement all kinds of conditional colorings for specific fractal images.

This example is Knighty's Menger Sphere

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #4 on: February 02, 2018, 11:30:23 PM »
I have added a colorTransition with a variable parameter. Transitioning options between the six colors, that make up the palette, range between default linear (smooth linear transition) to using Round option where there is no transition.

cos transition accentuates the 6 colors in the palette just a bit

parab transition is similar to cos ; i have commented it out ( /* some lines */ ) in this frag

circ transition ranges between linear and  almost to the Round option, but has more code = slower.

The idea is to choose your transition, then comment out the rest so it does not get compiled.


Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #5 on: February 05, 2018, 05:24:29 AM »
I added a checkbox in my formula frag to easily disconnect the "original point color code" to ascertain its cost.

   float ColorValue = 0.0;
   if (ColorEnabled)
   {
      ColorTrialOrigPt(pos, ColorValue);

      ColorTrialOrigPalette( pos, ColorValue);

The results are horrible, the extra render time when enabled can be double, even though in is only being run once for each point. I suspect that it is the palette code.

So in summary: more work is required to try and speed things up, and it is also likely that a user would still need to be familar with editing the code to minimize render time.  I stop for now and get back to working on Mandelbulberv2






Offline CJR

  • Fractal Friend
  • **
  • Posts: 18
    • dA
Re: ColorTrial 2018
« Reply #6 on: February 24, 2018, 04:31:12 PM »
That's great!  :thumbs: thank you for fragments, just played a little. Very niiice  :yes:

Offline mclarekin

  • Moderator
  • ******
  • Posts: 892
Re: ColorTrial 2018
« Reply #7 on: March 30, 2018, 01:59:39 AM »
@ CJR.  The concepts are fun,  and I can code/test these things much more easily in FragM.  I have just finished implementing some of these things in Mandelbulber, but it is like everthingelse  to do with fractals - infinite possibilities , so I have only implemented some basic things.

We have also added the option for orbit trap coloring functions to include 'w"  when using pseudo 4D fractals (initial w seed), but have yet to find anything real cool. :)


xx
colorTrial Knighty's menger sphere

Started by mclarekin on Fractal Image Gallery

0 Replies
269 Views
Last post February 01, 2018, 08:32:27 AM
by mclarekin
xx
Untitled (May 20, 2018)

Started by Holocene on Fractal Image Gallery

0 Replies
167 Views
Last post May 22, 2018, 01:52:13 AM
by Holocene
xx
Untitled (May 28, 2018)

Started by Holocene on Fractal Image Gallery

0 Replies
172 Views
Last post May 29, 2018, 09:43:16 PM
by Holocene
xx
Untitled (Aug. 15, 2018)

Started by Holocene on Fractal Image Gallery

0 Replies
170 Views
Last post August 15, 2018, 04:57:24 PM
by Holocene
xx
Untitled (Feb 12 2018)

Started by Holocene on Fractal Image Gallery

0 Replies
188 Views
Last post March 15, 2018, 09:18:10 PM
by Holocene