|
SCORPION
|
 |
« Reply #96 on: November 13, 2013, 12:15:51 AM » |
|
I remembered and was able to reproduce the effect of " ping- pong " when zooming . This occurs when the process of changing the step size of the zoom zoom. That is done keyframe. Then he began to approach the left mouse wheel . Small step , decided to increase the step zoom. When fractal close , we must again umentshit step size to seamlessly fly up . As a result, the effect is " ping - pong " when the camera flies in the fractal, flying out of it, and only then stays there , where there has been a third key frame. Here tataki very unpleasant effect . (((( Horrible machine translation. It is hoped that you will understand me.
I, too, you hardly know. (((((
#info Mandelbulb Distance Estimator #define providesInit #include "DE-Raytracer.frag" #include "MathUtils.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[(0,0,0),(1,1,1),(1,1,1)]
uniform float RotAngle; slider[0.00,0,180]
mat3 rot; uniform float time; void init() { rot = rotationMatrix3(normalize(RotVector), RotAngle); float dummy = time*10.0; }
// 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; // 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)); }
// This is a power function taken from the implementation by Enforcer: // http://www.fractalforums.com/mandelbulb-implementation/realtime-renderingoptimisations/ // // I cannot follow its derivation from spherical coordinates, // but it does give a nice mandelbrot like object for Power=2 void powN2(inout vec3 z, float zr0, inout float dr) { float zo0 = asin( z.z/zr0 ); float zi0 = atan( z.y,z.x ); float zr = pow( zr0, Power-1.0 ); float zo = zo0 * Power; float zi = zi0 * Power; dr = zr*dr*Power + 1.0; zr *= zr0; z = zr*vec3( cos(zo)*cos(zi), cos(zo)*sin(zi), sin(zo) ); }
uniform bool Julia; checkbox[false] uniform vec3 JuliaC; slider[(-2,-2,-2),(0,0,0),(2,2,2)]
// Compute the distance from `pos` to the Mandelbox. float DE(vec3 pos) { vec3 z=pos; float r; float dr=1.0; int i=0; r=length(z); while(r<Bailout && (i<Iterations)) { if (AlternateVersion) { powN2(z,r,dr); } else { powN1(z,r,dr); } 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; /* Use this code for some nice intersections (Power=2) float a = max(0.5*log(r)*r/dr, abs(pos.y)); float b = 1000; if (pos.y>0) b = 0.5*log(r)*r/dr; return min(min(a, b), max(0.5*log(r)*r/dr, abs(pos.z))); */ }
#preset Default FOV = 0.62536 Eye = 1.65826,-1.22975,0.277736 Target = -5.2432,4.25801,-0.607125 Up = 0.401286,0.369883,-0.83588 EquiRectangular = false FocalPlane = 1 Aperture = 0 Gamma = 2.08335 ToneMapping = 3 Exposure = 0.6522 Brightness = 1 Contrast = 1 Saturation = 1 GaussianWeight = 1 AntiAliasScale = 2 Detail = -2.84956 DetailAO = -1.35716 FudgeFactor = 1 MaxRaySteps = 164 Dither = 0.51754 NormalBackStep = 1 AO = 0,0,0,0.85185 Specular = 1.6456 SpecularExp = 16.364 SpecularMax = 10 SpotLight = 1,1,1,1 SpotLightDir = 0.63626,0.5 CamLight = 1,1,1,1.53846 CamLightMin = 0.12121 Glow = 1,1,1,0.43836 GlowMax = 52 Fog = 0 HardShadow = 0.35385 ShadowSoft = 12.5806 Reflection = 0 DebugSun = false BaseColor = 1,1,1 OrbitStrength = 0.14286 X = 1,1,1,1 Y = 0.345098,0.666667,0,0.02912 Z = 1,0.666667,0,1 R = 0.0784314,1,0.941176,-0.0194 BackgroundColor = 0.607843,0.866667,0.560784 GradientBackground = 0.3261 CycleColors = false Cycles = 4.04901 EnableFloor = false FloorNormal = 0,0,0 FloorHeight = 0 FloorColor = 1,1,1 Iterations = 12 ColorIterations = 8 Power = 8 Bailout = 6.279 AlternateVersion = true RotVector = 1,1,1 RotAngle = 0 Julia = false JuliaC = 0,0,0 #endpreset
#preset Octobulb FOV = 0.62536 Eye = -0.184126,0.843469,1.32991 Target = 1.48674,-5.55709,-4.56665 Up = -0.240056,-0.718624,0.652651 AntiAlias = 1 Detail = -2.47786 DetailAO = -0.21074 FudgeFactor = 1 MaxRaySteps = 164 BoundingSphere = 2 Dither = 0.5 AO = 0,0,0,0.7 Specular = 1 SpecularExp = 27.082 SpotLight = 1,1,1,0.94565 SpotLightDir = 0.5619,0.18096 CamLight = 1,1,1,0.23656 CamLightMin = 0.15151 Glow = 0.415686,1,0.101961,0.18421 Fog = 0.60402 HardShadow = 0.72308 Reflection = 0 BaseColor = 1,1,1 OrbitStrength = 0.62376 X = 0.411765,0.6,0.560784,-0.37008 Y = 0.666667,0.666667,0.498039,0.86886 Z = 0.666667,0.333333,1,-0.25984 R = 0.4,0.7,1,0.36508 BackgroundColor = 0.666667,0.666667,0.498039 GradientBackground = 0.5 CycleColors = true Cycles = 7.03524 FloorNormal = 0,0,0 FloorHeight = 0 FloorColor = 1,1,1 Iterations = 14 ColorIterations = 6 Power = 8.18304 Bailout = 6.279 AlternateVersion = true RotVector = 1,0,0 RotAngle = 77.8374 #endpreset
#preset KeyFrame.001 FOV = 0.62536 Eye = 34.2122,-27.1153,4.45159 Target = 27.3107,-21.6275,3.56673 Up = 0.401286,0.369883,-0.83588 #endpreset
#preset KeyFrame.002 FOV = 0.62536 Eye = 2.2424,-1.69419,0.352655 Target = -4.6591,3.79361,-0.532205 Up = 0.401286,0.369883,-0.83588 #endpreset
#preset KeyFrame.003 FOV = 0.62536 Eye = 0.808919,-0.554342,0.168864 Target = -6.09258,4.93346,-0.715996 Up = 0.401286,0.369883,-0.83588 #endpreset
|