Welcome to Fractal Forums

Fractal Software => Fragmentarium => Topic started by: 3dickulus on June 24, 2013, 06:53:36 PM




Title: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 24, 2013, 06:53:36 PM
http://vimeo.com/moogaloop.swf?clip_id=70304083http://vimeo.com/moogaloop.swf?clip_id=70625008
http://vimeo.com/moogaloop.swf?clip_id=71036666http://vimeo.com/moogaloop.swf?clip_id=71179077
VariableEasing CurveStart Finish
Power InBounce 1 180
RotAngle OutBounce180 360
Cycles SineCurve 360 540
All 3 ***540 720



***               A brief description of the changes so far                ***

***               Spline Path KeyFrame Camera Control                ***

Added spline paths for Eye Target and Up visible when render mode is not Progessive and animatiion is not running.
TODO: add Up vectors to control points

Added menu item "Edit->Insert Command->Presets->Insert Preset from Current Settings", HotKey "F8"
Inserts KeyFrame in text editor at the cursor position, updates Preset combobox  based on current location and heading

***              Auto Focus focalplane = lookat target               ***

Added AutoFocus checkbox in tutorial#31.frag (Raytracer Tab) when checked the focal plane distance is set at target distance Thanks Vinz  :beer:

***                 Easing curves for float params                   ***

Added menu item "Edit->Add Easing Curve" acts on the currently selected float combo slider, HotKey "F7"
Added for all single float parameters, one of 44 easing effects user can specify start value, finish value, start frame, finish frame and one easing curve.
Frames before start frame will use start value until start frame is reached.
Frames after finish frame will use finish value until end of animation is reached.
These become active when the animation is playing.

***          Three new files under Tutorials               ***

30 - Simple Key Frame Animation.frag (http://www.digilanti.org/fragmentarium/30 - Simple Keyframe Animation.frag)
31 - Simple Focal Plane Tracking Target.frag (http://www.digilanti.org/fragmentarium/31 - Simple Focal Plane Tracking Target.frag)
32 - Simple Multi-Parameter Easing Animation.frag (http://www.digilanti.org/fragmentarium/32 - Simple Multi-Parameter Easing Animation.frag)

Latest update..

New!> OpenEXR for render output and texture input files.

> Now has a "Find text" function for the editor and spline path object occlusion.

>  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
       now you can get the splines out of the way if you want.

>  fixed the broken source code highlighter? (sort of)

>  fixed progressive render for equirectangular mode in 3D.frag (posted on Fragmentarium board) (http://www.fractalforums.com/index.php?topic=17360.0)

> added Float 2/3/4 slider easing curves, multi looops and ping-pong

> Tabs 'remember' their fragment and settings when enabled (selected) , if there was locked vars you may have to hit build but the numbers should be good  :D

> Render Dialog remembers it's state when closed and allows rendering a range of frames.

> Version sensitive highlighting  for 1.0 - 4.3 defaults to 1.1  :D

> GLSL assembler browser

> Spline path occlusion works in Qt5 Win exe

 Source Code (http://www.digilanti.org/fragmentarium/) Modified, original v1.0 by Syntopia

 Windows Executable (http://www.digilanti.org/fragmentarium/) Compiled against Qt 5.3.2 with MinGW 4.8.2 on a Windows 7 box.



Title: Re: cat mull rom spline paths ? camera/parameter keyframes ?
Post by: 3dickulus on July 03, 2013, 02:41:40 AM
Need some beta testers for Fragmentarium Spline Path Animation got it working nicely  :D well it's useable

If any of you brave Fragmentariumists would like to test this out you can post me a note

Thanks Syntopia for the encouraging words :spgloomy:



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 03, 2013, 04:11:25 PM
Woaw great Work 3dickulus :beer: :beer: :beer: :beer:

i will be glad to test it ... just need some time to figure out how to compile fragmentarium  :D

is it unlimited keyframe ?


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on July 03, 2013, 04:19:26 PM
so, you succsesfully implemented a catmul rom spline interpolation keyframe animation system to fragmentarium !?
arrh, would as well love to have windows binary ... sooo lazy i am ...


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 03, 2013, 06:27:54 PM
Quote
vinz:how to compile fragmentarium
I've altered only the code in the GUI folder, before you compile back it up move the current GUI folder to GUI.bak and put the GUI folder from the zip file in it's place. I think all you have to do is cd to the top folder and type...
Code:
1> qmake
2> make
3> make install
and if you have all the right stuff installed it should fly

Quote
vinz: is it unlimited keyframe ?
the key frames are stored in the GLSL code as presets named KeyFrame.nnn so I guess that would be limited by how much space is available for GLSL
looking at storing and reading from files so as not to hog up valuable resources in the GLSL code realm, I would like to use a spline description for camera controls only and leave the object control stuff in the GLSL part
the last test I did was with 12 keyframes 900 frames no problem

UPDATE The layout is so... you rendered an image you like in hires and created a <something>.png Files folder,
that saves a copy of your GLSL code with the current parameters as the 'default' preset, the only preset. Load that into Fragmentarium(hacked version) and start adding KeyFrame presets, these only have camera coords so there should be room for lots of them. when animating the render engine will use the settings in the default preset and the keyframes as control points for a spline path. This works with Kali's living creature type object morphing too, in fact, you can't animate without it (code marked in screenshot must be present in your GLSL) btw, tnx Kali  :beer:

a few cavaets as noted above and...

the spline curve passes through all the controlpoints but overshoots the end a bit and a spline point ie:a single frame, may not land exactly on a control point so the keyframe viewed by clicking an entry in the list in the Animation Controller window is an approximation and may not be exactly the same frame as setting a view from the Presets  menu, need better math skills to get this sorted.
UPDATE I think I solved the overshoot problem  :D

Quote
cKleinhuis: so, you succsesfully implemented a catmul rom spline interpolation keyframe animation system to fragmentarium !?
well, to the best of my abilities anyways, the QtSpline.cpp code I added is capable of rendering the spline(s) via GL commands but I'm not sure (yet) of how to go about getting the perspective and scale just right, it sure would be nice to be able to see the curves and points, kinda flying blind but at least we're flying! Ultimately I would like to not use the presets and edit/add/delete the control points directly.

tnx :beer:



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 03, 2013, 08:28:05 PM
Quote
a few cavaets as noted above and...

the spline curve passes through all the controlpoints but overshoots the end a bit and a spline point ie:a single frame, may not land exactly on a control point so the keyframe viewed by clicking an entry in the list in the Animation Controller window is an approximation and may not be exactly the same frame as setting a view from the Presets  menu, need better math skills to get this sorted.

maybe my math skills aren't so bad  :embarrass: the above is still true but using this to figure out the frame number seems to get the spline point closest to the control point, so for anyone that has grabbed the code either grab the latest (same place same name) or make the following change...
at around line 250 in AnimationController.cpp change the jumpToKeyFrame routine like this
Code:
		void AnimationController::jumpToKeyFrame(QListWidgetItem *it) {
 int kfr = keyFrameList->row(it);
 float t = (1.0/animationSettings.getKeyFrameCount());
 int fr = (t*kfr)*(0.5+animationSettings.totalFrames());
 animationSettings.setFrame(fr);
};
the 0.5 takes care of some float to int rounding error and voila!

the animation controller is not where the keyframes are edited anyways so this works for me :)

EDIT: hmmm that's not quite it either... still, works for me.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 05, 2013, 01:01:21 AM
I think here is a better place to share the file:


for cKleinhuis and others who are interested with, here a link to a working FRAGMENTARIUM 3dickulus hack ( for win )


http://ge.tt/3r0yQzk/v/0?c

info: To gain some place i've removed every frag inside the folder, just keep the default one and the animated mandelbulb from 3dickulus.
info: the link stay available for 14 days if i've well understood.
info : not deeply tested yet, use at your own risk hahahahaha !
  :D


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on July 05, 2013, 10:44:09 AM
thank you for the executable, it seems to run, but on my laptop no chance of comnfortably checking it out,
damn it ... i am totally thrown back for 2 monthes now !!


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on July 05, 2013, 10:45:40 AM
and people,  lets talk about branching the repository, or how to bring it back to the main trunk,
it is a useful extension to an already useful tool, would be nice to have it available any time
soon officially!


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on July 05, 2013, 10:53:19 AM
can you provide a mini step tutorial on how to blend between keyframes?!?!?
do they need to be defined as presets?


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 05, 2013, 03:41:59 PM
How-To create a KeyFrame Anim:

Make sure the cursor is at the end of the GLSL script
Select Menu Item...
Edit->Insert Command->Presets->Insert Preset From Current Settings

This will give you the opportunity to choose a name or use the one provided:
For a NON-KeyFrame preset change the name to whatever you like.
Leave it as is to add this as a KeyFrame, must be named "KeyFrame.nnn" and it will auto increment as you add new ones.

Must have at least 2 KeyFrames to begin animating.

Suggest starting with only a default Preset.

After adding a few click the "Animation" button and hit play. You should see your keyframes play. O0

----------------------------------------------------------------------------------------------------------------
Recommend If you want to create anims don't edit the presets unless you really need to.
----------------------------------------------------------------------------------------------------------------

If you already have keyframes and want to adjust one...

Apply KeyFrame.nnn you want to edit as current view (from the Preset selection in the Parameters area)

Make changes to your view, where you look at, location etc,

Block mark the KeyFrame.nnn in the editor

In the menu select "Edit->Insert Command->Presets->Insert Preset From Current Settings"

You will be prompted for a new name, the name will have auto incremented
Give it the name KeyFrame.nnn where nnn is the same number as the frame you are replacing

New camera coordinates will replace the block marked keyframe.

That's it  :D

I basically go surfing around saving keyframes as I go then play the anim, if I don't like it I delete the whole thing and start again



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 05, 2013, 03:42:57 PM
Hahahahahaha :D



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 05, 2013, 03:50:25 PM
Thanks to you ! :D

Hey 3Dickulus !

My First Request ... please it's very important to have the ability to animate the Aperture and focal Plane Slider.
i know they are a bit different than camera parameters but they are very necessary to me. do you think it's complicated to add ? :D


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 05, 2013, 03:59:49 PM
I plan to adapt easing in and out for other parameters, have a look at the Qt "Easing" demo to see what I mean.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 05, 2013, 04:13:53 PM
not sure to have well understood , it isn't possible to do a splines interpolation between the others parameters ? for what i know easing in and out are used for two points animations , right?
edit: AH? you mean we can use easing curve between each keyframe right? would be great !


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 05, 2013, 04:23:48 PM
1d two points... start and end transition of a single value

for instance when you have a linear transition, easing is applying acceleration, speed and decay, this can be represented as a curve, it's not like a 3d spline but it is a 2d curve


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 05, 2013, 04:26:50 PM
Sounds GREAT !!!!  :D


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: Kali on July 07, 2013, 03:26:58 PM
wow, this is great news, I'm going to test it right now!!!


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: eiffie on July 08, 2013, 08:18:16 PM
3dickulus - when you have that done I think there are a bunch of artists here who would love a simple hybrid formula editor!?!? If you think you want to try it let me know because I've put some thought into it and it shouldn't be too hard. (well in my head it isn't).


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 09, 2013, 04:48:25 AM
@Kali Hi I sent you a note on Da, all is well tnx.

a simple hybrid formula editor!?!?

look at the Qt Easing Demo (http://harmattan-dev.nokia.com/docs/library/html/qt4/animation-easing.html) for single value parms

In theory, what I've done is applicable to ANY set of 3d parameters, the tricky part is a visual representation that makes sense, like viewing the spline that represents the Up vector is not as useful as seeing the Up vectors attached to each control point, seeing the spline and control points as GL_LINE_STRIP and GL_POINTS gives no depth clues until you step back and move a bit, they are rendered over the quad in the GL view.
The object needs to occlude the points and lines and they also need some perspective, right now I'm fiddling with a vertex shader that draws points as spheres in the correct perspective, it works but the Zbuffer is inverted?!? farthest is drawn over closest, not sure how to fix that yet, need a "glSortZBuffer(-1)"  function.

another issue is that people customize their GLSL scripts so hardcoded parameters will only be valid for a particular version of a script, every script needs camera settings so that is a candidate but the rest are a variable number of variables? I will have to incorporate the use of the settings widget parser and that might be beyond my scope.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: eiffie on July 09, 2013, 05:13:00 PM
Yes definitely it is a whole different project. Maybe Syntopia is already contemplating something like it?? or maybe I should get off my butt and do it myself :)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: Syntopia on July 09, 2013, 07:36:32 PM
The object needs to occlude the points and lines and they also need some perspective, right now I'm fiddling with a vertex shader that draws points as spheres in the correct perspective, it works but the Zbuffer is inverted?!? farthest is drawn over closest, not sure how to fix that yet, need a "glSortZBuffer(-1)"  function.

glDepthFunc(GL_GREATER) (http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDepthFunc.xml) ? Though I believe it might be a problem with the near and far values.

Yes definitely it is a whole different project. Maybe Syntopia is already contemplating something like it?? or maybe I should get off my butt and do it myself :)

Not really. I haven't done much coding on Fragmentarium lately, though I hope to get back to it soon.

Btw, if any of you are modifying Fragmentarium, consider forking the Github repository - this way the changes won't be lost, and it would be possible for me to track changes or backport them to the main branch.



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 09, 2013, 11:29:25 PM
glDepthFunc(GL_GREATER)  yes, I'll try that tnx  Syntopia, I have used that func before, not sure why it was eluding me.

Btw, if any of you are modifying Fragmentarium, consider forking the Github repository - this way the changes won't be lost, and it would be possible for me to track changes or backport them to the main branch.

I'll look into github, hmm, another account and password to remember, I've never used github so if anyone who has wants to give me a rundown of the basics of forking a repository the input would be more than welcome.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 10, 2013, 06:13:19 AM
Quote
Syntopia: glDepthFunc(GL_GREATER) ? Though I believe it might be a problem with the near and far values

 both seem to have no effect!? requiring some more investigation.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 15, 2013, 10:25:33 PM
Nice vid !!! i've just checked on my computer and the camera move is perfect here :)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 16, 2013, 12:05:41 AM
tnx, I was worried because  some players show it as very bumpy but I guess it's all in the decoding.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 16, 2013, 01:24:05 PM
I've only see it on vlc here, adnd everything seems smooth to my eyes. it's less obivous when the camera is moving fastly, but i think all is great :)
Thanks for your great Work  :beer: :beer: :beer: :beer: :beer: :beer: :beer: :beer:



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 16, 2013, 02:00:14 PM
tnx, that's good to hear.

I've got some results with object occlusion of paths, just digging into the DEraytracer frag, modified so the depth information of the object is there,  a very simple mod... almost there, it'll come to me :)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 16, 2013, 06:47:34 PM
I've got some results with object occlusion of paths, just digging into the DEraytracer frag, modified so the depth information of the object is there,  a very simple mod... almost there, it'll come to me :)

Oh, i didn't understood anything and google can't help me is it cool? what does this mod do ? lol  :embarrass:


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 16, 2013, 07:00:42 PM
it's hard to judge where your path is if it is drawn on top of everything, this mod will (hopefully) let the object, bulb, menger, hybrid or whatever, block the view of the path when it goes behind or through a solid piece of the object


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 16, 2013, 07:06:18 PM
Hahahaha Excellent ... for sure this is a usefull mod  ;D


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 17, 2013, 01:11:02 AM
What I've got so far re object occlusion...

1 is just rendered over the quad with no depth test

2 is rendered over the quad with the following code at the end of successful hit in the DErt

Code:
          gl_FragDepth =  gl_FragCoord.z / gl_FragCoord.w;
}
else {
hitColor = backColor;
hitColor +=Glow.xyz*stepFactor* Glow.w*(1.0-shadowStrength);
          gl_FragDepth = 1.0;

}

the FragDepth lines are the ones I've added, object = calc-depth,  background = farthest
obviously not right but getting there



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: marius on July 17, 2013, 01:35:15 AM

Code:
          gl_FragDepth =  gl_FragCoord.z / gl_FragCoord.w;
}
else {
hitColor = backColor;
hitColor +=Glow.xyz*stepFactor* Glow.w*(1.0-shadowStrength);
          gl_FragDepth = 1.0;

}

the FragDepth lines are the ones I've added, object = calc-depth,  background = farthest
obviously not right but getting there


I have been Z-buffer drawing opengl camera path lines on top (and behind) fractals for a while w/ http://code.google.com/p/boxplorer2 (http://code.google.com/p/boxplorer2),
for example https://lh4.googleusercontent.com/-zg_rHyqR4ME/Tf6ByIWh61I/AAAAAAAATaM/aCoJpV_CpkM/20110619_160710.jpg (https://lh4.googleusercontent.com/-zg_rHyqR4ME/Tf6ByIWh61I/AAAAAAAATaM/aCoJpV_CpkM/20110619_160710.jpg).

Key is to put compatible values in the Z-buffer. Which requires a notion of near and far plane distances and field of view.

See for instance https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/fragment.glsl#291 (https://code.google.com/p/boxplorer2/source/browse/trunk/cfgs/rrrola/fragment.glsl#291).
And https://code.google.com/p/boxplorer2/source/browse/trunk/boxplorer.cc#367 (https://code.google.com/p/boxplorer2/source/browse/trunk/boxplorer.cc#367).

'speed' is actually the DE at the camera location, btw.
Which I have run-time in both shader and C++ by compiling (some part of some version of) the shader code also as C++.

When you start drawing w/ opengl primitives in a double precision fractal you'll also quickly hit precision problems if you do not make the camera be the origin as far as the opengl primitives are concerned.

Camera flight path visualization quickly breaks down in combination with time-morphed fractals, of course  ;D

-marius


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 17, 2013, 02:44:11 AM
thanks for the input marius, very helpful,
I'll have to start digging into the GLSL side a little, no "speed" variable in this rt, but I'll spend some time studying the code and see if I can make the leap.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: eiffie on July 17, 2013, 05:40:32 PM
If you are using OpenGL calls to draw the path (and relying on the depth buffer to occlude for you) then for sure you need marius' code. It helped me out too! If you are just simply drawing lines with qt or determining the occlusion yourself then simply set gl_FragDepth=totalDist/MaxDistance and check that against distToPath/MaxDistance. (distToPath=distance from camera to path and MaxDistance=100.0 in DE-Raytracer.frag)

wooops just read your note in the other thread so you are drawing with OpenGL - use marius' code which looks something like this...
Code:
float zNear = 0.001;
float adt = MaxDistance / (MaxDistance - zNear);
float bdt = MaxDistance * zNear / (zNear - MaxDistance);
gl_FragDepth = (adt + bdt / clamp(totalDist/length(dir), zNear, MaxDistance));


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 17, 2013, 10:55:17 PM
The infos I have to go on is..
linear Z buffer = ( Z - nearZ ) / ( farZ - nearZ )
non-linear Z buffer = ( 1/Z - 1/nearZ ) / ( 1/farZ - 1/nearZ )
GL uses non-linear afaik
in GLcoords... coord.w = 1/coord.z so the above would be zb = ( coord.w - 1/0.001 ) / ( 1/100.0 - 1/0.001 ) using the near/far values used in frag and GL code

my spline paths work, they are in the right place in 3D space so in my mind the depth buffer should be accurate and GL should be able to do the occlusion the same way it does for any 3D object it renders

in Fragmentarium source in the drawFragmentProgram routine
Code:
glDisable( GL_DEPTH_TEST ); // disables testing but not writing
so I have wrapped the glRectF like this
Code:
glDepthMask(GL_FALSE); // disables writing to depth buffer but not testing
glRectf(-1,-1,1,1);
glDepthMask(GL_TRUE); // we don't want the rect to obscure anything in the depth buffer

so automatic testing and writing are off, correct me if I'm wrong but this allows the fragment code to write to the depthbuffer manually
and prevents GL from changing it so I should be able to turn testing back on to draw the splines after the frag populates the Zbuffer

gl_FragDepth = 0.0 for a hit and gl_FragDepth = 1.0 for everything else should give me at least a masking occlusion effect


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: marius on July 18, 2013, 12:49:22 AM
in Fragmentarium source in the drawFragmentProgram routine
Code:
glDisable( GL_DEPTH_TEST ); // disables testing but not writing
so I have wrapped the glRectF like this
Code:
glDepthMask(GL_FALSE); // disables writing to depth buffer but not testing
glRectf(-1,-1,1,1);
glDepthMask(GL_TRUE); // we don't want the rect to obscure anything in the depth buffer

so automatic testing and writing are off, correct me if I'm wrong but this allows the fragment code to write to the depthbuffer manually
and prevents GL from changing it so I should be able to turn testing back on to draw the splines after the frag populates the Zbuffer

gl_FragDepth = 0.0 for a hit and gl_FragDepth = 1.0 for everything else should give me at least a masking occlusion effect


Known to work for me:

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_ALWAYS);

then call fractal shader that writes every pixel's Z (but there is not filtering test due to GL_ALWAYS).

then

     glDepthFunc(GL_LESS);

then draw GL_LINES or any GL primitives and get per pixel occlusion against the fractal.

I don't call glDepthMask() anywhere.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 18, 2013, 01:08:31 AM
indeed that is the simplicity I had in mind and started with some time ago, so I will go over my changes again and see where I went wrong.

thanks marius


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 03:25:07 AM
I'm not a mathematician or professional coder,  my best guess leads me back to a matrix issue, off by some degrees?scale?
the method described by marius above is essentially where I started with my attempts at occlusion, seemed a logical assumption based on my GL experience,
the draw commands in the spline object, spline->drawSplinePoints() and spline->drawControlPoints() expect the GL context and rendering matrix to be setup by the GL calling object, all they do is draw, I don't use any matrix maths or translations to place or scale the points as they are generated with respect to current camera and perspective settings are as the caller sets them.
lines and points all seem to be in the right locations, perspective and scale but not in the zbuffer?


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: marius on July 19, 2013, 07:03:26 AM
I'm not a mathematician or professional coder,  my best guess leads me back to a matrix issue, off by some degrees?scale?
the method described by marius above is essentially where I started with my attempts at occlusion, seemed a logical assumption based on my GL experience,
the draw commands in the spline object, spline->drawSplinePoints() and spline->drawControlPoints() expect the GL context and rendering matrix to be setup by the GL calling object, all they do is draw, I don't use any matrix maths or translations to place or scale the points as they are generated with respect to current camera and perspective settings are as the caller sets them.
lines and points all seem to be in the right locations, perspective and scale but not in the zbuffer?

So on screen lines look like where you want them to be but just not occluded where you expect them to be? Might be hard to judge.

Does your glFrustum() call have the same zNear, zFar and field of view as the fractal shader?

Does the fractal shader do something like:
  float a = zFar / (zFar - zNear);
  float b = zFar * zNear / (zNear - zFar);
  gl_FragDepth = (a + b / clamp(totalD/length(raydir), zNear, zFar));

You know the difference between glMatrixMode(GL_MODELVIEW) and glMatrixMode(GL_PROJECTION)?
Is the GL_MODELVIEW for the fractal shader the same as for opengl primitives?
Or does the fractal shader assume eye at (0,0,0)?

Is the depth buffer set up correctly and filled by the fractal shader at all?
Try read it out and dump to file as a first test. Perhaps there is no depth buffer properly attached at all?

What does glError() say during all this? Anything but GL_NO_ERROR is bad news.

If it is any consolidation, it took a fair amount of explicatives before I had the various projections and Z buffer values in agreement :hurt:


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 07:49:58 AM
lines and points are where they should be, at least when I rotate, pan and zoom they look like they are but when looking at a static view there is no depth cue and hard to judge if the path goes through solid or empty space, that's the only reason I'm trying to get occluding to work, don't really need it for just saving keyframes as one roams around but it would be helpful.

using gluPerspective() and gluLookAt() with the values from the camera target and up pos.xyz and afaik near and far are 0.001 and 100.0

the shader does not appear to set gl_FragDepth, the only one I've seen that does is eiffieGI.frag

modelview is relative to object, projection is relative to camera

I'm not entirely sure of the inner workings of the GLSL code regarding assumptions about eye(0,0,0)

I don't pop or push a matrix or loadidentity in the spline part, it just calls draw commands on the current context/view/matrix

no, I don't think the shader is concerned at all with the GL zbuffer, at least not in an outright manner, when a vert/frag shader writes a pixel doesn't that cause GL to calculate and write the zbuffer for display purpose?

haven't specifically tested glError() or looked at a dump of zbuffer, view as an image? but that's a definite todo

so just need to get the shader populating the zbuffer with the right transform for the primitives to use, sounds simple enough :crazy:

edit: when target is at 0,0,0 I see the object (bulb) center screen and eye is 2,0,0


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: Syntopia on July 19, 2013, 09:56:42 AM
Hi,

I've been on vacation without internet for a while, so I haven't followed this thread.

Fragmentarium does not use the ModelView matrix and Projection matrix to set up the camera. The ModelView matrix is unused, and the Projection matrix is only used to setup the tile rendering - normally it is just unity. The advantage of this is that it is possible to do more complex projections (such as equirectangular projections), but the downside is that coupling with standard OpenGL will be harder. But I guess you are already setting the OpenGL camera yourself with gluPerspective(): Start by creating some boxes/spheres at various position using both OpenGL and GLSL and check that they are aligned when moving the camera, changing the FOV and so on.

Also notice that the intermediate buffers used by Fragmentarium does indeed not create depth buffers, as Marius suggested - this can be changed though: try searching for the QGLFramebufferObject(...) constructor and make sure that QGLFramebufferObject::NoAttachment is changed to QGLFramebufferObject::Depth.

What do you write to gl_FragDepth and where do you do it?



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 11:57:29 AM
in DErt-v0.9.10.frag trace routine I tried 0.0 for a hit and 1.0 for background and floor, just for a simple mask effect with some odd results as well as a number of different formulas found on the net and suggested by other users, no useable results yet, as far as placement and perspective go they seem good, I think there might be an issue with the way the accumulative rendering mode works, will have to let the depth buffer accumulate too or be full of holes.
With my limited math skills I could see that the internal workings are not GL-centric but my logic says "distance from eye to object factored between 0 and 1 stored in zbuffer = occlusion"  so here I am  ;D

yes, studied marius' code and read GL docs on how QGLFramebufferObject(...) works, taking a minor detour from GL code with setting the focalplane to track the target distance, request by Vinz, only 3 or 4 lines, back to GL tomorrow? will enable the depth buffer and try the simplest no math type of test 0 or 1 hit/miss for a mask type effect and if that works out I'll proceed with trying to populate it.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 03:58:55 PM
hey vinz, you mean like this...

http://vimeo.com/moogaloop.swf?clip_id=70625008

easy to attach the focal plane to the target because it's already moving on a spline
and makes sense to follow target with observer focus but
Aperture and Details will need a control scheme that gets the desired effect and makes sense

hm... back to occlusion


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: eiffie on July 19, 2013, 06:33:17 PM
What the heck I will post it again. You need to populate the depth buffer with this...
Code:
float zNear = 0.001;
float adt = MaxDistance / (MaxDistance - zNear);
float bdt = MaxDistance * zNear / (zNear - MaxDistance);
gl_FragDepth = (adt + bdt / clamp(totalDist/length(dir), zNear, MaxDistance));
There may be other issues but you at least need to do this. It is the same as Marius' code but with Fragmentarium's variables.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 07:09:16 PM
yes, tnx again, I did use that but the result wasn't the desired result so I tried 0.0 = hit 1.0 = miss and that doesn't give the mask you would expect either, give it a try, the GL draw commands are in the spline obj

edit: I'll send you the modified DisplayWidget.cpp so you don't have to do any typing  :)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 19, 2013, 10:05:25 PM
hey vinz, you mean like this...

http://vimeo.com/moogaloop.swf?clip_id=70625008

easy to attach the focal plane to the target because it's already moving on a spline
and makes sense to follow target with observer focus but
Aperture and Details will need a control scheme that gets the desired effect and makes sense

hm... back to occlusion

Hey Dick ! :beer: :beer: :beer: :beer:
An autofocus, cool ! for what i've understood u have linked focalplane to target parameters.
Yes that's a great improvement... it will be usefull for sure.

i'm not sure about what i will said , but i think the camera target is not always where we want to focus( let me know if i'm wrong but camera target is here to give a direction to the camera, and this direction is not always pointing on the object, right?), is the focal plane still stay non animatable by himself?

anyway, Thanks for that autofocus ahhahahaha ! Great Work  :D
is this code on github?


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 19, 2013, 11:13:01 PM
hm.. I guess that is auto focus  :D not what you were looking for? :sad1:

uhm... the focal plane will always be perpendicular to view direction and target will always be center of view no matter where you look so how else can you animate it? it's either closer or farther away, the only limitation is the focal plane max distance is set at 5.0 but that can be changed and you will have to be careful about target placement when creating key frames unless AutoFocus is off.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 20, 2013, 02:10:18 AM
Hey Dick :)
I was looking for interpolating focalplane values between each keyframe, like others camera value (a linear interpolation would be enough imo ) at each keyframe you adjust your focalplane value et voila !
but no problem this autofocus like, is really a cool thingy ... i'll check the github to give a try to this new one :D

... you will have to be careful about target placement when creating key frames unless AutoFocus is off.

I've to admit without a try it's hard say if my option is the best one ! but if we can switch between autofocus on and manual keyframe ... it's the Best !
but i don't want to ask you more ... what you are doing is pretty coooool  :beer: :beer: :beer:

Glad to see that you are evolving in camera path curve object occlusion :)  does it will work only with defaut Raytracer ?


EDIT: I've check github, it seems the autofocus is not there  :sad1: perhaps you don't want to share a too young code ...let me know if i can give a try :)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 20, 2013, 02:46:42 AM
at each key frame you can adjust the focalplane by placing the target farther or closer,
what I'm saying is, that's it, it's done, with the focalplane attached to the target you can move it where ever you need to at each key frame,
I think there is no more to it than that.
(not in git-hub yet still have to compensate for my bruteforce method and make it friendly and compliant)

hopefully my next git-hub update will include AutoFocus and path Occlusion, hmm need a toggle button somewhere for AF.

everything I'm doing should work with all Fragmentarium raytracers


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on July 20, 2013, 02:55:04 AM
HAHAHAH EXCELLENTT! !!!! sorry if my lack of English ...  :embarrass:
i can't wait to put my hand on this  :D :D :D :D :D
:thanks1:

....  hmm need a toggle button somewhere for AF.

i suppose this is software button so it cannot be on parameters tab right? so why not to add this one on the animation panel near keyframe listbox ? or why not a checkbox instead a button probably easier to place.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 20, 2013, 03:31:19 AM
yes, I think the AnimController is a good candidate but I want it to activate when you apply a keyframe preset in the render view too not just when animating


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 23, 2013, 05:50:49 PM
posted some changes to the git-hub fork

now draws spline paths for camera and target (still no occlusion but still helpful) Fragmentarium uses 3 buffers, backbuffer(ID=1), previewbuffer(ID=2) and that gets drawn on the current defaultbuffer(ID=0) afaict, occlusion is still elusive, I've gone so far as to write a mask from the fragment code and then bitBlit the depthbuffer into the current depthbuffer and then draw the splines, didn't work but I'm learning.
Syntopia wasn't kidding when he said occlusion would be difficult in Fragmentarium.

added an AutoFocus toggle to the Raytracer tab (3D.frag) works when selecting a keyframe in the animation controller or from the presets list, and a tutorial frag that uses this feature

caveat: I noticed with the "time" variable that it is not enough to declare it in fragment code, it has to actually get used or the compiler optimizes it out, the AutoFocus variable is declared in 3D.frag but not used anywhere in the GLSL code, the widget it creates in the raytracer tab is accessed from GUI C++ code, so far this doesn't seem to cause any problems but for some odd toggle action (may have to click twice to enable but that could just be my hacked access testing method)



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 25, 2013, 05:29:11 PM
taking a break from occlusion, occluding myself? I managed to cobble together a parameter morphing thing-a-ma-jig that applies attack, sustain and decay in 40 different ways, right now is just a test, this works on any single value parameter

TODO: allow start and end frames (duration and placement)
           multiple occurrences per value parameter (ideally)

http://vimeo.com/moogaloop.swf?clip_id=71036666

WOW I love Qt!



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on July 25, 2013, 05:52:30 PM
awesome work, such easing effect can realy lead to funny stuff, the bouncing can be used to actually let something bounce on the floor

i have to ask, because i still can not check it out for myself, is it now based on default parameters interpolating, or do you create keyframes on the fly while editing ?!?!


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 25, 2013, 06:39:02 PM
for the eye, target, up path I find it's easiest to surf around saving keys as you go, more where you want to go slow, fewer where you want to go fast then once you have a nice fly-about plotted you can start morphing the params, I've been testing this since I got it working and it seems like a very stable method with minimal impact on the render engine

for the parameter morphing I have just implemented a very basic functionality of selecting any single float parameter and applying one in/out transition over the length of the animation, however this is just a proof of concept (not in git-hub yet) and I hope it can evolve into something like being able to set start/end frames with multiple instances of different curves for one variable anywhere in the time line and then maybe I'll work on multiple variable transitions.

I can just imagine some of the warped and wiggley mighty morphing mandelbulbs that are going to start crawling around  :evil1:


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on July 29, 2013, 08:10:37 AM
ok, patched up a few things, no save yet but very useable...

*** Easing Curve Tutorial for current git-hub 3Dickulus version ***

Use with one of the files from "Tutorials" 30 or 31

1> Select the "Power" variable in the "Mandelbulb" tab
2> Press "F7" or select the menu item "Edit->Add Easing Curve"
3> Select a nice curve.
4> Change the start/finish values (will be set from previous value or they will both be set as start value, start must != finish)
5> Change the first/last frame values (will be set from previous value or they will both be set as 1, first must != last)
6> Click "Ok" button

To change a curve set previously use the same steps as above and you will be prompted to "Apply" these changes, "Discard" the current settings or "Cancel" do nothing.
Warning: "Discard" deletes the easing curve settings for this variable.

The Easing curve is now applied to the variable you selected and will be active for the frame range you specified.
To see the results click the "Animation" button and hit "Play" or drag the slider.

That's it :D

I'm thinking about storing the EasingCurve settings as comments in the preset, the above might look like...

Code:
/// Power:SineCurve:43:1.0:8.96:40:200

inserted right before the "Power" variable in the default preset, or maybe in a file formatted for EDL compatibility used to key sound or other post render video effects

NOTE: in this version of Fragmentarium it is expected that a frag file has ONLY a default preset and keyframe presets along with your fragment code that uses the "time" variable. If this variable is not actually used it gets optimized out by the compiler resulting in no animation ability, it is not enough to simply declare this variable, it must get referenced as well.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on August 10, 2013, 01:44:37 AM
Since the last update made everything I hacked go out the window  :o and forced me to start almost from scratch I have removed the github fork of v0.9.2 that I had created rather than trying to patch it up, if need be, I will create a fork from 1.0 release candidate. The source code for v0.9.51 a.k.a. v1.0b with all of the functionality mentioned in this thread plus a couple of minor tweaks is available to anyone who wants it, given enough interest I will host a zip file  (http://www.digilanti.org/fragmentarium/)on my webserver.

I am currently working on getting a windows box setup with a development environment so that I might be able to provide a win.exe in the future.

Current Status:
  • Stops playing/rendering at the end of animation. (not sure about Win but on my linux box it wouldn't stop when time reached MaxTime)
  • Saves animation "length" as app setting so it gets set where you left it from the last run.
  • Saves render "frames per second" as app setting so it gets set where you left it from the last run.
  • Uses seconds:frames to track rendering instead of floating point time. I don't care about the frames in between the 25 fps that I need for animation.
  • Setting and saving camera spline path controlpoints as "KeyFrame" presets. Edit->Menu item or hotkey F8
    (auto increment works properly now)
  • Setting and saving In/Out easing curves for any/all single "Float" parameter.  Edit->Menu item or hotkey F7
    (saved in params file or preset and in the .frag when auto generating "<someName>.png Files")
  • Shows spline paths and controlpoints when in Progressive/Stop mode.
    (still not quite right but definitely helps me as an animator/artist)
  • Camera follows spline path when in Animation/Play mode.
  • Camera follows spline path when in Animation/Stop mode when the time slider is moved.
  • When in Progressive/Stop mode the "view vector" connects points between the Eye and Target paths relative to frame number when the time slider is moved.
  • Displays current rendered frame when saving animation to disk so that if something isn't set right or didn't hookup the way you expected you can stop that 45000 frame animation and fix it without waiting until it's finished 8 hours later.  (depending on your hardware)
  • Tests for user added AutoFocus checkbox in Raytracer tab, focalplane tracks target when enabled.
    (see tutorial 31)
  • Ticks on TimeSlider representing keyframes

*********************************************************************
* 08/28/13
* Moved to Qt 5.1.1 added MinGW build
* glu library dependancy removed
* now uses QMatrix4x4 perspective and lookat
*********************************************************************

Bon Apetite  :dink:  v1.0b hacked !

 Source Code (http://www.digilanti.org/fragmentarium/) Modified from v1.0

 Windows Executable (http://www.digilanti.org/fragmentarium/) Compiled against Qt 5.1.1 with MinGW 4.8.1 on a Windows 7 box.



Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: vinz on August 17, 2013, 06:34:06 PM
Great to see how deep that your work/idea is evolving :)
keep going 3dickulus :D


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on August 17, 2013, 09:39:09 PM
tnx vinz, I couldn't have done it without you  :dink:
feel free to compile a win version and spread it around, I still haven't put together a win box for compiling, got some parts together, need an HD and monitor and I'll be up and running.

edit: compiled win exe link posted above


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on August 31, 2013, 03:23:00 AM
Vinz asked "how you animated the parameters in tut 32"

well...

The comments like this are the settings for the actions

/// Cycles:CosineCurve:44:1:24:1:240:0.3:1:1.7
/// Power:SineCurve:43:1:6:20:220:0.3:1:1.7
/// RotAngle:OutInBack:36:0:360:40:200:0.3:1:1.7

"///" = parser flag so we can find and recognize them

the items on each line are used as follows...

[Var Name]:[Ease Name]:[Ease Type]:[start frame]:[end frame]:[begin parm value]:[end parm value]:[period]:[amplitude]:[overshoot]

yes yes a lot of silly things to remember but fortunately there's a nice little GUI for all that :)

1> load tutorial 32
2> Select the "Mandelbulb" tab
3> Select the "Power" slider
4> Push "F7" key (or menu item "Edit->Add Easing Curve")
5> Change some settings :D
     (a little math to figure out frame start finish numbers, I'll fix that to a start/fin slider or something)
6> hit OK that's it, voila!

Frames before start frame will use start value until start frame is reached.
Frames after finish frame will use finish value until end of animation is reached.
These become active when the animation is playing.

When you do this on a var that already has a curve you will be prompted "Apply" "Discard" "Cancel"

"Apply" will change these settings for this var (liked it so set it)
"Discard" will delete the settings for this var (clean up so no animating)
"Cancel" does nothing

This only saves internally the changes!!! if you like the result then...

1> you need to save params file or
2> add a new preset with a new name and save the GLSL script or
3> render a highres or anim to create "<name>png Files"
     this  folder will have all of your var morph settings in a single default preset but no campath keyframes
     as they can be cut and pasted if needed

camera path KeyFrame presets are only saved to a file when you save the GLSL script you create  them in.
param morph settings should all be in one named (not keyframe) preset.

Its not terribly complicated :O and once you play with it for a while I'm sure you will figure it out have fun :D

Disclaimer: Most of the code I've added to Fragmentarium was just hacking proof of concept, I know it needs a lot of adjusting and tweaking but that will come with input from users and hopefully contributions from other coders.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on August 31, 2013, 11:54:10 PM
How to use the auto focus...

add this code to your GLSL script...
right before the raytracer #include like...
Code:
#group Raytracer
// Sets focal plane to Target location
uniform bool AutoFocus; checkbox[false]

#include "DE-Raytracer.frag"

Now in the Raytracer tab you can enable/disable focal plane target tracking, the focal plane maximum distance is 5,
if you need more than that...
Open the 3D.frag file and at around line 94 edit the focal plane widget maximum...

uniform float FocalPlane; slider[0,1,5]

to what ever you  need like...

uniform float FocalPlane; slider[0,1,50]

keep in mind that the target floats around at some distance from the camera, dynamically adjusted (sometimes a lot) as you navigate,
it is generally beyond what you are looking at and will need to be adjusted by hand in the keyframe presets.

TODO: add target locking mechanism so it stays where you put it or add click/drag editing for spline control points.


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 02, 2013, 07:27:47 AM
I found a nifty Qt (nokia code) range slider widget that I would like to use for setting frame-in and frame-out and it works great but... there's always a but...
it compiles and works perfectly on linux under Qt 4.8 but chokes and won't compile on windows under Qt 5.1, the problem is that in 5.1 QIcon and QLayout now report being virtual functions pure in this context and thus won't allocate "new QStyleRangeSlider()"

any input would be appreciated. (especially if there is a Qt5 widget I'm not familiar with yet)


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on September 02, 2013, 09:18:55 AM
hmm, sounds like there should be some mentioning of those changes in the "port guide to 5"
http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5

i am unfamillar with current qt verisons, i think last time i used qt was the 3 branch


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 02, 2013, 11:49:26 AM
tnx cK  ;D nailed it! the above mentioned "nifty widget" is now working, just had to re-implement the missing functions 2EZ! Qt Rocks!
I think it would be nice to popup this doodle when RMB or hovering over a float slider that has settings.

Windows executable here (http://www.digilanti.org/fragmentarium/)                Source code here (http://www.digilanti.org/fragmentarium/)

bon appetite!


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 02, 2013, 03:26:29 PM
This might be of interest to other coders that use QtCreator and QtDesigner, I built a RangeSlider widget plugin for Designer  :o

Just unpack it and open the project with QtCreator, configure, build, install and it should be ready for use.
You will find two new widgets under "Input Widgets" int and double RangeSliders.

Here's the source code QtRangeSlider.zip (http://www.digilanti.org/fragmentarium/QtRangeSlider.zip)

cheers  :dink:

P.S. used this to add one of each to the EasingCurve editor int for frameRange and double for valueRange
      the valueRange can be higher to start and lower at end by using the spinBox to adjust,
      the frameRange can not.

hmm... maybe this post should be on the "programming" board?


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 05, 2013, 03:53:56 PM
I've posted a zip file of the executable only,
for those who have already downloaded the larger file with all of the libraries
or if you have Qt 5.1.1 installed with MinGW from the qt-projects site (http://qt-project.org/downloads)
this file is only 350k Fragmentarium-Desktop_Qt_5_1_1_MinGW_32bit-Release-exe-only.zip (http://www.digilanti.org/fragmentarium/)

overwrite the Fragmentarium.exe file with this one or copy
icudt51.dll  icuuc51.dll  libstdc++-6.dll Qt5Core.dll  Qt5OpenGL.dll  Qt5Widgets.dll
icuin51.dll  libgcc_s_dw2-1.dll  libwinpthread-1.dll  Qt5Gui.dll   Qt5Script.dll  Qt5Xml.dll

into the same folder as Fragmentarium.exe

latest tweak: the spline paths and control points now show up with the right colors but only line up properly when FOV == 1.0  :embarrass:


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 29, 2013, 04:07:25 PM
My humblest apologies to anyone that tried to download the 3Dickulus version of Fragmentarium over the last week,
had a little disaster, lost 3 machines and a hub :angry: but I did manage to save the webserver and all of it's data :D

It's back online now.

edit: set up a temporary system until I can rebuild properly, any problems just post me a note


Title: Re: cat mull rom spline paths ! camera/parameter keyframes !
Post by: DarkBeam on September 30, 2013, 10:08:44 AM
I am laughing at "cat mull"! Meow! ;D ;D ;D


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on September 30, 2013, 10:18:11 AM
 :embarrass: fatfinkers typing too fast with over emphasis on the enter key and a bit of distraction with coding up this version causing an apparent lack of desire to fix it... but I suppose it will only take a moment  :embarrass:


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 02, 2013, 11:31:05 AM
Hi, just a question about animations.
I am using the Fragmentarium version of the  28th of August and I am playing around with animations in equirectangular fractals.
So far I am sort of successfull with the key frame animations but I have two questions (bear in mind I have not done that much work with Fragmentarium).

I posted two 360 videos on vrtv360.
In my first one http://www.vrtv360.com/watch=TLCaoGEMWils (http://www.vrtv360.com/watch=TLCaoGEMWils) you can sometimes see the splinepath and I am not sure why that is. I made the path in progressive mode using F8 to insert keyframes and I do not see the path when I use the animation slider but I see it in the finished render.
Then again that did not happen in another animation I did so I am not sure how I caused it.

Now the second question is how do I change fractal parameters.  I would the fractal to be unchanged for e.g. 5 keyframes and then change one (or more) parameter(s) over the next 3 frames and then fly on.
As far as I read those changed paramters do not go in the keyframe section (as they do in Mandelbulb 3D AFAIK).
Do I need to use the script section and set up some if (time > 20 ) { 'start parameter change' } and do my own calculations or is there an easier way?

Sorry if I am missing something really obvious.



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 02, 2013, 12:02:28 PM
Quote
you can sometimes see the splinepath and I am not sure why that is.
hmmm... I haven't had that happen but if I can reproduce it I'll fix it,
if you post me a copy of the frag file with keyframes and default preset you're using I'll give it a run
Quote
how do I change fractal parameters
at the top of this page(5) is a description of the steps for animating parameters

basically:
 1> select any single float value (click on the slider so it's highlighted)
 2> press the "F7" key and make some changes in the dialog that pops up (value start/finish and frame start/finish and easing curve type)
 3> hit "OK"

the transition will take place over the selected frame range

don't forget to save a preset NOT named keyframe.nnn to preserve these

have a look at Fragmentarium/Examples/Tutorials/32 - Simple Multi-Parameter Easing Animation.frag
the default preset contains the parameter morphs and at least two keyframes are needed for animating

NOTE: the last preset applied is used as the base for settings over the length of the anmation, no GLSL editing is required unless you have some special function you want to apply for an effect.

EDIT: very cool video btw  :beer:



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 02, 2013, 01:09:19 PM
Ahhh!!!
I knew I was missing something. :embarrass:
I did the F7 thing and saved them as non-keyframes parameters BUT I put each change in a separate parameter section and started the animation with default - somhow wondering how those sections will be chosen because I could find no reference to them anywhere.

As you say - once you got it it seems quite obvious.

Thanks, my first flythrough with parameter changes is just rendering!  ;D


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 02, 2013, 01:24:28 PM
Well it worked fine in terms of parameter changes.
BUT
the splinepath lines are back.
Starting in frame 400 and ending in 469.
I have attached the .frag file I am using and a crop of frame 413 with the spline line.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on October 02, 2013, 02:51:30 PM
Yes, I confirm the words barcud! Indeed, in the finished animation skips the line splines.

http://www.youtube.com/watch?v=R_ZCHI8nNzA


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 02, 2013, 09:06:11 PM
indeed pieces of the path appear randomly :sad1: not sure how that got through the many anims and Ks of frames I've rendered
I'll dig into it this evening, currently the test is...

Code:
drawingState != Animation && !isContinuous()

are you using the precompiled win-exe  or compiled from source?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 02, 2013, 10:01:06 PM
I use the precompiled win-exe version you posted on the 28/08/2013 in this thread.

Another question regarding animating parameters (which is working nicely but I still wanted to ask):

is it possible to animate one parameter multiple times with different frame ranges like

//Detail:OutBounce:38:-2.53787:-3.46787:200:600:0.3:1:1.7
//Detail:OutBounce:38:-3.46787:-2.76859:800:1200:0.3:1:1.7

I tried it and it seems that it is only taking the second line and the first one is ignored; after a build and apply the parameter starts with -3.46787
No issue - just asking.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 02, 2013, 10:09:34 PM
Quote
is it possible to animate one parameter multiple times with different frame ranges
Frames before start frame will use start value until start frame is reached.
Frames after finish frame will use finish value until end of animation is reached.

just a one-shot deal for now but "Easing" should definitely have an IN transition and an OUT transition

edit: source code is patched and on my website...  win exe patched and compiled too... (http://www.digilanti.org/fragmentarium)
        will look into adding EaseIN and EaseOUT  :dink:


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 03, 2013, 05:34:38 PM
Just wanted to say that the parameter animation and camera movement work really well.
Updated example video can be seen here http://www.vrtv360.com/watch=1QHQYeD3ozLF (http://www.vrtv360.com/watch=1QHQYeD3ozLF) :surprised:

And in case anybody is interested in the frag file with keyframes and parameter changes - it is attached.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Nahee_Enterprises on October 03, 2013, 05:45:17 PM
    Just wanted to say that the parameter animation and camera movement work really well.
    Updated example video can be seen here http://www.vrtv360.com/watch=1QHQYeD3ozLF (http://www.vrtv360.com/watch=1QHQYeD3ozLF) :surprised:
    And in case anybody is interested in the frag file with keyframes and parameter changes - it is attached.

A nice short video.   Loaded a bit slow, but once it did, the view flowed evenly.  And thanks for the .FRAG file!!!     :D
 


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 03, 2013, 05:49:10 PM
was this rendered with the latest version ? 358186 Oct 2 14:03 (http://www.digilanti.org/fragmentarium/) ?
I see what looks like a path segment, odd that it would just render a segment and not the whole path.
I rendered a 250 frame anim using your frag file and saw no path segments with the most recently posted version.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 03, 2013, 09:42:06 PM
Well lets put it this way - I downloaded the latest version put the .exe in the directory of the older download. Then I did something completely different and when I came back I started Fragmentarium via a desktop link which naturally started the old .exe because I hadn't updated the link.
So the short answer is - NO  :sad1: :embarrass:

But to redeem myself I have used the latest .exe and recreated the video and the path segments are gone.

Thanks a lot!


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 03, 2013, 10:50:09 PM
good to hear they're not rendering where they don't belong,
can you post the vid on the rate my short animation (http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/) board or is the player proprietary to that site? a screen capture and link would do.

3000x1500,  it's a little heavy for the duration but worth it, it took some time to load and played in stop motion until complete but after that it was pretty smooth and a great way to explore a fractal.  :beer:



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 04, 2013, 11:00:21 AM
I will try to get an animation in the board. Problem is, that the player is proprietary to that site and another site which allows embedding is not really that good in terms of quality.

You said that 3000x1500 was a bit heavy - problem is I come from a panoramic photo background and there you want a bit of good resolution so ou can also zoom in. I am trying to find a balance between file size and resolution (and the right codec and its parameters).
Thing is normally a 24mm lens (a wide angle lens where distortion starts creeping in) covers only about 90 degrees FOV. So in that scenario you still need to transmit/create 6 times the amount of pixels you actually look at and any zooming in looses quality which you expect in a photo but not really in a fractal.

Well hey, I will get something on that board and at the moment it is more about the work you have done to make that possible than the visual perfection.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on October 05, 2013, 05:28:14 AM
Thank you so much, 3dickulus! I replaced. Exe file and the files from 358186 Oct 2 14:03, loaded the old test animations and pieces of splines are no longer slip in the animation!

I apologize for the machine translation!


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 05, 2013, 09:32:35 AM
You're very welcome (SCORPION and  barcud) :D I can't wait to see more and I must say that you, barcud, surprised me with the 360 view vid, very cool.

I'm really glad to see that my little hacks are useful tools for fractal artists, I'm still tinkering with having more than one transition per parameter but I think this is a relatively new thing so there aren't any examples or tutorials on more than one at a time, at least I haven't seen any and in my earlier attempts they seemed to fight with each other for control, that's why only one. The way I'm using it is not the way it was intended, you know how buttons or other things appear on a cell phone, sweeping in or expanding or bouncing, that is what this feature of Qt was primarily designed for (I think), trigger it and let it play out until done based on internal timer, in fragmentarium the current position is paused when started, holding the first value until the start transition frame is reached, then the next frame is rendered and then advanced one tick and paused again then at the end of the transition sequence it gets paused again to hold the end value until the end of the animation. A little more hacking and I should be able to come up with something  :)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on October 05, 2013, 10:25:55 AM
Yes, we'll be waiting!
Just a question about the possibility of one animation slider. It is necessary to define the limits of animation varying the rate of change of the parameter. But now this is not possible, you can only rewrite the parameters or to do a few scenes, and then collect the animation of the different pieces.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 05, 2013, 11:10:39 AM
Quote
Just a question about the possibility of one animation slider.
not sure what you mean by this? you mean one transition per float slider?
Quote
you can only rewrite the parameters or to do a few scenes, and then collect the animation of the different pieces
Yes, to apply more than one transition to a single parameter you would have to render separate scenes then join them together

I'm thinking that in the part of the code where I test and set the frame number I could delete the first transition when it reaches it's end and create a new one to replace it for the next transition, that should work for any number of transitions per parameter, another option might be to take the parameter-anim object out of the slider class and maintain a list,
there are also three different types of property animation groups that could replace the single declaration. I need to find the time to explore these and figure out what I can get away with given the conditions of the application.

there is also a "direction" flag that reverses the transition, intended for bringing a graphic object into view then moving it out of view with the same effect, another option to add to the TODO list.

so the way it is now we have an IN transition,
need to add an option to select OUT transition as the reverse of IN or a different one...
option==reverse then OUT would be IN backwards or...
option==new then prompt user to setup OUT that starts with the end value of the IN transition

hack,hack,hack,hack...


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: barcud on October 08, 2013, 10:35:44 AM
Just realised that there is quite an easy and not very elegant way to solve the 'more than one transition for a single parameter' problem.
It requires a code change in the frag file but nothing functional, just creating and adding variables.

Instead of using one slider
Code:
uniform float Parameter; slider[-0.01,0,0.01]
just split it up in several parameters
Code:
uniform float Parameter1; slider[-0.01,0,0.01]
uniform float Parameter2; slider[-0.01,0,0.01]
uniform float Parameter3; slider[-0.01,0,0.01]
where each of them can now have a transition
Code:
/// Parameter1:InQuad:1:0.01:0:1:88:0.3:1:1.7
/// Parameter2:OutBounce:38:0:0.01:137:216:0.3:1:1.7
/// Parameter3:OutCurve:42:0:-0.01:252:356:0.3:1:1.7
and add them just before you need it
Code:
float Parameter=Parameter1+Parameter2+Parameter3 ;
That will transition the variable Parameter 0.01->0 from frame 1 to 88 then 0->0.01 from frame 137 to 216 and back again 0.01->0 from frame 252 to 356.

There is a little snag with this method: the transition start values for Parameter2 and 3 need to start at 0, because the script will set the values of the parameter directly to the starting value.
It is a bit fiddly but it works.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on October 08, 2013, 11:13:59 AM
wow, yeah that kinda works if you get creative and fiddle with it a bit

if slider range is -n to +n as long as the first one ends on 0 and the third one goes to -n that will give us the transition +n to 0 to +n to 0

the extra sliders or maybe just the last slider has to range from -n to 0 to bring the positive transition back to 0

try that with a slider that has a range of 0 to +n and it doesn't work unless each transition ends on 0, well not the way I would like it to work,

a very interesting insight barcud  :dink:


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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) (http://www.fractalforums.com/fragmentarium/equirectangular-progressive-render-not-accumulating-subframes/)

updated packages available now @ digilanti.org (http://www.digilanti.org/fragmentarium/)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION 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/


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION 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 ?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION 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?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION 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


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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 :)

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.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 22, 2013, 10:04:18 PM
Recent additions to the source code...

* Added a CMakeLists.txt file :)
* 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/ (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 :)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on November 23, 2013, 02:58:44 AM
I still wait for the assembly to Windows...


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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

 :)  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
:D


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 27, 2013, 09:47:04 AM
Ok, I posted a win exe on my website (http://www.digilanti.org/fragmentarium/) and of course the standard disclaimer applies...
This is experimental, use at your own risk, it works on my box :)

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.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION 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.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 30, 2013, 04:05:36 AM
tnx  :)

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.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus 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 (http://www.digilanti.org/fragmentarium/)

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 ??? 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.



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 09, 2013, 07:52:34 AM
trying out line numbers in the editor... I like it  :dink:


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on December 09, 2013, 10:55:20 AM
Very good!
Now I look forward to highlighting syntax errors!

 ::)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 10, 2013, 08:06:07 AM
I'm still fiddling with it but it should be completed soon.
Quote
highlighting syntax errors
because the word list is everything in GLSL then if it doesn't highlight it's not valid GLSL but it won't underline errors for you or do code completing by offering suggestions,
maybe if I have the time it would be a good way to learn about all of the commands and functions.
just for fun here's the list, let me know if I missed any  :dink:

Code:
//keywords
break continue do for while if else true false discard return struct
//types
float int void bool mat2 mat3 mat4 vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4
sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow
//type qualifiers
attribute const uniform varying in out inout
//Angle and Trigonometry Functions
radians degrees sin cos tan asin acos atan
//Exponential Functions
pow exp log exp2 log2 sqrt inversesqrt
//Common Functions
abs sign floor ceil fract mod min max clamp mix step smoothstep
//Geometric Functions
length distance dot cross normalize ftransform faceforward reflect refract
//Matrix Functions
matrixCompMult
//Vector Relational Functions
lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not
//Texture Lookup Functions
texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod
texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D
shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod
//Fragment Processing Functions
dFdx dFdy fwidth
//Noise Functions
noise1 noise2 noise3 noise4
//Vertex Shader Special Variables
gl_Position gl_PointSize gl_ClipVertex
//Fragment Shader Special Variables
gl_FragCoord gl_FragFacing gl_FragColor gl_FragData gl_FragDepth
// Vertex Shader Built-in Attributes
gl_Color gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord2
gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogColor
//Built-in Constants
gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttributes gl_MaxVertexUniformComponents gl_MaxVaryingFloats
gl_MaxVertexTextureImageUnits gl_MaxCombinedTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxDrawBuffers
//Built-in Uniform State
gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse
gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse  gl_TextureMatrixInverse gl_ModelViewMatrixTranspose
gl_ProjectionMatrixTranspose gl_ModelViewProjectionMatrixTranspose gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose
gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose
gl_NormScale gl_DepthRangeParameters gl_DepthRange gl_ClipPlane gl_PointParameters gl_Point gl_MaterialParameters
gl_FrontMaterial gl_BackMaterial gl_LightSourceParameters gl_LightSource gl_LightModelParameters gl_LightModel gl_LightModelProducts
gl_FrontLightModelProduct gl_BackLightModelProduct gl_LightProducts gl_FrontLightProduct gl_BackLightProduct
gl_TextureEnvColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_ObjectPlaneS gl_ObjectPlaneT gl_ObjectPlaneR
gl_ObjectPlaneQ gl_FogParameters gl_Fog
//Varying Variables
gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_Color gl_SecondaryColor


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: eiffie on December 10, 2013, 04:21:27 PM
I haven't made an error for so long (hahaha) I don't know if Fragmentarium still displays the line number for the error as the combined source line#. It would be nice if the line numbering could match with the error line number.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 10, 2013, 04:57:23 PM
Quote
It would be nice if the line numbering could match with the error line number.

yeah it would, I think it might be figured out from a dump of the processed script after all the parts are put together and stripped of comments and such, just having the numbers in the editor helps, oh duh! I could just offset those eh? good idea, maybe when I'm done fiddling with the highlighting, as time permits :)

I found an xml file that lists everything from 1.0 to 4.3 , using #version should let the highlighter figure out what to strike out or underline, if no #version tag then default to 1.1 or 1.2... something like that.

Edit: offset applied, error line on compile matches line number in display  :D


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: eiffie on December 10, 2013, 07:37:48 PM
Excellent! That will be a big help when writing complex scripts.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 10, 2013, 08:10:43 PM
not extensively tested but seems to work on Mandelbulb.frag (#includes 4 other files) and Gi.frag (#includes 2 other files) so I'm taking it for granted as functional. I think this is only good for errors in the user script and may or may not be accurate for files with the #donotrun tag as they don't get sent to the GPU when in the editor.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Syntopia on December 10, 2013, 09:39:59 PM
yeah it would, I think it might be figured out from a dump of the processed script after all the parts are put together and stripped of comments and such, just having the numbers in the editor helps, oh duh! I could just offset those eh? good idea, maybe when I'm done fiddling with the highlighting, as time permits :)

I found an xml file that lists everything from 1.0 to 4.3 , using #version should let the highlighter figure out what to strike out or underline, if no #version tag then default to 1.1 or 1.2... something like that.

Edit: offset applied, error line on compile matches line number in display  :D

Ye olde Fragmentarium already does that, if you click at a line, the statusbar should show the line number from the final combined script in the statusbar - notice that this should also work for any included "#donotrun" files if they are open in the editor (see screenshot).


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 10, 2013, 10:56:08 PM
lol, toooche, of course it does, blind as a bat sometimes, if it was any closer it would have bit me, well, the line numbers I put in the editor are accurate for the user scripts like Mandelbulb.frag :) in sync with the status bar. There will be a preferences flag to turn them off.

loaded BufferShader.frag and status bar says (Not part of current script) ? with 3D.frag  it says the first line is line 7, but my numbering scheme says the first line is 636, I'm pretty sure that's wrong.

the new highlighter works quite well, I deleted the highlighter class stuff from MainWindow.cpp and moved it to Highlighter.h and fixed a couple of minor bugs, now #include it in MainWindow.cpp.
Attached if you would like to look it over  :)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 12, 2013, 02:58:57 PM
So...
I have just updated the exe and sources on my website, this incarnation of Fragmentarium now has version sensitive highlighting  :D
Good for 1.0 - 4.3 defaults to 1.1 . Now any commands or variables that are not valid for the currently set version get a strike through
In general all commands in versions lower than currently set version will not have a strike through , I think there is room in there for some syntax error handling and maybe contextual help, command completion, or code snipits, or just info about the hovered command.

It would be nice to have someone who knows GLSL very well take this for a test ride... Syntopia? Kali? Eiffie? Dr. Wiessenhimer?

the source code and win exe (http://www.digilanti.org/fragmentarium/) are available


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Syntopia on December 12, 2013, 10:10:38 PM
Looks nice!

How do I turn on the line number offsets?

I also played a bit around with the strike through thing - I notice that if I wrote for instance 'sample' it was striked though, but I don't think it is a keyword in any GLSL version?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 12, 2013, 10:45:48 PM
tnx, did you try the source or exe from my web site?

the file I posted above is a free standing piece ie: it can be used with QTextEdit or QPlainTextEdit or QDocument without any special requirements, just include and call like > new Highlighter(textEdit) < . the source and exe from my site are a bit different.

The line numbers are part of your TextEdit class, look at the bottom of MainWindow.h, QTextEdit is accessed through your class now, all instances of QTextEdit are now TextEdit. I put the line numbers back to a no-offset state, it wasn't quite right anyway and the status bar has a line number that is relevant for debugging. You can turn them off/on in the preferences dialog.

QRegEx is not my specialty so my rules may not be the best, the word "sample" is listed as a v4.0 word so if #version is less than 400 it will strike out

I haven't put deprecated or ES conditions in yet, it's only based on version numbers 100 to 430. If you grab the source.zip it has a QtCreator.pro file named Fragmentarium-Source.pro that I used to compile on windows. I had to pre-create the headers from the ui files and edit them to get it to compile on win but it's all there so it should be a point and click opperation.

I noticed that "r1" strikes out too, not sure why :-\ ... it's not perfect but comming along nicely  :)



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 12, 2013, 11:37:28 PM
I've also noticed that the GPU compiler puts out some useful messages that don't show in the log dock, like...

0(167) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(220) : warning C7533: global variable gl_FragColor is deprecated after version 120

I only see these in the error console output when I run it in my IDE, I think it would be helpful to see these. they're just warnings and the script still compiles and runs but knowing is better than not seeing them at all.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 16, 2013, 03:16:38 PM
The 3Dickulus version of Fragmentarium now requires an xml syntax highlighting file in the Misc folder, sorry no fallback, no description = no highlighting.
In particular this file glsl.xml (http://files.renderingpipeline.com/glslsyntaxhighlighting/glsl440.xml.zip) from http://renderingpipeline.com/2013/12/glsl-syntax-highlighting-for-opengl-4-4/
This might allow highlighting of other shader languages too like cg or cl by just swapping the xml file, haven't tested though.


The definition has the following features:

    Support for desktop OpenGL up to 4.4 (with all keywords, build-in functions, constants and variables), as well as OpenGL ES 2.0 and OpenGL ES 3.0 (and WebGL as it uses ES 2 shaders).
 
    Detects the shader version per file based on the #version definition!

    Unsupported keywords, build-in variables and functions are marked as such based on the detected GLSL version.

    Marks the ‘special parameters’ inside of layout() declarations based on the GLSL version (those are not keywords according to the specs so they are not marked outside of a layout() declaration).(QtCreator only?)

The current limitations are:

    The shader type itself (Compute Shader, Geometry Shader etc.) does not get detected – it would be possible to create six different XML files with slightly different rules to only mark keywords useful/supported per shader stage (in case the file ending is sufficient to make this distinction).

    Version 130 and later assume core and mark compatibility build-ins as unsupported.

    In #version 300 es for OpenGL ES 3, only one space between the ’300′ and the ‘es’ are allowed.


What it means is that the syntax highlighting in Fragmentarium will allways be up to date, version sensitive and can be customized through the xml file :D

Merry  X-Mass (http://www.digilanti.org/fragmentarium/) :clown: (glsl.xml included)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 17, 2013, 01:12:40 AM
yay  :worm:  it seems to work and you can specify colors in the xml file like "darkRed" or "#880000"
( gif anim )


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on December 17, 2013, 09:12:00 AM
It works! But it is very unusual, especially to see the crossed text.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 17, 2013, 02:53:06 PM
if it isn't what you like, change it :)

1> open the glsl.xml file in the "Fragmentarium/Misc/" folder
2> scroll all the way to the end of the file
3>...
these are the options...

     // color                use Qt::Color names like "black" "blue" darkBlue" or rgb values "#334455" etc...
     // italic               true,false = 1,0
     // bold                 true,false = 1,0
     // underline            true,false = 1,0
     // strikeout            true,false = 1,0

look for this line..
         <itemData name="Reserved"         defStyleNum="dsKeyword"  bold="1" strikeout="1"   color="black"/>
change it to..
         <itemData name="Reserved"         defStyleNum="dsKeyword"  bold="1" strikeout="0"   color="black"/>

ah ha, no more strikeout :)

the "Reserved" style is used to flag words that are not available in the #version nnn you have set or are deprecated, you may want to turn off "bold" and change the color to grey or... well now you have the choice :)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 18, 2013, 06:17:18 PM
Ok, I think I'm done with the highlighter (very much streamlined from my first hack at it and everything works?)

Support for desktop OpenGL up to 4.4 (with all keywords, build-in functions, constants and variables),
as well as OpenGL ES 2.0 and OpenGL ES 3.0 (and WebGL as it uses ES 2 shaders).

Checks Misc/glsl.xml for valid language description and falls back to Fragmentarium keywords if not found.

again...
Merry  X-Mass (http://www.digilanti.org/fragmentarium/) :clown:

may add color settings to the preferences dialog in the future, but that's more of a novelty than neccesity.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on December 20, 2013, 11:44:34 AM
Special thanks to Mr.3dickulus for 3Dickulus.frag script!
A program repeatedly crashing on Windows 7x64
with addition of up to a new script or switching tabs.
But the automatic assembly of the script when switching tabs I think unnecessary, as very often the script fragments are simply copied from the tab on the tab and build script here is not required..


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 20, 2013, 02:44:57 PM
The script is heavy and needs a fast big GPU, win7 with 16 core GPU will most likely time out, on linux 768 cores never times out. There is a timeout fix for wind0s by editing some registry keys but I have no idea what they are, google it up and see.

To run that script you may have to edit the default preset so that all "*iterations" are 0 and bump them up 1 at a time or use only one function instead of 3

this image is Menger + Mandelbulb = lots of calculating!

edit: tip> if you must use this script make your render area very small before loading 3Dickulus.frag , that might help (it's called "3Dickulus" for a reason)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on December 20, 2013, 05:33:19 PM
Oh, it's a bad machine translation.
Your script works for me. Brakes there, but no more than other scripts.
Fall program is not associated with the video card. I have long been corrected registry.
In earlier versions of these fall were not.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 20, 2013, 05:58:01 PM
Quote
A program repeatedly crashing on Windows 7x64
If my hacked up version of Fragmentarium crashes and you can give me some info about the condition or action that makes it crash I will fix it.
Difficult when it runs perfectly on linux but dies on some vers of windows and almost impossible to test all combinations of OS/CPU/GPU.

It works very well on my Win 7 (64bit 16 core) test machine and Linux 3.7.10 dev machine (64bit 768 core), when both seem Ok I put the source and exe on my website.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: SCORPION on December 24, 2013, 03:22:26 AM
Hi! You know, I would not change anything. Otherwise, the program will be customized to each computer!
We have such a concept. The combination of operating system - software - hardware.
It often happens that one and the same program runs fine on a combination and did not work on another combination. There could be as lucky.

I just works fine on your build 04.11.2012. And I'm working on it. What you thank you!


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on December 24, 2013, 04:39:59 AM
lol that is good to hear :) the latest version is 2013 Dec 23 07:41  (http://www.digilanti.org/fragmentarium/)with a few minor bugs fixed in the highlighter ( now matches parentheses at cursor pos ) and uses the depricated and ES flags for versions as defined in the glsl.xml file.

When inserting, editing or adding a keyframe #preset the easing curves get lost :-\ currently my solution is to add a new preset when I change or add an easing curve and to make sure I apply that preset before rendering anything, certainly not ideal, the real fix is to preserve easing curves when adding or changing keyframes so the user doesn't have to do this manually. When inserting a named #preset the easing curves are saved with it and that preset is set as the current view, so in this case easing curves are preserved but when dealing with keyframe presets, only camera/target path info is saved, so easing curves are not preserved. This is not a problem if you are working with one main (default) preset but change or add a keyframe and you have to re-apply the preset with the easing curve settings.

If I have time over the XMass break it will be fixed for the new year.

 :beer: Happy Holidays!


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Crist-JRoger on March 03, 2014, 01:54:17 PM
Hello everyone. I'm finally here ) Want to show my result in animation.

http://www.youtube.com/watch?v=O0_4f9HmBnE&feature=youtu.be


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on March 03, 2014, 02:47:26 PM
Nice for your first anim here, I like the sound track too. It seemed a little lumpy the first time I played it (youtube dowload) but the second time was nice and smooth.

Thanks for sharing :) You should post it over in http://www.fractalforums.com/animations-showcase-(rate-my-short-animation)/

Obviously you had little or no problem figuring out the interface and working with motion paths :)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Crist-JRoger on March 03, 2014, 03:29:55 PM
Thanks for looking
This is not my first animation, but the first with keyframes ) don`t have much time to do more


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 17, 2015, 06:57:59 AM
a small break through?

spline path occlusion that looks pretty good for a hack ;)
this is a recording of the Fragmentarium screen on my desktop
http://www.digilanti.org/fragmentarium/occ-2015-04-16_21.31.44.mp4
no subframes so it's a bit grainy but it looks ok.
this is not yet in the version hosted on my website but it will be soon :D

red path = camera
blue path = target
yellow line = current frame lookat vector
green dots = keyframe positions along paths


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 18, 2015, 10:05:41 AM
Updated source  (http://www.digilanti.org/fragmentarium/) now has a "Find text" function for the editor and spline path object occlusion.

this is the bit of shader code that makes it work...
Code:
gl_FragDepth = ((1000.0 / (1000.0 - 0.00001)) +
(1000.0 * 0.00001 / (0.00001 - 1000.0)) /
clamp(Ray.Pos/length(Ray.Direction), 0.00001, 1000.0));
this is the C++ side...
Code:
void DisplayWidget::qMultMatrix(QMatrix4x4 mat) {
        if (sizeof(qreal) == sizeof(GLfloat))
            glMultMatrixf((GLfloat*)mat.constData());
#ifndef QT_OPENGL_ES
        else if (sizeof(qreal) == sizeof(GLdouble))
            glMultMatrixd((GLdouble*)mat.constData());
#endif
        else
        {
            GLfloat fmat[16];
#ifdef WIN32
            float const *r = mat.constData();
#else
            double const *r = mat.constData();
#endif
            for (int i = 0; i < 16; ++i)
                fmat[i] = r[i];
            glMultMatrixf(fmat);
        }
    }

 void DisplayWidget::qglPerspective(GLdouble fov, GLdouble aspect, GLdouble zNear, GLdouble zFar) {
        fov = 180.0 * ( 2.0 * atan2(1.0,(1.0/fov)) / 3.1415926535);
        QMatrix4x4 matrix;
        matrix.setToIdentity();
        matrix.perspective(fov, aspect, zNear, zFar);
        qMultMatrix(matrix);
}

first, draw with shader program onto quad...
Code:
	    glDepthFunc(GL_ALWAYS);       // always passes test so we write color
   glEnable( GL_DEPTH_TEST );    // enable depth testing
   glDepthMask(GL_TRUE);         // enable depth buffer writing
...GL commands to render quad...

... before drawing the spline paths set perspective...
Code:
      qglPerspective(fov, aspect, 0.00001, 1000.0);
where aspect is the QGLWidget dimensions width() / height() and fov is the value from the FOV slider

then render splines with
Code:
	    glDepthFunc(GL_LESS);       // closer to eye passes test
   glDepthMask(GL_FALSE);      // no Writing to depth buffer for splines
   glEnable( GL_DEPTH_TEST );  // only testing
...GL commands to render splines...
result: GL primitives respect GLSL depth values :D

Edit: works on linux but the windows executable doesn't render splines :(


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 10, 2015, 06:26:51 AM

Spline path occlusion works in Qt5 version of Fragmentarium (http://www.digilanti.org/fragmentarium/) for lin AND win !!!

the GLSL code (as above) remains the same (use bundled frags)
the C++ was altered a little for GL 4.1 Compatibility profile.

got rid of qMultMatrix and qglPerspective, setting perspective like this... works in Qt5 GL 4.1+

Code:
void DisplayWidget::setPerspective() {
    QStringList cs = mainWindow->getCameraSettings().split("\n");
    float fov = cs.filter("FOV").at(0).split("=").at(1).toFloat();
    QStringList cv = cs.filter("Eye ").at(0).split("=").at(1).split(",");
    QVector3D e = QVector3D(cv.at(0).toFloat(),cv.at(1).toFloat(),cv.at(2).toFloat());
    cv = cs.filter("Target").at(0).split("=").at(1).split(",");
    QVector3D t = QVector3D(cv.at(0).toFloat(),cv.at(1).toFloat(),cv.at(2).toFloat());
    cv = cs.filter("Up").at(0).split("=").at(1).split(",");
    QVector3D u = QVector3D(cv.at(0).toFloat(),cv.at(1).toFloat(),cv.at(2).toFloat());
    fov = 180.0 * ( 2.0 * atan2(1.0,(1.0/fov)) / 3.1415926535);

    QMatrix4x4 matrix;
    matrix.setToIdentity();
    matrix.perspective(fov, ((float)width()/(float)height()), 0.00001, 1000.0);
    matrix.lookAt(e,t,u);

    glLoadMatrixf(matrix.constData());
}



Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on May 10, 2015, 03:05:23 PM
people, check out the full timeline feature that has now become a feature of synthclipse, i am working right now on animating kalis axolotl and it is working super nice to create animations (for current compo)
http://www.fractalforums.com/synthclipse/synthclipse-0-9-16-released/


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 10, 2015, 07:30:18 PM
I'm curious why you post this here ?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on May 10, 2015, 07:48:17 PM
just because i want to promote the use of synthclipse ;) wich now features catmul rom animation for every param


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 10, 2015, 08:26:37 PM
nice!, I'll have to look at that, admittedly I haven't been following synthclipse very closely, just tinkering with Fragmentarium in my spare time.
just for fun here is an up to date list of the mods to Fragmentarium

Changes since v0.9.5

+ Stops playing/rendering at the end of animation.
+ Saves render "frames per second" as app setting so it gets set where you left it from the last run.
+ Time represented as frame ticks rather than floating point seconds.
+ Setting and saving camera spline path controlpoints as "KeyFrame"  presets. Menu item "Edit->Insert Command->Presets->Insert Preset From Current Settings" or hotkey "F8" (see tutorial 30)
+ Tests for user added AutoFocus checkbox in Raytracer tab, focalplane tracks target when enabled. (see tutorial 31)
+ Setting and saving In/Out easing curves for any/all single "Float"  parameter. Menu item "Edit->Add Easing Curve" or hotkey F7 (see tutorial 32)
+ Shows spline paths and controlpoints when in Progressive/Stop mode.
+ Toggle setting for spline rendering in case your projection or engine doesn't display them properly.
+ Camera follows spline path when in Animation/Play mode.
+ Camera follows spline path when in Animation/Stop mode when the time slider is moved.
+ When in Progressive/Stop mode the "view vector" connects points between the Eye and Target paths relative to frame number when the time slider is moved.
+ Displays current rendered frame when saving animation to disk so that if something isn't set right or didn't hookup the way you expected.
+ Ticks on TimeSlider representing keyframes
+ Saves current animation FPS and duration with default preferences settings on close
+ Syntax Highlighter fixed?
+ Calls for QTextEdit replaced with Fragmentarium::Gui::TextEdit() (our class)
+ Version sensitive GLSL source highlighter 1.0 - 4.4 defaults to 1.1
+ Using glsl.xml from http://renderingpipeline.com/2013/12/glsl-syntax-highlighting-for-opengl-4-4/
+ Added parenthesis highlighting
+ Animation switches from play to stop at the end
+ Uses QMatrix4x4 perspective and lookat
- glu library dependency removed (not needed with Qt5)
+ Now Float 1 -2 -3 -4 widgets can have easing curves
+ Easing curves can loop multiple times
+ Easing curve loops can ping pong
+ Tabs remember thier fragment and settings when switching.
+ Reworked the OutputDialog class so it uses a Ui file and now it remembers last state and allows for rendering a subset of total frames.
+ Reworked the Preferences Dialog class so it uses a Ui file
+ Added line numbers to editor and preferences flag to turn on/off.
+ Find text function Ctrl+F
+ Spline paths occluded by object
+ Added GPU asm browser displays vertex and fragment asm code of shader and buffershader
- ThirdPartyCode/glextensions.h removed (not needed with Qt5)

this year's contest should be pretty amazing with all of the great tools available to artists now :D


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on May 10, 2015, 08:37:47 PM
and the download of your version is that in the first posting in this thread ?

indeed do have the artist real usable stuff now, for me i am fighting with some ridiculous render times of some of the global illum scripts, my plan was to create 4k videos, but i think i need to stick to "just" fullhd resolution for what i am aiming for ....


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 10, 2015, 09:30:06 PM
yes, I made all links point to the page that hosts all downloads instead of posting links to different versions, so latest is on this page (http://www.digilanti.org/fragmentarium/), let me know if any problems, I have been fiddling with the blocking rules on my server to prevent bots from repeatedly downloading the entire site.

4k vids? you will need network rendering and community support/participation, this is the next thing I want in Fragmentarium so I can have all of the machines in my network rendering in their idle time ;)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 10, 2015, 10:12:36 PM
re:ping pong and spline curves for parameters....

this is the parameter morph interface in Fragmentarium :D applicable to ALL float 1-2-3-4 type parameters restricted to any range of frames looping as many times as you want, ping (forward) ping-pong (forward+backward), I edited the image so you can see all curve types available. (any Qt based app has the ability to apply animation (variable input) to any/all? Qt widgets)
edit: I haven't implemented the custom user created curve option... yet ;)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: cKleinhuis on May 11, 2015, 12:58:12 AM
ah, i see ;)

how do you define the out easing otside area?!?!? that is a quite cool and useful tool, but i think i got it wrong and it defines the inner out/in easings


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 11, 2015, 01:13:22 AM
hm not quite sure what you mean...

the red part of the range sliders determines the active area
the top one is for the value, using the start value up to the point where the frame range begins
as the time passes the start of the frame range the curve is applied for that range

a frame range of 10 for 2 ping loops will be active over 20 frames, ping-pong will be 40

the ping-pong part is not represented accurately in the gui but does work, maybe red/green/red/green to show loop cycles?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 11, 2015, 02:41:31 AM
the "outside" areas for the value, pre start uses start value until the frame range (in) begins, post fin uses the fin value for the frames after frame range (out) ends

ping-pong (it's been a while since I've done anything with this) ping = 1 cycle, increase loops to 2, ping-pong checkbox gets enabled, if checked, the total frames will increase but the slider only represents the duration of the first loop, so a 10 frame ping will end up being a 20 frame ping-pong

if you want to apply more than one type of curve to a var it should work by putting the curve setting into a keyframe preset, but I haven't looked at this yet and it does need some work to get a nice gui representation, I've been thinking of redoing the whole keyframe management part, a separate file full of keyframe presets with a manager/editor that parses this file and allows easy intuitive interaction.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 30, 2015, 09:40:12 PM
Moving to Qt5 has allowed a few bugs in, at least one seems random (black screen, solution: close and run again (maybe twice)) and QEasingCurve + QLocale seem to be complaining a bit :( but some other things are progressing...

Snapshot running 3 instances, with small tile size, each rendering a range of frames, (you can see where this might lead) this only interferes with the desktop a little bit and they each seem to render just as fast as one instance :D and behaved very well during snapshot.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: LMarkoya on May 31, 2015, 02:05:24 AM
The spline interface looks great, great idea


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 31, 2015, 02:13:45 AM
tnx LM :)

the interface is entirely from Qt Examples, I didn't design it or do anything fancy other than patch it into Fragmentarium and add range widgets, the possibilities are infinite, so I settled on a good example ;) it's original intention was to show the transitions and effects available for all Qt objects.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Patryk Kizny on May 31, 2015, 07:05:03 PM
    Hey,

    First of all, huge thanks for all your efforts on extending fragmentarium.
    I just downloaded the latest build: May 31 2015 / Fragmentarium-1.0.6-Qt_5_3_2_MinGW.
    Everything seems to work as expected, except for rendering:
    - The window buffer looks all fine.
    - The render outputs black or dark blue frames (depending on the shader)
    - It is the same regardless of the resolution and whether I want to export still or a sequence, happens also across .jpg and .png (did not try other formats)

    Any ideas?

    I am on Win 7 Ultimate x64, R9 280x


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on May 31, 2015, 07:53:00 PM
yes I have blackscreen but randomly, exit and restart fixes it but not needed every time or sometimes twice :(

I did manage to render this with the latest version
http://vimeo.com/moogaloop.swf?clip_id=129356171
and this :)
(http://nocache-nocookies.digitalgott.com/gallery/17/9032_31_05_15_7_51_00.jpeg)


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Patryk Kizny on May 31, 2015, 07:58:46 PM
This looks sick!


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 05, 2015, 08:27:36 AM
latest changes/additions
[Spacebar] toggles animation (click in render window) + prefs checkbox for looping tnx Patryk

new easing curve management
if you have added easing curves to some variables they can be saved and used in a preset named "Range-nnnn-nnnn"
once a preset is created you can make changes in the gui and save another range
the keyword is "Range-" so nnnn-nnnn can also be a human readable name that makes sense like rot-0-100

keeping easing curves in Range-*** presets allows for the same variable to have different easing curves, currently need to be applied manually ie:apply range, render range, apply next range, render next range etc. but this should work well for GUI timeline control, with keyframes and morphranges kept in a file to be #included

so three preset types now
1> standard,   just parameters
2> keyframe,  camera control
3> range-nnn, parameter morphing

as of 06/04/15 23:26:00 PSDT


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: _revers_ on June 05, 2015, 01:45:54 PM
How to turn on spline path rendering? I've tried with "30 - Simple Key Frame Animation.frag" (and with some other key frame examples) and I don't see any red path (neither during animation nor during progressive mode). I have enabled "Draw spline paths for camera and target", "Spline Occlussion" options in the Preferences (everything is set to default).

I've tried with the latest version - Fragmentarium-1.0.6-Qt_5_3_2_MinGW. My OS is Windows 7 x64.


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 05, 2015, 03:26:01 PM
paths are rendered in "Progresive" "Stop" mode, I have just run a test here and all seems to work well, it was compiled on Win7 x64 so should be alright,

load tutorial 30
select "Progressive"
select "Stop" (so it is not rendering subframes)

I just tested like this and I see red blue and yellow lines ?

the latest is June 04 23:10:00, from late last night.

what gfx card?

do you have animotion? like it loads fine but just not drawing splines?


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: _revers_ on June 05, 2015, 04:47:09 PM
Now it works! :) I didn't push the stop button earlier so the paths weren't visible.
I must admit, pretty clever solution with these paths! :]


Title: Re: Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 06, 2015, 01:23:45 AM
tnx :) I will try to implement some other features as time permits but I'm having a lot of satisfaction from just wandering around in some of the frags that others have created

click-drag for the path control points
"Up" vectors on the camera path control points
an intutive timeline display/editor
distributed network rendering
depthbuffer save (suggested by Patryk) or heightmap load (as used elsewhere)

just to mention a few :D


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 11, 2015, 07:49:17 AM
A couple of things...

when a keyframe is selected from the pull-down menu
    the editor will automatically highlight the corresponding text, press F8 to replace with current camera settings
    the control point will also be highlighted on the spline path

infinite loop option in the preferences dialog and [SpaceBar] toggles play (tnx Patryk)

using courier 9pt fixed font for editor ( tnx cKleinhuis ) just testing, will enable user font selection in the preferences dialog

if no nVidia card is found the Edit->Shader Asm menu item is removed (tnx _revers_) now reports Vendor and Renderer

...and maybe squished a few bugs ;) these are in the source as of the time of this post (http://www.digilanti.org/fragmentarium/) but I haven't had time to make a new win exe yet :(

EDIT: 2 exe files, one for nVidia + GL v4.1 (AsmBrowser), one for any gfx card + GL < v4.1 (no AsmBrowser)


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Patryk Kizny on June 28, 2015, 05:48:35 PM
Can I request a build and executable binaries for Mac OSX?
Thanks!


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 28, 2015, 10:49:31 PM
No, I don't have a Mac for development and testing, that will have to come from community support, but if you would like to donate one I'd be more than happy to give it a go. :D


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Patryk Kizny on June 29, 2015, 12:19:49 AM
Thanks, got it. So some day I'll have to learn how to build myself. You keep tempting me on getting into cpp.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: visual.bermarte on June 29, 2015, 01:41:34 AM
OSX version http://bit.ly/1FJ5i3X


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on June 29, 2015, 02:59:04 AM
OSX version http://bit.ly/1FJ5i3X
linked to the DA page from my website :D ty vb
 :thumbsup1:


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Patryk Kizny on July 09, 2015, 11:40:36 AM
Many thanks!


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Crist-JRoger on November 03, 2016, 02:30:33 PM
Does Frag support textureCube function? If yes, please show basic example.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 04, 2016, 04:36:55 AM
the short answer is no edit: YES as of v2.0

have a look at the tutorial #25 Image Based Lighting.frag , this demonstrates how to use equirectangular maps for background and environment reflections

the long answer is yes, after the GL_Texture loading and mapping options have been added to the parser (Preprocessor.cpp/.h) and engine (DisplayWidget.cpp/.h)
this will also require adding to the C++ GL code an environment cube and code to handle management.
A lot of coding and testing to replicate something that is already available via equirectangular maps so it's not even on my radar right now. I also have to ask "How does this relate to exploring fractals and math?" which is my logic for deciding how much effort I am willing to put into the idea.

For anyone that has the GL C++ skills that wants to tackle this I would be happy to help familiarize them with the parts of the code they will need to look at and modify.

edit: for some reference material...
https://capnramses.github.io/opengl/cubemaps.html
https://www.opengl.org/wiki/Cubemap_Texture


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: _revers_ on November 04, 2016, 02:01:16 PM
If you really want cube map textures out of the box you could try Synthclipse (http://synthclipse.sourceforge.net/index.html). It's basically Fragmentarium based on Eclipse IDE, with some extensions.
How to use cube map texture you can see here. (http://synthclipse.sourceforge.net/user_guide/fragx/uniform_controls.html#texture)
And a live example you can find in the main menu -> Synthclipse -> Fragx Examples -> Synthclipse -> test-cube-map-texture.fragx

You can import your existing work using Framgentarium Importer (http://synthclipse.sourceforge.net/user_guide/fragmentarium.html)

(I hope that this post doesn't sound like a dirty advertisement [since I'm the author of Synthclipse]. I've just wanted to point out that the cube map textures are already available in similar to Fragmentarium software)


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 05, 2016, 03:31:06 AM
 :spam: @_revers_  :tease:

lol no, I recommend synthclipse to others too, if it does what you want and Fragmentarium doesn't then logic dictates that it is the one to use ;)

...but to explain a bit, the framework for applying texture options is in place and working, Syntopia put it there, I just added a few things like mipmap and anisotropy options, if you have a look at the sources you will see this incomplete list of other texture options that I just didn't feel were practical to add given that they have nothing to do with exploring fractals...

GL_TEXTURE_ENV
GL_TEXTURE_ENV_MODE
GL_TEXTURE_1D
GL_TEXTURE_2D
GL_TEXTURE_WRAP_S
GL_TEXTURE_WRAP_T
GL_TEXTURE_MAG_FILTER
GL_TEXTURE_MIN_FILTER
GL_TEXTURE_ENV_COLOR
GL_TEXTURE_GEN_S
GL_TEXTURE_GEN_T
GL_TEXTURE_GEN_R
GL_TEXTURE_GEN_Q
GL_TEXTURE_GEN_MODE
GL_TEXTURE_BORDER_COLOR
GL_TEXTURE_WIDTH
GL_TEXTURE_HEIGHT
GL_TEXTURE_BORDER
GL_TEXTURE_COMPONENTS
GL_TEXTURE_RED_SIZE
GL_TEXTURE_GREEN_SIZE
GL_TEXTURE_BLUE_SIZE
GL_TEXTURE_ALPHA_SIZE
GL_TEXTURE_LUMINANCE_SIZE
GL_TEXTURE_INTENSITY_SIZE
GL_NEAREST_MIPMAP_NEAREST
GL_NEAREST_MIPMAP_LINEAR
GL_LINEAR_MIPMAP_NEAREST
GL_LINEAR_MIPMAP_LINEAR
GL_OBJECT_LINEAR
GL_OBJECT_PLANE
GL_EYE_LINEAR
GL_EYE_PLANE
GL_SPHERE_MAP
GL_DECAL
GL_MODULATE
GL_NEAREST
GL_REPEAT
GL_CLAMP
GL_S
GL_T
GL_R
GL_Q

...some are already there just behind the scenes where they are needed to get the job done and implementing more or exposing all to user control would only serve to confuse most users and raise a lot of questions. In order to make effective use of these things one needs a good understanding of GL programming and operation, and then there's the debugging  :o so I re-iterate, if anyone wants to do it I would be more than happy to offer some input because I have come to know my way around the source very well.

edit: there is also, in the source code, some experimental GL_TEXTURE_3D code, this code loads and displays a multipart EXR file as a 3D texture volume but that's as far as I got with it, I never took it all the way to a working version in a frag with a sampler3D, just loads and displays it. The code has been commented out but not deleted just in case me or someone wants to learn from it or implement it fully. As discussed here http://www.fractalforums.com/fragmentarium/generating-wave-front-obj-files-from-exr-voxel-cube/


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Crist-JRoger on November 05, 2016, 10:50:22 AM
the short answer is no
Thank you.

"How does this relate to exploring fractals and math?"
You always ask this question. But I asked about renderer, not about math or fractals.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 05, 2016, 05:33:42 PM
yes, I always ask that question because that is "the" question.

Quote
Does Frag support textureCube function?
what kind of texture cube? sky-box? (inside looking out) 3D volume? (outside looking in)
Quote
If yes, please show basic example.
render to 3D texture? generate cube faces instead of single equirectangular view? sample from 3D texture? sample cube faces?

FragM can render a cube with a texture on the surface...

or do you means like this ?

https://graphics.ethz.ch/teaching/former/imagesynthesis_06/miniprojects/p3/
(https://graphics.ethz.ch/teaching/former/imagesynthesis_06/miniprojects/p3/fire2.png)

this is the "Catmull-Rom spline paths ! camera/parameter keyframes !" thread, I think your question might need to be it's own thread to generate discussion on that topic, if there are many people interested in this I'm sure it will come to be.

in a round-about way FRagM does support sky-box texture cubes, but, you have to setup 6 sampler2d textures and then do the math to sample them for reflections and background, basically build a cube and put the camera at the center... but it's not already done for you, and it's something that can be done with fragment code and the tools already provided by the GUI.

Maybe a math brain larger than mine will contribute a sky-box fragment :hmh: but imho the IBL-Raytracer does a great job of this already



Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: Crist-JRoger on November 05, 2016, 06:16:24 PM
no no no  ;D easy way )
I mean textureCube (samplerCube sampler, coord) how early say. Just it, no more. Yes, skybox

Why here - i thought it's topic about new Frag versions and no need create new topic.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on November 06, 2016, 12:12:22 AM
so might need a new sampler named samplerCube and support code


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 05, 2017, 08:10:16 PM
My apologies if I'm derailing this thread from its intended direction. I'm using the patched build and enjoying the EXR support, but I'm getting some unpredictable crashes when trying to render to EXR. If I try to render above 1600x900, I have to set the tiles to 5x5. Even then, I've found only a few settings that will render without crashing (2000x1125 resolution works, for example). I'd like to be able to drop the number of tiles for faster rendering. Is there a setting that will render greater-than-HD resolution at 2x2 tiles?


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 06, 2017, 03:30:36 AM
@swingsoneto dropping the number of tiles does not equate to faster rendering, the optimum tile size depends on your gfx card

I just rendered a few test EXR images @ 3840x2160 with various tile sizes and they look as expected, ideally, the tile size should be a multiple of the number of threads/warps that your card can manage, for instance on this card...
Code:
deviceQueryDrv Starting...

CUDA Device Query (Driver API) statically linked version
Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 760"
  CUDA Driver Version:                           8.0
  CUDA Capability Major/Minor version number:    3.0
  Total amount of global memory:                 1994 MBytes (2090991616 bytes)
  ( 6) Multiprocessors x (192) CUDA Cores/MP:    1152 CUDA Cores
  GPU Clock rate:                                1058 MHz (1.06 GHz)
  Memory Clock rate:                             3004 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 524288 bytes
  Max Texture Dimension Sizes                    1D=(65536) 2D=(65536,65536) 3D=(4096,4096,4096)
  Max Layered Texture Size (dim) x layers        1D=(16384) x 2048, 2D=(16384,16384) x 2048
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Maximum sizes of each dimension of a block:    1024 x 1024 x 64
  Maximum sizes of each dimension of a grid:     2147483647 x 65535 x 65535
  Texture alignment:                             512 bytes
  Maximum memory pitch:                          2147483647 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device PCI Bus ID / PCI location ID:           1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

...there is virtually no difference in render speed, regardless of tile size but I use 128x72 (30x30) tiles because they render fast enough to make the desktop useable, too big and the desktop lag starts to get annoying. If I want to see what's rendering I choose something like 384x216 (10x10) tiles for a 3840x2160 image.

Using Qt for the other image formats (jpg png bmp etc...) allows a max of 16384x16384, this is an internal Qt limitation, but with EXR format the data gets saved directly to a file so there is no limit on the image size when using EXR format, this format will also save the depth buffer as the alpha channel if you want.

maybe one of the mods can move this to one of the EXR topic threads. ;)


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 06, 2017, 11:17:37 PM
To keep the conversation in one place, I'll continue the discussion in the other thread - http://www.fractalforums.com/general-discussion/fragmentarium-exr-crashes/  :)


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 07, 2017, 04:37:44 PM
Since this is where a discussion about keyframe and easing curve settings is happening, I thought it'd be appropriate to post this here. How would I go about animating a single parameter using multiple keyframes?  For instance, to animate a rotation parameter with multiple keyframes over the course of an animation? I've figured out the usage of the Range-nnn-nnn presets already, I just haven't figured out how to use them for multiple keyframes on the same parameter.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 08, 2017, 03:19:34 AM
Range-nnn-nnn presets are a way to save easing curve settings with a name that is a reminder for the human, these nnn-nnn numbers are not interpreted and applied automatically by FragM, just a way to keep them organized and nnn-nnn doesn't have to be numbers.
So to animate anything complex for a single parameter you have to apply some standard video editing techniques ie:render segments and edit them together, the rendered frames will all be numbered consecutively and you should be able to use the "Video Encoding" dialog to create mp4 mpeg avi mkv etc. if you have ffmpeg or mencoder installed, have not tested this on windows but works perfectly on linux.

Keyframes = camera/target paths
Range-nnn-nnn = easing curves for parameters
These are independent of each other, example proofs of concept really, but very useful.

it might go like this...

create a number of keyframes to get the flight you want
create a number of ranges to morph the scene/landscape in some way
then...
apply range 1
render range 1
apply range 2
render range 2
apply range 3
render range 3
then...
make a video from the rendered images

The "apply/render" process can be automated via script control so you don't have to do it entirely manually but you will have to look at the example scripts and play with it until you get the results you want. Under the "Help" menu there should be info on the commands available in a control script.

Please bear in mind that this program was created by Syntopia as an environment for exploring math and fractals on the GPU via fragment code, a GLSL development environment, it is not intended to be a video editing suite but does have a high degree of control that makes exploring fractals and sharing them a lot of fun.

oh, and if you have applied easing curves to many parameters you can click with the right mouse button on the "Time" slider in the main window and you will get a dialog that shows the ranges and parameter names in a time line, here you can drag a range to change its position and the change will be applied.

...going to start looking for the EXR bug tonight ;)


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 08, 2017, 05:22:27 PM
Ah, okay, that's what I'd been doing, rendering out each segment with a preset applied.  Glad to know that's how it's done then.  I'm bringing my segments together in BMD Fusion and NLEs for further editing.

Also, I didn't even realize that Fragmentarium worked on Linux. Is the EXR bug nonexistent on Linux? I'm dual-booting Ubuntu and Windows 10, so that would be interesting to me.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 08, 2017, 08:20:40 PM
Also, I didn't even realize that Fragmentarium worked on Linux. Is the EXR bug nonexistent on Linux? I'm dual-booting Ubuntu and Windows 10, so that would be interesting to me.

I use SuSE 13.2 on my dev box with the nVidia proprietary drivers, I'm not sure if there are any issues with the nouveau opensource driver.
You will have to compile it yourself from source for a linux version but this will give you an executable that is optimized for your machine.
The EXR bug exists with both OSs but seems to be more tolerant under linux. Just looking at it now...


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 10, 2017, 02:12:58 PM
Is there source available for 1.0.28? I'd like to compile it on Ubuntu. I realize I'm probably overlooking an obvious link, but I didn't see it here: http://www.digilanti.org/fragmentarium/  Of course, now that I scrutinize that page more closely, I realize all the instructions on setting eases are spelled out very clearly there. :)  My bad.


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 11, 2017, 05:28:35 AM
ask and ye shall receive...


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: swingsoneto on April 12, 2017, 06:19:21 AM
Buy you a beer if you know the rest of that quote without looking it up! ;)

Thanks for the source! I've compiled it successfully on Ubuntu (with EXR binaries and everything), but it doesn't recognize the .exr extension when I go to render; it only recognizes png, bmp, etc... The EXR binaries are in the "Fragmentarium/bin" folder, everything else seems in its place. I don't see any errors in the console or when I launch it from the terminal. Am I doing something wrong?


Title: Re: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !
Post by: 3dickulus on April 13, 2017, 02:48:57 AM
...and your joy will be complete :dink:
I don't drink alcohol, mostly because I love beer and whiskey too much. For me the symbolism of " :beer: " is a toast wishing good health and friendship.

The EXR binaries are for manipulating EXR format files independantly, these have nothing to do with FragM ie: it doesn't use any of them, they are a bonus that comes with the EXR package.

You need to set the flags in the Fragmentarium-Source/Cmakelists.txt file to "ON"

Code:
# ON to compile with AsmBrowser enabled requires nVidia + GL > 4.0
OPTION ( NVIDIAGL4PLUS "Build for nVidia GL v4+" OFF)
# ON if you have OpenEXR libs and include files
OPTION ( USE_OPEN_EXR "Build with OpenEXR" OFF)

use cmake-gui or cmake to generate "unix makefiles", cmake-gui is very handy for this, if you have a newer nVidia gfx card then set NVIDIAGL4PLUS to ON, if you have an older one then leave it OFF.