Welcome to Fractal Forums

Fractal Software => Fragmentarium Gallery => Topic started by: Tim Emit on January 10, 2016, 11:22:53 PM




Title: LeafBlower
Post by: Tim Emit on January 10, 2016, 11:22:53 PM
LeafBlower

(http://nocache-nocookies.digitalgott.com/gallery/18/6383_10_01_16_11_22_53.jpeg)

http://www.fractalforums.com/index.php?action=gallery;sa=view;id=18562

Fragmentarium- Kalis Amazing surface

build and params.. (any advice appreciated)

#info Amazing Surface by Kali - Based on Tglad's Amazing Box
#define providesInit

#include "DE-Kn8.frag"

#define KN_VOLUMETRIC
#define USE_EIFFIE_SHADOW
#define USE_IQ_CLOUDS

#include "MathUtils.frag"


#define USE_INF_NORM
#group AmazingSurface


uniform int Iterations;  slider[0,17,300]
uniform int ColorIterations;  slider[0,3,300]
uniform float MinRad2;  slider[0.00001,0.25,2.0]
uniform float Scale;  slider[-3,1.5,3.0]
uniform int FoldType; slider[1,1,3]
uniform vec3 PreTranslation; slider[(-5,-5,-5),(0,0,0),(5,5,5)]
uniform vec2 FoldValues; slider[(0,0),(1,1),(5,5)]
uniform bool Julia; checkbox[false]
uniform vec3 JuliaValues; slider[(-5,-5,-5),(-1,-1,-1),(5,5,5)]
uniform vec3 RotVector; slider[(-1,-1,-1),(1,1,1),(1,1,1)]
uniform float RotAngle; slider[-180,0,180]

mat3 rot;

void init() {
    rot = rotationMatrix3(normalize(RotVector), RotAngle);
}

vec4 scale = vec4(Scale, Scale, Scale, abs(Scale))/MinRad2;
float absScalem1 = abs(1-Scale);
float AbsScaleRaisedTo1mIters = pow(abs(Scale), float(1-Iterations));

float DE(vec3 pos) {
   vec4 p = vec4(pos,1);
   vec3 c = Julia?JuliaValues:p.xyz; 
   for (int i=0; i<Iterations; i++) {
      if (FoldType==1) p.xy=abs(p.xy+FoldValues)-abs(p.xy-FoldValues)-p.xy;
      if (FoldType==2) p.xy=FoldValues-abs(abs(p.xy)-FoldValues);
      if (FoldType==3) p.xy=abs(p.xy+FoldValues);
      p.xyz+=PreTranslation;
      float r2 = dot(p.xyz, p.xyz);
      if (i<ColorIterations) orbitTrap = min(orbitTrap, abs(vec4(p.xyz,r2)));
      p *= clamp(max(MinRad2/r2, MinRad2), 0, 1.0); 
      p = p*scale;
      p.xyz+=c;
      p.xyz*=rot;
   }
   return ((length(p.xyz) - absScalem1) / p.w - AbsScaleRaisedTo1mIters);
}


#preset default
FOV = 0.96184
Eye = -8.87906,1.66483,0.605053
Target = -6.7482,26.7474,-15.7466
Up = 1.02127,0.672494,1.1088
FocalPlane = 0.17597
Aperture = 0.00329
InFocusAWidth = 0.91418
ApertureNbrSides = 5
ApertureRot = 136.325
ApStarShaped = false
Gamma = 0.9292
ToneMapping = 5
Exposure = 0.3528
Brightness = 1.31515
Contrast = 3.647
Saturation = 1.76305
GaussianWeight = 1
AntiAliasScale = 0.3151
Bloom = true
BloomIntensity = 1.56752
BloomPow = 10
BloomTaps = 12
Detail = -3.83831
DetailAO = -1.72697
FudgeFactor = 0.97303
MaxRaySteps = 526
MaxDistance = 121.69
Dither = 0.35454
NormalBackStep = 1.8333
AO = 0,0,0,1
AoCorrect = 0.61263
Specular = 0.06548
SpecularExp = 29.835
CamLight = 0.811765,0.909804,0.937255,1.84376
CamLightMin = 0.59923
Glow = 1,0.721569,0.490196,0.31962
GlowMax = 655
Reflection = 0.215686,0.160784,0.137255
ReflectionsNumber = 2
SpotGlow = true
SpotLight = 1,0.972549,0.862745,3.4419
LightPos = -5.3526,2.671,-8.0338
LightSize = 0.42759
LightFallOff = 0.22876
LightGlowRad = 1.44685
LightGlowExp = 0.6178
HardShadow = 0.75431
ShadowSoft = 18.3484
BaseColor = 1,1,1
OrbitStrength = 0.80281
X = 0.105882,0.129412,0.129412,0.74102
Y = 0.45098,0.364706,0.219608,0.45234
Z = 0.827451,0.764706,0.772549,0.82042
R = 0.87451,0.772549,0.364706,0.59418
BackgroundColor = 0.921569,0.811765,0.168627
GradientBackground = 2.0237
CycleColors = true
Cycles = 0.51506
EnableFloor = false
FloorNormal = 0,0,1
FloorHeight = 0.5053
FloorColor = 1,1,1
HF_Fallof = 0.04
HF_Const = 0.03366
HF_Intensity = 0.26544
HF_Dir = 0.31832,0.92948,-0.82958
HF_Offset = 8.0154
HF_Color = 0.286275,0.694118,0.866667,0.79101
HF_Scatter = 4.6239
HF_Anisotropy = 0,0,0
HF_FogIter = 5
HF_CastShadow = true
CloudScale = 1.56669
CloudFlatness = 0.08182
CloudTops = -8.5772
CloudBase = -7.6878
CloudDensity = 0.04058
CloudRoughness = 0.5894
CloudContrast = 0.7722
CloudColor = 0.905882,0.886275,0.588235
SunLightColor = 0.698039,0.203922,0.105882
Iterations = 124
ColorIterations = 8
MinRad2 = 0.82623
Scale = 1.24674
FoldType = 3
PreTranslation = -1,-1.7647,0.395
FoldValues = 2.2213,0.1649
Julia = true
JuliaValues = -4.3275,-2.154,-0.6043
RotVector = -0.73786,-0.84078,0.64466
RotAngle = -20.628
#endpreset



Title: Re: LeafBlower
Post by: mclarekin on January 12, 2016, 02:25:26 AM
Cool picture Tim, and perfect timing for me as I have been coding Amazing Surf for Mandelbulber. This .frag helps me a lot with the basics plus has some good ideas.  :beer:



Title: Re: LeafBlower
Post by: Tim Emit on September 14, 2016, 11:11:19 AM
@mclarekin many thanks , sorry I am useless at noticing replies on here :) .. I have a lot of asurf work (a fav formula) always very happy to share any fragments/fractals which interest you ..or anyone for that matter : D please let me know.. (fb gallery https://www.facebook.com/timemit-393093930773750/?ref=aymt_homepage_panel) dA gallery http://timemit.deviantart.com/gallery/)


Title: Re: LeafBlower
Post by: mclarekin on September 15, 2016, 12:40:21 PM
@Tim. And this is what it evolved into.


Title: Re: LeafBlower
Post by: Tim Emit on September 19, 2016, 09:32:55 AM
amazing (no pun intended) .. so is this an asurf module for mandelbulber? is it an included one or a bespoke piece... love to give it a wiggle : )


Title: Re: LeafBlower
Post by: mclarekin on September 19, 2016, 11:15:47 AM
It is in version 2.08 with a mistake in the addCpixel option.

V2.09 is coming soon with it corrected.

attached is the 4sabine62. txt frag that 3dickulus posted today,  updated with an extra fold, and a  p.z scale option. Could you test it to see if it works on Fragmentarium?


Title: Re: LeafBlower
Post by: Tim Emit on September 19, 2016, 01:41:31 PM
hey, I am not great at this but in trying to run I get ... .
I remember in some of Crists combo he puts in a DE return statement at the end of the code
Should I run a debug and send you that file?


Could not create fragment shader: 0(237) : warning C7011: implicit cast from "float" to "vec2"
0(237) : warning C7011: implicit cast from "float" to "vec2"
0(237) : warning C7011: implicit cast from "float" to "vec2"
0(237) : warning C7011: implicit cast from "float" to "vec2"
0(1195) : error C1038: declaration of "pzScale" conflicts with previous declaration at 0(1194)
0(1218) : error C0000: syntax error, unexpected reserved word "if", expecting ',' or ';' at token "if"
0(501) : error C1110: function "DE" has no return statement
0(1233) : error C0000: syntax error, unexpected reserved word "if" at token "if"


Title: Re: LeafBlower
Post by: 3dickulus on September 20, 2016, 03:06:03 AM
I'll have a run at the code and let you know what I find...

off the top of my head you need to get the #define vs #include order right first like...

these need to be first...
#define providesInit
#define KN_VOLUMETRIC
#define USE_EIFFIE_SHADOW
#define USE_IQ_CLOUDS
#define USE_INF_NORM
then this one...
#include "MathUtils.frag"
then this one...
#include "DE-Kn8.frag"

then the rest of the code ...


Title: Re: LeafBlower
Post by: 3dickulus on September 20, 2016, 03:49:56 AM
I don't have DE-Kn8.frag so I tried DE-Kn9.frag


Title: Re: LeafBlower
Post by: 3dickulus on September 20, 2016, 04:06:38 AM
yaeh ok so I used the wrong one  :embarrass:

this one (attached) compiles and renders :D but no fabs() so changed to abs

MathUtils.frag is where fabs() should be ???