BURT 3D

  • 19 Replies
  • 154 Views

0 Members and 1 Guest are viewing this topic.

Offline Sabine62

  • *
  • Moderator
  • ******
  • Posts: 662
  • It's just a jump to the left...
    • sabine62.deviantart.com
« on: May 29, 2019, 12:47:28 AM »
Just a quick and very, Very probably nonsensical reply (sheesh, I  seem to be good at those... :embarrass: :)) ) with an attempt on bulbifying zn+1=-zn3+zn2+zn1+0

Stole all from the beautiful mandelbulb distance estimator used in Syntopia's mandelbulb.frag  :worship:

Code: [Select]
#group Mandelbulb

// Number of fractal iterations.
uniform int Iterations;  slider[0,9,100]

// Number of color iterations.
uniform int ColorIterations;  slider[0,9,100]

// Mandelbulb exponent (8 is standard)
uniform float Power; slider[0,8,16]

// Bailout radius
uniform float Bailout; slider[0,5,30]

// Alternate is slightly different, but looks more like a Mandelbrot for Power=2
uniform bool AlternateVersion; checkbox[false]

uniform vec3 RotVector; slider[(-180,-180,-180),(0,0,0),(180,180,180)]
uniform float RotAngle; slider[0.00,0,180]

uniform bool Julia; checkbox[false]
uniform vec3 JuliaC; slider[(-2,-2,-2),(0,0,0),(2,2,2)]




mat3 rot;
void init() {
rot = rotationMatrixXYZ(RotVector);
}
vec3 powN3(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  pow( r, 3.-1.0)*3.*dr + 1.0;

// scale and rotate the point
float zr = pow( r,3.);
theta = theta*3.;
phi = phi*3.;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z3=z;
return z3;
}
vec3 powN2(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  pow( r, 2.-1.0)*2.*dr + 1.0;

// scale and rotate the point
float zr = pow( r,2.);
theta = theta*2.;
phi = phi*2.;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z2=z;
return z2;
}
vec3 powN1(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  dr + 1.0;

// scale and rotate the point
float zr = r;
theta = theta;
phi = phi;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z1=z;
return z1;
}

float DE(vec3 pos) {
vec3 z=pos;
float r;
float dr=1.0;
int i=0;
r=length(z);

vec3 z1,z2,z3;
vec3 zorg3=z;
vec3 zorg2=z;
vec3 zorg1=z;
while(r<Bailout && (i<Iterations)) {

zorg3=z;
zorg2=z;
zorg1=z;
powN3(zorg3,r,dr);
z3=zorg3;
powN2(zorg2,r,dr);
z2=zorg2;
powN1(zorg1,r,dr);
z1=zorg1;
z=-z3+z2+z1;
z+=(Julia ? JuliaC : pos);

r=length(z);
z*=rot;
if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(z.x,z.y,z.z,r*r)));
i++;
}
// if ((type==1) && r<Bailout) return 0.0;
return 0.5*log(r)*r/dr;

}

Gotta admit that Burt got dainty legs...  :tease:

Linkback: https://fractalforums.org/code-snippets-fragments/74/burt-3d/2861/
« Last Edit: May 29, 2019, 01:17:18 AM by Sabine62 »
To thine own self be true

Offline LionHeart

  • *
  • Uploader
  • *
  • Posts: 69
    • ManpWIN Fractal Generator
« Reply #1 on: May 29, 2019, 01:15:07 AM »
Wow Sabine62,

Well done. I'm still stuck in 2D space. There's so much more to explore...and only one lifetime to do it in! sigh!
Paul the LionHeart

Offline Sabine62

  • *
  • Moderator
  • ******
  • Posts: 662
  • It's just a jump to the left...
    • sabine62.deviantart.com
« Reply #2 on: May 29, 2019, 01:24:00 AM »
Thanks a lot Lionheart! :)
Though basically I am just stealing routines which others  :worship: build by putting in all the hard work and which I have absolutely No skills for, and I am just throwing them together in the hope that they'll produce something not too silly  :embarrass:

There is beauty in every dimension  :yes:

And I know what you mean... time flies etc ;)



Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #3 on: May 29, 2019, 04:31:03 AM »
you're amazing Sabine!

Burt has dainty legs... and a smile!

another bulb for the collection  :horsie:
Fragmentarium is not a toy, it is a very versatile tool that can be used to make toys ;)

https://en.wikibooks.org/wiki/Fractals/fragmentarium

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #4 on: May 29, 2019, 04:52:37 AM »
must be a split personality ???

Offline Sabine62

  • *
  • Moderator
  • ******
  • Posts: 662
  • It's just a jump to the left...
    • sabine62.deviantart.com
« Reply #5 on: May 29, 2019, 11:05:08 AM »
Oh no, Burt's gone all blobby >:D

Here's all of the code, though you might need to do some twiddling for the raytracer. Also, it's a heavy frag, lots of Detail needed. Haven't optimized anything...  :embarrass:

Code: [Select]
// Output generated from file: D:/fractal/Fragmentarium/Output/3dickulus/BURT/Burt-10_Files/Burt-10.frag
// Created: Wed May 29 11:39:35 2019

#info 3Dickulus' Burt's bisector
#info https://fractalforums.org/fractal-mathematics-and-new-theories/28/is-there-a-name-for-this-fractal/2748/msg13925#msg13925

#info Mandelbulb Distance Estimator

#define providesColor
#define providesInit
//#define WANG_HASH
#include "MathUtils.frag"
//#include "DE-Raytracer.frag"
//#define USE_IQ_CLOUDS
#define KN_VOLUMETRIC
#define USE_EIFFIE_SHADOW
#define MULTI_SAMPLE_AO
//uniform float time;
#include "DE-Kn2cr11.frag"
#group Mandelbulb

// Number of fractal iterations.
uniform int Iterations;  slider[0,9,100]

// Number of color iterations.
uniform int ColorIterations;  slider[0,9,100]

// Mandelbulb exponent (8 is standard)
uniform float Power; slider[0,8,16]

// Bailout radius
uniform float Bailout; slider[0,5,30]

// Alternate is slightly different, but looks more like a Mandelbrot for Power=2
uniform bool AlternateVersion; checkbox[false]

uniform vec3 RotVector; slider[(-180,-180,-180),(0,0,0),(180,180,180)]
//uniform float RotAngle; slider[0.00,0,180]

uniform bool Julia; checkbox[false]
uniform vec3 JuliaC; slider[(-2,-2,-2),(0,0,0),(2,2,2)]

#group Coloring
uniform vec3 LVI; slider[(-1,-1,-1),(0,0,0),(1,1,1)]
uniform int LightIter; slider[0,1,100]
uniform bool RevertDiv; checkbox[false]
uniform bool AddOrbitStrength; checkbox[false]
vec3 lightold;
vec3 lightnew;

vec3 baseColor(vec3 p, vec3 q){
if (RevertDiv) {q=abs(lightnew/lightold);} else {q=abs(lightold/lightnew);};
q*=(LVI);
if (AddOrbitStrength) q+=OrbitStrength;
   return q;
}

mat3 rot;
void init() {
rot = rotationMatrixXYZ(RotVector);
}
vec3 powN3(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  pow( r, 3.-1.0)*3.*dr + 1.0;

// scale and rotate the point
float zr = pow( r,3.);
theta = theta*3.;
phi = phi*3.;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z3=z;
return z3;
}
vec3 powN2(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  pow( r, 2.-1.0)*2.*dr + 1.0;

// scale and rotate the point
float zr = pow( r,2.);
theta = theta*2.;
phi = phi*2.;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z2=z;
return z2;
}
vec3 powN1(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  dr + 1.0;

// scale and rotate the point
float zr = r;
theta = theta;
phi = phi;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
vec3 z1=z;
return z1;
}

float DE(vec3 pos) {
vec3 z=pos;
float r;
float dr=1.0;
int i=0;
r=length(z);
lightnew=z;
lightold=z;
vec3 z1,z2,z3;
vec3 zorg3=z;
vec3 zorg2=z;
vec3 zorg1=z;
while(r<Bailout && (i<Iterations)) {
if (i<LightIter) {lightold=z;} else {lightold=lightold;};
zorg3=z;
zorg2=z;
zorg1=z;
powN3(zorg3,r,dr);
z3=zorg3;
powN2(zorg2,r,dr);
z2=zorg2;
powN1(zorg1,r,dr);
z1=zorg1;
z=-z3+z2+z1;
z+=(Julia ? JuliaC : pos);

r=length(z);
z*=rot;
if (i<LightIter) {lightnew=z;} else {lightnew=lightnew;};
if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(z.x,z.y,z.z,r*r)));
i++;
}

return 0.5*log(r)*r/dr;

}








#preset Default
FOV = 0.4
Eye = -4.93414688,0.170459077,-0.519256651
Target = 0.60485363,0.081526406,0.222227797
Up = 0,0,-0.901705742
EquiRectangular = false
AutoFocus = false
FocalPlane = 4.87878819
Aperture = 0
InFocusAWidth = 0.644752018
DofCorrect = true
ApertureNbrSides = 7
ApertureRot = 0
ApStarShaped = false
Gamma = 1
ToneMapping = 5
Exposure = 1
Brightness = 1
Contrast = 1
Saturation = 1
Hue = 0.001096491
GaussianWeight = 1
AntiAliasScale = 2
LensFlare = false
FlareIntensity = 0.25
FlareSamples = 8
FlareDispersal = 0.25
FlareHaloWidth = 0.5
FlareDistortion = 1
Bloom = false
BloomIntensity = 0
BloomPow = 2
BloomTaps = 4
BloomStrong = 1
DepthToAlpha = false
ShowDepth = false
DepthMagnitude = 1
Detail = -4.5
RefineSteps = 4
FudgeFactor = 0.279863481
MaxRaySteps = 5385
MaxDistance = 78.9779322
Dither = 0
NormalBackStep = 1
DetailAO = -0.848017619
coneApertureAO = 0.5
maxIterAO = 10
FudgeAO = 0.136413641
AO_ambient = 0.7
AO_camlight = 1
AO_pointlight = 1
AoCorrect = 0
Specular = 0.90131579
SpecularExp = 152.887882
CamLight = 1,0.925490201,0.850980401,0.202830188
AmbiantLight = 0.831372619,0.952941179,1,0.200000003
Reflection = 0.200000003,0.200000003,0.200000003
ReflectionsNumber = 1
SpotGlow = true
SpotLight = 1,0.952941179,0.905882418,1.09622413
LightPos = -7.23981895,-1.5837105,-3.8461538
LightSize = 0
LightFallOff = 0
LightGlowRad = 0
LightGlowExp = 1
HardShadow = 0.61774744
ShadowSoft = 18.1506849
ShadowBlur = 0
perf = false
SSS = false
sss1 = 0.1
sss2 = 0.5
BaseColor = 1,1,1
OrbitStrength = 0.567567567
X = 0.5,0.600000024,0.600000024,0.699999988
Y = 1,0.600000024,0,0.656682028
Z = 0.800000012,0.779999971,1,0.767281106
R = 0.400000006,0.699999988,1,0.474048443
BackgroundColor = 0.776470602,0.945097983,0.996078372
GradientBackground = 3.59393232
CycleColors = true
Cycles = 3.0953488
EnableFloor = true
FloorNormal = 0,0,1
FloorHeight = 2.01349832
FloorColor = 1,0.843137264,0.521568656
HF_Fallof = 0.050774298
HF_Const = 0
HF_Intensity = 0.01594533
HF_Dir = 0,0,1
HF_Offset = 0
HF_Color = 0.00392156886,0.984313726,1,0.953237409
HF_Scatter = 0.068181818
HF_Anisotropy = 0.403921574,0.215686277,0.0313725509
HF_FogIter = 1
HF_CastShadow = false
EnCloudsDir = false
CloudDir = 0,0,1
CloudScale = 1
CloudFlatness = 0
CloudTops = -1.29545454
CloudBase = -4.13636364
CloudDensity = 1
CloudRoughness = 1
CloudContrast = 1
CloudColor = 0.649999976,0.680000007,0.699999988
CloudColor2 = 0.0700000003,0.170000002,0.239999995
SunLightColor = 0.699999988,0.5,0.300000012
Cloudvar1 = 0.99
Cloudvar2 = 1
CloudIter = 5
CloudBgMix = 1
WindDir = 0,0,1
WindSpeed = 1
Iterations = 10
ColorIterations = 9
Power = 8
Bailout = 2
AlternateVersion = false
RotVector = 0,0,0
Julia = true
JuliaC = 0,0,0
LVI = 0.420704845,0.129955947,0.224669604
LightIter = 6
RevertDiv = true
AddOrbitStrength = false
#endpreset



« Last Edit: May 29, 2019, 11:42:14 AM by Sabine62, Reason: a bit less heavy code »

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 594
« Reply #6 on: May 29, 2019, 11:34:12 AM »
Here is me messing around with that code. It is so robust that it still makes reasonable quality DE no matter how many mistakes I made :) .  I  commented out  the "weights" i coded, because compiling slowed down on my laptop. There is all kinds of possibilities with series and parallel thingies

Offline Sabine62

  • *
  • Moderator
  • ******
  • Posts: 662
  • It's just a jump to the left...
    • sabine62.deviantart.com
« Reply #7 on: May 29, 2019, 12:17:32 PM »
Ohh, new Toyyyyyy!  :yes:
Thank you, mclarekin!  :thumbs: :thumbs: :thumbs:
Nice approach, will have to have a much closer look at it asap!

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #8 on: May 30, 2019, 02:34:49 AM »
ahhh that looks much better, a lot less grumpy than mine ;)

Interesting technique Sabine, brute force now optimize later, hmmm I've heard that somewhere before  :confused:

I would have called powN() func 3 times ( because z and dr are inout vars ) reducing the power value each time starting at 3 and using negative sign on the first one.
 zn+1= - zn3+zn2+zn1 + C

original code from Historical 3D Fractals -> Mandelbulb.frag with mermelada's tweak...
Code: [Select]
// This is my power function, based on the standard spherical coordinates as defined here:
// http://en.wikipedia.org/wiki/Spherical_coordinate_system
//
// It seems to be similar to the one Quilez uses:
// http://www.iquilezles.org/www/articles/mandelbulb/mandelbulb.htm
//
// Notice the north and south poles are different here.
void powN1(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
// dr =  pow( r, Power-1.0)*Power*dr + 1.0;
// mermelada's tweak
// http://www.fractalforums.com/new-theories-and-research/error-estimation-of-distance-estimators/msg102670/?topicseen#msg102670
  dr =  max(dr*DerivativeBias,pow( r, Power-1.0)*Power*dr + 1.0);

// scale and rotate the point
float zr = pow( r,Power);
theta = theta*Power;
phi = phi*Power;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));
}

something like this... (untested)
Code: [Select]
...
z1 =  z*-1;
z2 = z;
z3 = z;
while(r<Bailout && (i<Iterations)) {
...
Power = 3.0;
powN1(z1,r,dr);
Power = 2.0;
powN1(z2,r,dr);
Power = 1.0;
powN1(z3,r,dr);

z = z1+z2+z3;
z1 =  z*-1;
z2 = z;
z3 = z;
...
i++;
}

edit: original powN1() code is by Syntopia (or whoever wrote Historical 3D Fractals -> Mandelbulb.frag as it's not signed by the author) except for mermelada's tweak obv
« Last Edit: May 30, 2019, 03:06:17 AM by 3DickUlus »

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 594
« Reply #9 on: May 30, 2019, 03:58:37 AM »
messing around some more (not optimised)

sine - atan2 version (better?)

Generally I find mixing pos int powers only, or neg int powers only, is best

Most of the time  I am creating too much stretching = loss of detail

And then there are all the abs() variations

I have weights active this time so    zn+1= - zn3+zn2+zn1 + C  is a  -1 weight on zn3

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #10 on: May 30, 2019, 05:20:00 AM »
awesome that some math heads are playing with this  :thumbs:  my fancifull idea (above) fails badly, at least the way I typed it in :(

edit:@mclarekin ahhh, I see said the blind man...
« Last Edit: May 30, 2019, 05:40:07 AM by 3DickUlus »

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #11 on: May 30, 2019, 06:57:03 AM »
Ok! Thank you Sabine!!!!  I modified yours to look like what I had in mind and it works! only one powN() function...
Code: [Select]
#info Burt's bisector bulb
#info https://fractalforums.org/fractal-mathematics-and-new-theories/28/is-there-a-name-for-this-fractal/2748/msg13925#msg13925

#info Bulb Distance Estimator

#define providesColor
#define providesInit
//#define WANG_HASH
#include "MathUtils.frag"
//#define USE_IQ_CLOUDS
#define KN_VOLUMETRIC
#define USE_EIFFIE_SHADOW
#define MULTI_SAMPLE_AO
//uniform float time;
#include "DE-Kn2cr11.frag"
#group Burt's Bisector Bulb

// Number of fractal iterations.
uniform int Iterations;  slider[0,9,100]

// Number of color iterations.
uniform int ColorIterations;  slider[0,9,100]

// Mandelbulb exponent (8 is standard)
uniform float Power; slider[0,8,16]

// Bailout radius
uniform float Bailout; slider[0,5,30]

// Alternate is slightly different, but looks more like a Mandelbrot for Power=2
uniform bool AlternateVersion; checkbox[false]

uniform vec3 RotVector; slider[(-180,-180,-180),(0,0,0),(180,180,180)]
//uniform float RotAngle; slider[0.00,0,180]

uniform bool Julia; checkbox[false]
uniform vec3 JuliaC; slider[(-2,-2,-2),(0,0,0),(2,2,2)]

#group Coloring
uniform vec3 LVI; slider[(-1,-1,-1),(0,0,0),(1,1,1)]
uniform int LightIter; slider[0,1,100]
uniform bool RevertDiv; checkbox[false]
uniform bool AddOrbitStrength; checkbox[false]
vec3 lightold;
vec3 lightnew;

vec3 baseColor(vec3 p, vec3 q){
if (RevertDiv) {q=abs(lightnew/lightold);} else {q=abs(lightold/lightnew);};
q*=(LVI);
if (AddOrbitStrength) q+=OrbitStrength;
   return q;
}

mat3 rot;
void init() {
rot = rotationMatrixXYZ(RotVector);
}

float power = Power;

void powN(inout vec3 z, float r, inout float dr) {
// extract polar coordinates
float theta = acos(z.z/r);
float phi = atan(z.y,z.x);
dr =  pow( r, power-1.0)*power*dr + 1.0;

// scale and rotate the point
float zr = pow( r,power);
theta = theta*power;
phi = phi*power;

// convert back to cartesian coordinates
z = zr*vec3(sin(theta)*cos(phi), sin(phi)*sin(theta), cos(theta));

}

float DE(vec3 pos) {
vec3 z=pos;
float r;
float dr=1.0;
int i=0;
r=length(z);
lightnew=z;
lightold=z;
vec3 z3=-z;
vec3 z2=z;
vec3 z1=z;

while(r<Bailout && (i<Iterations)) {

if (i<LightIter) lightold=z; else lightold=lightold;

power = Power+3.;
powN(z3,r,dr);
power = Power+2.;
powN(z2,r,dr);
power = Power+1.;
powN(z1,r,dr);

z=z3+z2+z1;

z+=(Julia ? JuliaC : pos);

z3=-z;
z2=z;
z1=z;

r=length(z);
z*=rot;
if (i<LightIter) lightnew=z; else lightnew=lightnew;
if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(z.x,z.y,z.z,r*r)));
i++;
}

return 0.5*log(r)*r/dr;

}

#preset Default
FOV = 0.4
Eye = -4.93414688,0.170459077,-0.519256651
Target = 0.60485363,0.081526406,0.222227797
Up = 0,0,-0.901705742
EquiRectangular = false
AutoFocus = false
FocalPlane = 4.87878819
Aperture = 0
InFocusAWidth = 0.644752018
DofCorrect = true
ApertureNbrSides = 7
ApertureRot = 0
ApStarShaped = false
Gamma = 1
ToneMapping = 5
Exposure = 1
Brightness = 1
Contrast = 1
Saturation = 1
Hue = 0.001096491
GaussianWeight = 1
AntiAliasScale = 2
Bloom = false
BloomIntensity = 0
BloomPow = 2
BloomTaps = 4
BloomStrong = 1
DepthToAlpha = false
ShowDepth = false
DepthMagnitude = 1
Detail = -4.5
RefineSteps = 4
FudgeFactor = 0.279863481
MaxRaySteps = 5385
MaxDistance = 78.9779322
Dither = 0
NormalBackStep = 1
DetailAO = -0.848017619
coneApertureAO = 0.5
maxIterAO = 10
FudgeAO = 0.136413641
AO_ambient = 0.7
AO_camlight = 1
AO_pointlight = 1
AoCorrect = 0
Specular = 0.90131579
SpecularExp = 152.887882
CamLight = 1,0.925490201,0.850980401,0.202830188
AmbiantLight = 0.831372619,0.952941179,1,0.200000003
Reflection = 0.200000003,0.200000003,0.200000003
ReflectionsNumber = 1
SpotGlow = true
SpotLight = 1,0.952941179,0.905882418,1.09622413
LightPos = -7.23981895,-1.5837105,-3.8461538
LightSize = 0
LightFallOff = 0
LightGlowRad = 0
LightGlowExp = 1
HardShadow = 0.61774744
ShadowSoft = 18.1506849
ShadowBlur = 0
perf = false
SSS = false
sss1 = 0.1
sss2 = 0.5
BaseColor = 1,1,1
OrbitStrength = 0.567567567
X = 0.5,0.600000024,0.600000024,0.699999988
Y = 1,0.600000024,0,0.656682028
Z = 0.800000012,0.779999971,1,0.767281106
R = 0.400000006,0.699999988,1,0.474048443
BackgroundColor = 0.776470602,0.945097983,0.996078372
GradientBackground = 3.59393232
CycleColors = true
Cycles = 3.0953488
EnableFloor = true
FloorNormal = 0,0,1
FloorHeight = 2.01349832
FloorColor = 1,0.843137264,0.521568656
HF_Fallof = 0.050774298
HF_Const = 0
HF_Intensity = 0.01594533
HF_Dir = 0,0,1
HF_Offset = 0
HF_Color = 0.00392156886,0.984313726,1,0.953237409
HF_Scatter = 0.068181818
HF_Anisotropy = 0.403921574,0.215686277,0.0313725509
HF_FogIter = 1
HF_CastShadow = false
EnCloudsDir = false
CloudDir = 0,0,1
CloudScale = 1
CloudFlatness = 0
CloudTops = -1.29545454
CloudBase = -4.13636364
CloudDensity = 1
CloudRoughness = 1
CloudContrast = 1
CloudColor = 0.649999976,0.680000007,0.699999988
CloudColor2 = 0.0700000003,0.170000002,0.239999995
SunLightColor = 0.699999988,0.5,0.300000012
Cloudvar1 = 0.99
Cloudvar2 = 1
CloudIter = 5
CloudBgMix = 1
WindDir = 0,0,1
WindSpeed = 1
Iterations = 10
ColorIterations = 9
Power = 0
Bailout = 2
AlternateVersion = false
RotVector = 0,0,0
Julia = true
JuliaC = 0,0,0
LVI = 0.420704845,0.129955947,0.224669604
LightIter = 6
RevertDiv = true
AddOrbitStrength = false
#endpreset


I will add this to the FragM base soon thanks again Sabi and mclarekin  :joy: :clapping: :worship:
« Last Edit: June 01, 2019, 08:47:26 PM by 3DickUlus »

Offline mclarekin

  • *
  • Fractal Frankfurter
  • *
  • Posts: 594
« Reply #12 on: May 30, 2019, 11:46:44 AM »
I have deviated away from the original post, but i like how it turned out.
This is the semi-optimised version ( previous versions should be ignored.)

I noticed I was repeating the  conversion to polar, so now it is done once and used for all powers,
asine atan2 works better than my previous acos atan

What I find cool is that if UI is reset, (no add julia or cpixel), powers 2,3,4 used singularly will produce the base spheres, but if you enable two of these spheres you do not get a sphere :)



Offline Sabine62

  • *
  • Moderator
  • ******
  • Posts: 662
  • It's just a jump to the left...
    • sabine62.deviantart.com
« Reply #13 on: May 30, 2019, 12:12:34 PM »
@3Dickulus Beautiful! This is much much better! Very elegantly done  :thumbs:

1 thing: the rotation z*=rot; needs to come right after the Julia, otherwise all that gets rotated is the colour...  ;)
And I am sooo happy because now I finally know how to do that  ;D

Also: can we also have mclarekins version in FragM, please? Mine (which is now yours!) only handles a bailout of 2, and of course mclarekin had added lots of goodies.. :)

@mclarekin I just had time to look at your previous version and now you come up already with something new and improved...  :faint:

What I noticed is that when I load the code into DE-Kn2cr11.frag the whole thing renders Much quicker! No idea why... Will test your new code and see if that does the same! And if it does, will post code here.


And a message to you both: please, Please lose my name in your codes, all credit Really goes to you both (and you know it ;) ) I would feel all embarrassed to have my name attached to something that basically is the work of you two!  ;)

Offline 3DickUlus

  • *
  • 3f
  • ******
  • Posts: 1380
    • Digilantism
« Reply #14 on: May 30, 2019, 04:56:07 PM »
 :)) Sabine, you are so modest. I tried and just got ugly blobs until I looked at yours but ok as you wish  ;) will make some adjustments...


lamp
BURT 2D

Started by 3DickUlus on Code Snippets (fragments)

12 Replies
877 Views
Last post April 24, 2019, 09:06:28 AM
by Sabine62