Logo by wmauzey - Contribute your own Logo!

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

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

this forum will stay online for reference
News: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 19, 2024, 01:55:07 PM


Login with username, password and session length


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


Pages: 1 ... 7 8 [9] 10 11 ... 13   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: FRGMENTARIUM 3DICKULUS - Catmull-Rom spline paths ! camera/parameter keyframes !  (Read 34051 times)
Description: adding spline paths for smooth transitions between key frames
0 Members and 1 Guest are viewing this topic.
SCORPION
Conqueror
*******
Posts: 104


« Reply #120 on: December 17, 2013, 09:12:00 AM »

It works! But it is very unusual, especially to see the crossed text.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #121 on: December 17, 2013, 02:53:06 PM »

if it isn't what you like, change it smiley

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 smiley

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 smiley
Logged

Resistance is fertile...
You will be illuminated!

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



WWW
« Reply #122 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 clown

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

Resistance is fertile...
You will be illuminated!

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


« Reply #123 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..
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #124 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)


* MengerBulb.jpg (228.69 KB, 1024x720 - viewed 282 times.)
« Last Edit: December 20, 2013, 03:16:53 PM by 3dickulus » Logged

Resistance is fertile...
You will be illuminated!

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


« Reply #125 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.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #126 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.
Logged

Resistance is fertile...
You will be illuminated!

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


« Reply #127 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!
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #128 on: December 24, 2013, 04:39:59 AM »

lol that is good to hear smiley the latest version is 2013 Dec 23 07:41 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 undecided 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.

 A Beer Cup Happy Holidays!
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #129 on: March 03, 2014, 01:54:17 PM »

Hello everyone. I'm finally here ) Want to show my result in animation.

<a href="http://www.youtube.com/v/O0_4f9HmBnE&rel=1&fs=1&hd=1" target="_blank">http://www.youtube.com/v/O0_4f9HmBnE&rel=1&fs=1&hd=1</a>
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #130 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 smiley 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 smiley
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Crist-JRoger
Fractal Fertilizer
*****
Posts: 389



WWW
« Reply #131 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
Logged

3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #132 on: April 17, 2015, 06:57:59 AM »

a small break through?

spline path occlusion that looks pretty good for a hack wink
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 cheesy

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


* occ-2015-04-16_21.31.44.jpg (24 KB, 640x360 - viewed 211 times.)
« Last Edit: April 17, 2015, 07:12:51 AM by 3dickulus, Reason: url » Logged

Resistance is fertile...
You will be illuminated!

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



WWW
« Reply #133 on: April 18, 2015, 10:05:41 AM »

Updated source 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 cheesy

Edit: works on linux but the windows executable doesn't render splines sad
« Last Edit: April 19, 2015, 03:53:52 AM by 3dickulus, Reason: details » Logged

Resistance is fertile...
You will be illuminated!

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



WWW
« Reply #134 on: May 10, 2015, 06:26:51 AM »


Spline path occlusion works in Qt5 version of 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());
}

Logged

Resistance is fertile...
You will be illuminated!

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

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

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

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