Logo by bib - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 24, 2024, 09:11:32 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 ... 6 7 [8] 9 10 ... 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 34407 times)
Description: adding spline paths for smooth transitions between key frames
0 Members and 1 Guest are viewing this topic.
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #105 on: December 09, 2013, 07:52:34 AM »

trying out line numbers in the editor... I like it  wink


* lineno.jpg (46.18 KB, 340x376 - viewed 709 times.)
Logged

Resistance is fertile...
You will be illuminated!

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


« Reply #106 on: December 09, 2013, 10:55:20 AM »

Very good!
Now I look forward to highlighting syntax errors!

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



WWW
« Reply #107 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  wink

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
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
eiffie
Guest
« Reply #108 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.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



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

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  cheesy
« Last Edit: December 10, 2013, 07:30:04 PM by 3dickulus, Reason: :D » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
eiffie
Guest
« Reply #110 on: December 10, 2013, 07:37:48 PM »

Excellent! That will be a big help when writing complex scripts.
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



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

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #112 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 smiley

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  cheesy

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


* lines.jpg (158.79 KB, 813x665 - viewed 268 times.)
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



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

* Highlighter.txt (14.74 KB - downloaded 204 times.)
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 #114 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  cheesy
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 are available
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Syntopia
Fractal Molossus
**
Posts: 681



syntopiadk
WWW
« Reply #115 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?
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #116 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 undecided ... it's not perfect but comming along nicely  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 #117 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.
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 #118 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 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 cheesy

Merry  X-Mass clown (glsl.xml included)
« Last Edit: December 16, 2013, 04:35:10 PM by 3dickulus, Reason: OGL 4.4 ! » 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 #119 on: December 17, 2013, 01:12:40 AM »

yay  the wave  it seems to work and you can specify colors in the xml file like "darkRed" or "#880000"
( gif anim )


* Syntax-test.gif (63.77 KB, 500x565 - viewed 242 times.)
« Last Edit: December 17, 2013, 01:14:44 AM by 3dickulus » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: 1 ... 6 7 [8] 9 10 ... 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 2865 Last post January 25, 2011, 07:56:58 PM
by Buddhi
inserting intermediate keyframes along the parameter splines Mandelbulber huminado 0 2036 Last post November 25, 2011, 07:03:16 PM
by huminado
Mandelbulber - idea for spline editing Help & Support eiffie 6 621 Last post February 13, 2013, 07:08:24 AM
by Apophyster
Catmull-Rom Fragmentarium JosLeys 4 1905 Last post July 24, 2013, 01:05:18 AM
by marius
Fragmentarium spline paths Animations Showcase (Rate My short Animation) 3dickulus 2 1761 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.216 seconds with 25 queries. (Pretty URLs adds 0.025s, 2q)