Logo by simon.snake - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. October 03, 2018, 12:22:10 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 5 6 [7] 8 9 ... 13   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !  (Read 15445 times)
Description: adding spline paths for smooth transitions between key frames
0 Members and 1 Guest are viewing this topic.
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #90 on: October 11, 2013, 05:31:42 PM »

Latest update..

1>  added a switch under "Preferences" to turn off GLPath drawing, the numbers are fine for animating but the paths and points don't align well or even at all with some engines so now you can get the erroneous representation out of the way.
2>  fixed the broken source code highlighter, this has bugged me for a while now so just had to fix it
3>  fixed progressive render in equirectangular mode (posted on Fragmentarium board)

updated packages available now @ digilanti.org
« Last Edit: October 13, 2013, 07:05:37 PM by 3dickulus, Reason: url » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #91 on: October 25, 2013, 07:48:20 AM »

Finally ! have a FreeBSD Workstation running KDE desktop, happy to say that Fragmentarium compiles and runs smoothly on FreeBSD 9.2


* snapshot1.jpg (221.27 KB, 1280x1024 - viewed 159 times.)
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
SCORPION
Conqueror
*******
Posts: 104


« Reply #92 on: November 10, 2013, 01:52:15 PM »

Animation 3D fractal in "Fragmentarium." Assembling fragmentarium from the post # 90

http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/animation-3d-fractal-in-'fragmentarium/
Logged
SCORPION
Conqueror
*******
Posts: 104


« Reply #93 on: November 11, 2013, 06:22:05 AM »

When I made this animation , encountered a number of problems with splines .
1. In the beginning of the animation is the approach to the fractal. This podlet had to do separately. Only two keyframes . If I was making three key frames received on the effect of " ping- pong " . That is , the camera flies into fractal, back off , and then again flies .
2 . The rate was obtained reaching is not linear , and progressive . At the end of the speed of reaching is greatly increased , so the animation reaching is also had to be split into three parts.
3 . I make a keyframe , and then turn the camera 350 degrees to make the panorama. When testing is that the camera is only turned by 10 degrees.
4 . very strong factor smoothing spline curvature . Where the camera has to " dodge " - it seems to be breaking through walls. Can not you like to reduce the smoothing splines ?
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #94 on: November 11, 2013, 06:51:25 AM »

1> I make 3 keyframes and get no ping-pong, renders 1 through 3 ok
2> more keyframes = slower motion, less keyframes = faster motion, the closer you are (deeper zoom) the more movement is exagerated
3> for 350 and 180 degrees (2 axis) you need at least 3 keyframes between so you start at 0/0 to 175/90 to 350/180
it will always want to take the shortest route for the transition,
it doesn't know you want 0 to +350 so it goes 0 to -10 as the shortest route between coordinates
4> subcontrols for spline smoothing ? the only thing I might be able to do is affect the curve strength for the whole path, all curves not just one but it's not high on my list of things to code right now.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
SCORPION
Conqueror
*******
Posts: 104


« Reply #95 on: November 11, 2013, 09:02:14 AM »

Thanks for the quick reply!
I have now realized at the expense of cornering. "Ping Pong" is obtained when 1-2 keyframe - zoom, zoom + 2-3 and move the camera from side to side, up and down within a small range. I will try again and send you the file.
Well, then I'll be doing a lot of keyframes, this should reduce the large radii of smoothing?
« Last Edit: November 11, 2013, 09:04:01 AM by SCORPION » Logged
SCORPION
Conqueror
*******
Posts: 104


« 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. (((((

Code:
#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
« Last Edit: November 13, 2013, 12:19:13 AM by SCORPION » Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #97 on: November 13, 2013, 01:59:15 AM »

hmm... how to describe...

the distance between control points influences the next curve velocity,
large distance = more push on the next curve so you are getting overshoot on the last path segment.
From 1 to 2 is large, from 2 to 3 is small so big one pushes little one

if you start with 2 keyframes, #1 far away #2 where you want to end the zoom, then add a keyframe at 1/2, add a keyframe at 3/4, add a keyframe at 7/8, getting closer to the end, I think you will have the effect you want of slowing the zoom as you get closer... remember to rename the keyframe you add and the end keyframe, start 1 --- 2  add one 1-<here>-2   so   1-3-2 rename as 1-2-3 etc... ( I know, it should be automagic)

these keyframes do that with NO overshoot smiley

Code:
#preset KeyFrame.001
FOV = 0.62536
Eye = 39.654,-4.07285,-27.3587
Target = -7.62767,0.783434,5.26259
Up = 0.149814,0.974284,-0.168305
#endpreset

#preset KeyFrame.002
FOV = 0.62536
Eye = 10.7017,-1.09917,-7.38347
Target = -36.58,3.75712,25.2378
Up = 0.149814,0.974284,-0.168305
#endpreset

#preset KeyFrame.003
FOV = 0.62536
Eye = 3.89113,-0.399659,-2.68463
Target = -43.3906,4.45663,29.9366
Up = 0.149814,0.974284,-0.168305
#endpreset

#preset KeyFrame.004
FOV = 0.62536
Eye = 2.07882,-0.213517,-1.43425
Target = -45.2029,4.64277,31.187
Up = 0.149814,0.974284,-0.168305
#endpreset

#preset KeyFrame.005
FOV = 0.62536
Eye = 1.26963,-0.130405,-0.875964
Target = -46.0121,4.72588,31.7453
Up = 0.149814,0.974284,-0.168305
#endpreset

It will still be non linear as each segment = ( totalframes / (nControlpoints-1) ) so 100 frames with 4 controlpoints has 33 frames per segment.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #98 on: November 22, 2013, 10:04:18 PM »

Recent additions to the source code...

* Added a CMakeLists.txt file smiley
* Float 1-2-3-4 sliders accept easing curve settings.
* Easing curves can loop multiple times
* Easing curve loops can ping pong

Eg: sin curve on X axis, cos curve on Y axis, make Z Up and camera (or Axolotl feet) move in a nice circle.

Source code at http://www.digilanti.org/fragmentarium/ Sorry I haven't had time to whip up a Win exe, head in IQ clouds and a eiffies Sphere of Confusion smiley
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
SCORPION
Conqueror
*******
Posts: 104


« Reply #99 on: November 23, 2013, 02:58:44 AM »

I still wait for the assembly to Windows...
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #100 on: November 23, 2013, 04:44:05 AM »

win exe coming soon... (I hope)

if you have any Easingcurve settings you want to use with the newer version you will have to make some small changes...

old
/// FOV:OutBounce:38:0.625:1.06055:1:26:0.3:1:1.7

new
/// FOV1:OutBounce:38:0.625:1.06055:1:26:0.3:1:1.7:4:1
          ^                                                                       ^ ^
VarName:CurveName:CurveNumber:StartValue:EndValue:StartFrame:EndFrame:Period:Amplitude:Overshoot:Loops:PingPong

in the above example the looping works like this... hold the beginning value until start frame is reached, then loop 4 times,  loop1=ping, loop2=pong, loop3=ping, loop4=pong and hold the last value until the end.

1 loop = StartFrame >> EndFrame = 25 frames so this takes 100 frames to complete! setting Loops to -1 should enable a forever loop, if PingPong=0 then no pong just ping

 smiley  the GUI has been updated.

Edit: KeyFrames and Easing curves are independant of each other, Keyframes are for camera and target while Easingcurves are for other parameters,
colors can be animated too if you change them to float3 (vec3) or float4 (vec4) types
cheesy
« Last Edit: November 23, 2013, 05:03:32 AM by 3dickulus, Reason: clarification » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #101 on: November 27, 2013, 09:47:04 AM »

Ok, I posted a win exe on my website and of course the standard disclaimer applies...
This is experimental, use at your own risk, it works on my box smiley

It is always better if you can compile from source, I'm not a windoze guy so I can't help much with windoze questions but if you compile from source and give me some input my help is more likely to be constructive.

The windoze box that I have access to only wants to compile 32bit, not sure why, I've added the compiler flags for 64bit (another good reason to compile it yourself) Fragmentarium still runs but this exe may not be optimal, one bug is that it doesn't render the spline paths here, your results may be different.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
SCORPION
Conqueror
*******
Posts: 104


« Reply #102 on: November 30, 2013, 03:53:07 AM »

Very little test your build on windows 7 64 bit.
Starts and runs normally, smoothing splines is optimized. (in my opinion). Way splines are not visible. But in my opinion, it should not interfere with work.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #103 on: November 30, 2013, 04:05:36 AM »

tnx  smiley

I've noticed that ping-pong easingcurves don't play properly when moving the timeline slider backwards but they do create the correct images when playing or moving forwards... just fixing that now, and trying to get 64bit compile working

Edit: fixed ping-pong, displays forwards and backwards correctly, still 32bit compile though.
« Last Edit: November 30, 2013, 06:22:36 AM by 3dickulus, Reason: up:D » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #104 on: December 02, 2013, 06:16:42 PM »

In Fragmentarium, when switching tabs the view did not switch shaders,
well, now it does and remembers the settings for this too,
so now when you switch tabs it behaves as you would expect...
view = this tab + shader for this tab + settings for this shader

RFC

here are the sources + win exe

Edit: hmmm, win exe doesn't render spline paths and seems to get confused with the tabs, #2 #3+... are ok but #1 first tab (usually Clasic Mandelbulb.frag) doesn't remember it's settings when switching tabs. Really odd that it works for others but not one, Linux version has no problem with this.

Edit2: "render()" needs to be called once before and once after switching tabs huh? seems to work now...

Edit3: same thing for "Render Dialog" now it remembers it's state when closed and allows rendering of a range of frames.

« Last Edit: December 08, 2013, 08:42:31 PM by 3dickulus, Reason: updated to reflect current state » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: 1 ... 5 6 [7] 8 9 ... 13   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Setting a parameter in all keyframes at once... Mandelbulber nameinuse2 2 1105 Last post January 25, 2011, 07:56:58 PM
by Buddhi
inserting intermediate keyframes along the parameter splines Mandelbulber huminado 0 858 Last post November 25, 2011, 07:03:16 PM
by huminado
Mandelbulber - idea for spline editing Help & Support eiffie 6 238 Last post February 13, 2013, 07:08:24 AM
by Apophyster
Catmull-Rom Fragmentarium JosLeys 4 1160 Last post July 24, 2013, 01:05:18 AM
by marius
Fragmentarium spline paths Animations Showcase (Rate My short Animation) 3dickulus 2 777 Last post August 22, 2013, 08:41:41 AM
by 3dickulus

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.204 seconds with 26 queries. (Pretty URLs adds 0.018s, 2q)