Title: QScripting Fragmentarium Post by: 3dickulus on July 01, 2015, 10:55:14 AM here is what I have so far...
in a command shell I type... Code: ./Fragmentarium-1.0.8 -s test.fqs Code:
you can omit the first line in the script file and run it with the frag file on the commandline like... Code: ./Fragmentarium-1.0.8 -s test.fqs ./My_Params/new-Mandelbulb-anim.frag The scripting language spec is here, http://www.ecma-international.org/ecma-262/6.0/index.html, java uses the same base spec I think. EDIT: Quote from: ECMA-262 6th Edition link=http://www.ecma-international.org/ecma-262/6.0/index.html ECMAScript is based on several originating technologies, the most well-known being JavaScript (Netscape) and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in that company’s Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers from Microsoft starting with Internet Explorer 3.0. Errors with fqscript line numbers are reported in the log window :) done with less than 50 lines of code added to Fragmentaium sources :D I would like to get some input from the community before I go any further. Title: Re: QScripting Fragmentarium Post by: Adam Majewski on July 01, 2015, 04:18:36 PM it would be nice to have scripting language inside program.
Adam https://en.wikibooks.org/wiki/Fractals/fragmentarium Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 01, 2015, 08:17:52 PM Yes, very simple to do (I think), this is just the start originating from a request by Patryk for all of those functions on the commandline, I felt it would be more productive to just have one commandline option... a script file ;)
Should it be compile/execute as you type like evaldraw/shadertoy or a compose/save/execute scenario ? What other functions() should be exposed ? Title: Re: QScripting Fragmentarium Post by: Syntopia on July 01, 2015, 09:36:09 PM Nice! I did essentially the same with Structure Synth, also using the QScriptEngine: http://blog.hvidtfeldts.net/index.php/2010/11/scripting-in-structure-synth/
I imagine that you'd want to make it possible to script the uniforms somehow. Either by making it possible to render one frame at time, and then change some uniforms and repeat in a for-loop (that was the approach I used in Structure Synth), or by making it possible to provide a JavaScript callback function that updates the uniforms before each frame is rendered. Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 01, 2015, 11:24:06 PM I'm not sure how far I will take this, as it is right now it only takes one line of code to expose a function for script use and technically it is possible right now to render one frame at a time while making adjustments in a for(){} loop, (see link in first post re:language spec) just allow access to...
Code: variableEditor->setSettings( settings ); I tried using the QJScript class, it works but it segfaults on exit every time, QScript does not seem to have this problem. Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 02, 2015, 01:53:10 AM added a few functions...
Code: // sets current time to 0 haven't tested extensively but seems to work ;) EDIT: two modes seem apparent 1> animating is controlled by the keyframes and easing curves in the loaded frag file 2> everything is controlled in the script, this would mean always rendering at frame/time 0 with "Animation = false" and modifying the output filename and parameters as needed before calling Code: app.tileBasedRender(); :ENDEDIT QScript can also load QtDesigner ui files and exploit the signal/slot mechanism in Qt, this could be used for developing very specialized control interface plugins. Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 02, 2015, 03:17:02 PM it would be nice to have scripting language inside program. Adam https://en.wikibooks.org/wiki/Fractals/fragmentarium as requeseted ;) EDIT: on err cursor jumps to line in editor ;) v1.0.8 source code is available on my website. (http://www.digilanti.org/fragmentarium/) Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 04, 2015, 01:19:11 AM This is working very well, I should have done it a long time ago.
@Syntopia, I swiped the pad() function so my test script looks like this now... Code: // Fragmentarium qscript I am amazed a t how easy this was to implement , thank you (again!) Syntopia :D what it means is that all variables available in a preset are also available to cmd script, I'm not a java programmer but I think some of you folks will be very happy with this latest hack. I'm sure it could go deeper. Currently only available as source code (http://www.digilanti.org/fragmentarium/) but I'll try to get the win/mac executables asap ;) bermarte? :beer: Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 05, 2015, 10:23:35 AM Ok had some time to play with it and I have some promising results...
Test 0: cmd script control only Script:test0.fqs (http://www.digilanti.org/fragmentarium/fqScript/test0.fqs) Result:test.0.mp4 (http://www.digilanti.org/fragmentarium/fqScript/test.0.mp4) Test 1: frag animation control only Script:test1.fqs (http://www.digilanti.org/fragmentarium/fqScript/test1.fqs) Result:test.1.mp4 (http://www.digilanti.org/fragmentarium/fqScript/test.1.mp4) Test 2: cmd script control together with frag animation control Script:test2.fqs (http://www.digilanti.org/fragmentarium/fqScript/test2.fqs) Result:test.2.mp4 (http://www.digilanti.org/fragmentarium/fqScript/test.2.mp4) ...so keyframes and parameter morphing play nice together with script control :D Edit: parameter setting functions in app object void setParameter(name, bool) void setParameter(name, int) void setParameter(name, float) void setParameter(name, float, float ) void setParameter(name, float, float , float) void setParameter(name, float, float , float, float) Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 08, 2015, 06:50:09 AM Had a bug, webserver/conscience issue, the Fragmentarium-1.0.8 packages are now available (http://www.digilanti.org/fragmentarium/) Sorry for the inconvenience :(
The Command Script editor now has a Stop button but there is one caveat... When called from the cmdline in a console window as "Fragmentarium-1.0.8 -s testscript.fqs myAnimation.frag" you can't stop it except from [ctrl+c] in the console window, so the stop button is only working when the Script Editor is visible, the idea is that one would develop and test a script in the editor and then run it on a number of machines to render batches of frames unattended, but I'm sure an intrepid programmer could use QtDesigner to create their own control window ;) The Stop button works like this... 1) Select Stop then 1a) wait for the current image to finish, image is saved. 1b) select abort in the progress dialog, image is not saved. :beer: Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 25, 2015, 12:02:44 PM So far so good...
This is a very short test of applying a set of frames to a sampler2d parameter using FQS... voila! animated surface texture. http://www.digilanti.org/fragmentarium/fqScript/sampler2d-test.mp4 1948499 Jul 25 02:48 here is the sampler2d-test.fqs file... Code: // Fragmentarium qscript Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 26, 2015, 01:42:48 AM This is a list of fqScript commands encapsulated by the script "app" object that will be available in v1.0.9 release, beta testers ?
General commands void setFrame(int); Sets the current frame number. int getFrame(); Returns the current frame number. void loadFragFile(String); Opens a new editor tab, loads the named fragment file, initializes default preset, initializes keyframes and easing curves if the file contains these settings. bool initializeFragment(); Returns success or fail. Must be called after altering a locked variable before rendering an image. Parameter commands void setParameter(String); Set a parameter from String in the form of "parameter = value" also accepts parameter file formated string. void setParameter(String, bool); Sets a boolean parameter where String is the parameter name and bool is TRUE or FALSE void setParameter(String, int); Sets an integer parameter where String is the parameter name and int is any integer. void setParameter(String, x); Sets a float parameter where String is the parameter name and x is any floating point number. void setParameter(String, x, y); Sets a float2 parameter where String is the parameter name and x,y is any floating point number. void setParameter(String, x, y, z); Sets a float3 parameter where String is the parameter name and x,y,z is any floating point number. void setParameter(String, x, y, z, w); Sets a float4 parameter where String is the parameter name and x,y,z,w is any floating point number. String getParameter(String); Returns a string representing the value(s) for the named parameter, user must parse this into usable values. Hires image and animation dialog commands void setAnimationLength(int); Sets the total animation duration in seconds. void setTileWidth(int); void setTileHeight(int); Sets the tile width and height. void setTileMax(int); Sets the number of row and column tiles, this value squared = total tiles. void setSubFrames(int); Sets the number of frames to accumulate. void setOutputBaseFileName(String); Sets the filename for saved image, if script has total control this must be set for every frame, if animation is using frag file settings, keyframes etc., then this only needs to be set once and Fragmentarium will add an index padded to 5 digits. void setFps(int); Sets the frames per second for rendering. void setStartFrame(int); Sets the start frame number for rendering a range of frames. void setEndFrame(int); Sets the end frame number for rendering a range of frames. void setAnimation(bool); FALSE sets animation to script control exclusively. TRUE enables keyframes and easing curves. void setPreview(bool); TRUE will preview frames in a window on the desktop instead of saving image files. Control commands bool scriptRunning(); Returns FALSE when the user selects the [Stop] button in the script editor. For user implemented test to break out of the script control loop. void stopScript(); For user implemented test to break out of the script control loop. file not found, initialization fail etc. void tileBasedRender(); Begins rendering the current frame or range of frames using current state. Title: Re: QScripting Fragmentarium Post by: cKleinhuis on July 26, 2015, 01:49:21 AM i still wonder why no one is using synthclipse, it has a build in ful fledged opengl accessible javascript parser included, making it easy to combine multiple shader with similar functionality ... ;) just sayin' its for the fun, i see that, so i hope no harm done!
Title: Re: QScripting Fragmentarium Post by: 3dickulus on July 26, 2015, 02:05:01 AM I think the more complex a program gets, the more intimidating it is or perhaps the complexity makes it difficult to get it organized in the average user's head. I liked Eclipse but it didn't feel comfortable as an IDE, Synthclipse is Eclipse? that has been tailored to GLSL.
I would like Fragmentarium to be as friendly for the novice "I just want to make pretty pictures" as it might be for the hard core hackers "I want total control". Fragmentarium-1.0.9 is up. (http://www.digilanti.org/fragmentarium/) Source code and win exe. :D Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 05, 2015, 05:42:01 PM It looks pretty cool and I should have gotten familiar with it sooner.
Few questions / notes 1) Does the QS window have to be modal = disables controlling everything below? I would love to keep it opened and execute small scripts not having to open it multiple times, load script, then close. 2) Would that be possible to add 5 buttons to GUI where you could load scripts into, then press button to execute connected script. plus one button to STOP a running script? That would be so cool! Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 05, 2015, 05:43:57 PM Would that be possible to expose also the custom screen buffer size to be set from QS?
Actually, it would be also cool to provide some sort of onFrameChaged() handler that would execute an attached script on scrubbing. Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 05, 2015, 11:11:41 PM It looks like ther's something strange going on with the numbers rounding when coming from QTS to the interface widgets and then to the shader.
The following screen shows How the numbers do not fit at all. Highlighted is a row that is applied to the sliders. sliders are all uniform vec3. The columns are 123 --> js_Right, 456 --> js_Up, 789 --> js_Dir. The problem is not that they are rounded at say 10th postion, but rather they are getting rounded randomly introducing unpredictable deviations. (http://kizny.com/wp-content/uploads/2015/04/screen.png) Title: Re: QScripting Fragmentarium Post by: Syntopia on August 06, 2015, 12:26:37 AM My version of Fragmentarium used spinboxes with 5 decimals places, so something has changed. Internally, these values are floats (since thats what normal GPU's support anyway), so the precision is not high. Also, these sliders are auto-normalizing which might introduce some more inaccuracies.
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 06, 2015, 04:44:50 AM yes, the precision is jacked up a bit,
going from 11 decimal places in the data array to 9 in the gui should introduce some rounding, would moving back to 5 decimal places be helpful in this situation? or make it worse? edit: reverted back to original code and applied more decimal places w/o messing with the widget logic, 7 decimal places seems to be the upper limit even though double type is used internally for tracking the value shared by slider and spinner. (in v1.0.10 source) Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 06, 2015, 11:35:23 AM Thanks for looking into that!
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 07, 2015, 06:57:46 AM after some (more) testing I have set it up so that the slider sets the spinner and the spinner sets the slider and ComboWidget::setValue() sets them both but they don't interfere with each other ie:niether calls ComboWidget::setValue(), means you can type numbers into the value box unimpeded, ComboWidget::setValue() is only used when reading parms from a file or editor to set both slider and spinner at once.
source code is available for testing (http://www.digilanti.org/fragmentarium/Fragmentarium-1.0.10-3Dickulus.zip) w better exr handling too :) Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 07, 2015, 10:15:19 PM Great! What are your thoughts on the QS buttons I suggested earlier in this thread?
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 08, 2015, 02:27:59 AM Sorry Patryk :sad1: but that's just too much for me, just haven't got the time and I'm trying to keep it simple, the basic minimum is there for anyone to elaborate on, the current functionality allows me tor run it on several machines in an automated fashion, that's all I really wanted but as a bonus we get scripting abilities with full access to all user created variables that show up in the GUI, the other thing that it needs is network abilities so that I can control the process from one box.
Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 08, 2015, 09:07:23 AM No worries. You made a huge effort already and I appreciate all the tools. Maybe it's time for me to get into Cpp.
Title: Re: QScripting Fragmentarium Post by: lycium on August 08, 2015, 11:40:53 AM No worries. You made a huge effort already and I appreciate all the tools. Maybe it's time for me to get into Cpp. We should be working together for Martin anyway ;) This weekend I'll do a bit more work on my fractal renderer, but my main problem is the Distance Estimators :/ Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 08, 2015, 10:09:30 PM Great! What are your thoughts on the QS buttons I suggested earlier in this thread? study up on the QScript docs and, as I have mentioned before, you will find information on using QDesigner to create your own GUI plugin that uses the script interface to control Fragmentarium. This feature of QScript could be used for custom dialogues tailored to your specific VFX pipeline needs.just for fun some stats... and a little speculation. There are 15,227 lines of C++ code in the current incarnation of Fragmentarium Out of all accesses to Fragmentarium-1.0.10-3Dickulus.zip on my website only 3 are identified as being from a computer based browser the rest are bots and iPhones Those 3 accesses 1 Virgin networks U.K. Infrastructure 2 China Mobile Communications Corporation Beijing 3 Unitymedia dynamic customer IP pool Germany this leads me to believe that only one (#3) is a real person that has actually downloaded the source code and that is possibly only for a look at the OpenEXR and/or QScript stuff so they can write it into their own code. (just speculating) If I could make a suggestion, Patryk, write your own VFX studio version from the ground up in C++ around the fragment shader code as the rendering engine, this way you will have exactly what you are looking for in your VFX pipeline, or use Synthclipse which is easier to modify via java than Fragmentariums C++. It should be able to load your .frag scripts too. Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 08, 2015, 10:39:28 PM Would that be possible to expose also the custom screen buffer size to be set from QS? the current list of commands available via fqs... void loadFragFile(name) void setParameter(name, bool) void setParameter(name, int) void setParameter(name, float) void setParameter(name, float, float ) void setParameter(name, float, float , float) void setParameter(name, float, float , float, float) void setParameters(parmList) void setAnimationLength(int) void setTileWidth(int) void setTileHeight(int) void setTileMax(int) void setSubFrames(int) void setOutputBaseFileName(name) void setFps(int) void setStartframe(int) void setEndframe(int) void setAnimation(bool) void setPreview(bool) void tileBasedRender() void selectKeyFrame() void addKeyFrame(name) void clearKeyFrames() void initKeyFrameControl() int getFrame() bool initializeFragment() void callRedraw() bool scriptRunning() the bold ones determine the buffer size. Title: Re: QScripting Fragmentarium Post by: Syntopia on August 09, 2015, 01:05:18 AM I have also had this feeling about Fragmentarium myself: it is a lot of effort to make new UI features, and people have wildly varying feature requests. In particular I found myself limited wrt to the scripting, and how to extend to more flexible buffer configurations (to allow e.g. shadow mapping, bloom, DOF by blurring depth information, etc.)
Therefore I decided to try some other approaches starting a year ago or so. I wanted to make an API (which I called FragAPI), providing simple access to the following features: (1) Setting up buffers and the flow between them (including support for accumulated rendering and tile rendering) (2) Handling 2D and 3D cameras. (3) Some means of reusing shader code (like the 'include' syntax in Fragmentarium) I made a prototype testing in JavaScript (2D only): http://syntopia.github.io/fragapi/ And some similar experiments in Java (using JOGL): https://github.com/Syntopia/Meshia/tree/master/FragAPI/src/net/hvidtfeldts/fragapi However, these projects seem to be progressing in slow-motion for the time being, though I still think there is a use for a simple API for setting up GPU pixel graphics. GLSL is a wonderful and simple language to write in, but setting up the OpenGL stuff is a pain. Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 09, 2015, 03:32:43 AM setting up the OpenGL stuff is a pain. indeed :tongue1: things change fast too.Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 11, 2015, 08:01:18 AM My version of Fragmentarium used spinboxes with 5 decimals places, so something has changed. Internally, these values are floats (since thats what normal GPU's support anyway), so the precision is not high. Also, these sliders are auto-normalizing which might introduce some more inaccuracies. I think I fixed at least one thing, the Eye and Target values remained at 5 decimals while all of the other combo widgets happily operated at 7 decimal places after jacking it up a bit. This bothered me, a lot, because I couldn't figure out why, this may have been the source of the problem Patryk was having. changed the slider min max from 0 and <a large number> to minimum*<a large number> and maximum*<a large number> removed myValue and (myValue-minimum)/(maximum-minimum) set slider from spinner with val*<a large number> set spinner from slider with val/<a large number> now the Eye and Target combowidgets use 7 decimal places. the default precision in Qt is 6 decimals when converting between strings and floats so I also adjusted all conversions accordingly. needs testing but it seems stable. Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 16, 2015, 08:03:58 PM Hey,
I am wondering if there's any chance to create a folder from QT Script? If not, would that be possible to implement folder creation on CPP side? I would like to be able to automate and auto organize renders using timestamps or incremental takes etc. The problem I currently have is that if a given output folder does not exist, Frag will render to some default folder or don't save at all. Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 16, 2015, 09:03:16 PM of course, the possibilities are infinite, :D
http://doc.qt.io/qt-5/topics-scripting.html http://doc.qt.io/qt-5/qtscript-index.html http://doc.qt.io/qt-5/ecmascript.html how about a beta tester update from you... regarding the current build? were your problems user generated or coding issues? gui still lagging? too many little bugs to start anything new, if you are asking for something new then I must assume that the issues you had are resolved... how about a beta tester update from you... :police: when all current issues are fixed I may consider looking at requests that help me explore fractals, keeping your hard drive organized does not help me explore fractals. edit: the most recent bugs to be squished... Code: 0x1b78c00 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0x1b1b050) ): Attempt to set a screen on a child window. Code: Program received signal SIGSEGV, Segmentation fault. fix is in the most recent source code v1.0.10 08/16/15, if I have time and the fractal gods are smiling I might have v1.0.10 win executables available soon. Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 21, 2015, 01:14:13 AM Would that be possible to add ApplyPreset("MyPreset") method?
That would allow for fuller scripting control of the render process. Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 21, 2015, 02:26:13 AM it's already there... ;)
in your fqs file make the preset(s) you want as text string variable(s) in the format of a fragparms file like menu item Parameters->Save to file... makes. Code: myPreset = "FOV = 0.8878 this allows you to set values en-mass just like ApplyPreset("MyPreset") would do if you have a frag with presets you can cut and paste them right into the script this way. edit: this also lets you set parameters that are not covered in the list below you can also set any value that shows up in the variable editor with... Code: app.setParameter("name", bool)the float4 version sets colours, the first value is for the intensity/amount slider the rest are R,G,B Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 21, 2015, 02:39:35 AM Oh, that's a cool one! I did not think it's that flexible.
Yeah, the power of javasciprt. Thanks a lot! Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 21, 2015, 02:45:28 AM lol, you mean C++ ;)
Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 21, 2015, 03:19:56 AM Haha! I meant the simple and forgiving grammar of js-like languages.
Anyways - I guess this may not work for animation presets, right? Cause that's what I wanted :) Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 21, 2015, 03:41:06 AM it depends what you mean by animation preset...
easing curves? key frames for camera? key frames for tweens? from fqs you have complete control of all parameters, you can tween everything so the gui with a default preset is really just getting the engine set up for rendering if you examine the example scripts in fqScript folder you will find... ScriptingCmds.txt describes available app methods test-sampler.fqs testing sampler2d parameter test0.fqs testing fqscript only control test1.fqs testing frag only control test2.fqs testing fqscript control plus frag animation control the scripts are well commented and should be easy to understand, you will have to fabricate a frag to use or try the ones in the Tutorials folder 30,31,32 Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 21, 2015, 09:54:24 AM Dick, I am familiar with these, thanks.
I meant applying presets that contain easing curves via QS. Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 21, 2015, 03:27:49 PM familiar is not knowing, we must dissect a little deeper...
after creating an easing curve, add a preset with a name that begins with "Range" "Range" is a preset name keyword that tells Fragmentarium to store your easing curve settings. you can add numbers to the end of the name to remind you of where they are active the settings in this preset can be applied or cut and pasted into any other preset or your script just like other settings. I've tried to ensure that two open tabs, frag files with easing curves, will not interfere with each other, when easing curves are applied via preset they will be made current/active and previous ones will be removed, internally, not from your fragment file in the editor if you want different easing curves to have overlapping frame ranges then they must be applied at the same time, they should all be in one preset that represents the total range for all contained easing curve settings. the mechanism internally for applying settings en-mass, app.setParameter( myPreset ), accepts all the same parameters that a preset can have. edit:in theory it should work, untested, if it doesn't work I will make it work this way and possibly add app.applyPreset(name) Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 21, 2015, 06:49:30 PM Will test, thanks a lot!
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 22, 2015, 12:13:39 AM It makes sense to me to keep easing curve settings and key frames in the frag file, much easier to manage from there, but I can see that applying easing curves per scene might be handy if you have arranged a number of scenes and want to render them in sequence under fqscript control.
Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 22, 2015, 12:32:46 AM That's exactly what I want to do - prepare a more complesx render in QS, hit the button once and grab the results a few days later ;)
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 22, 2015, 12:53:23 AM can fqscript import network module ? that would save me having to write it into the main program and be a good reason to fully enable the QScript ui file loader for fqsGUI plugins.
Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 22, 2015, 09:28:33 PM No idea. However one thing concerns me regarding network rendering. I have posted in another thread (https://www.dropbox.com/s/fntlzyml1nqt79h/Comparison.jpg) an example of exactly same code yielding very different results on the same GPU but with different driver builds. I guess that would be even more prominent across multiple configurations and GPUs. Which makes all network rendering fail. Probably not all formulas will be affected, but it may be a serious bottleneck.
Title: Re: QScripting Fragmentarium Post by: 3dickulus on August 22, 2015, 10:40:24 PM all network rendering does not fail, I have done a few animations using 3 different machines with nV GPUs 210 650 760 each with different driver versions and each with a different level of abilities, all sections looked right and fit together properly :-\ they were all nVidia though :)
if other brands are inconsistent between versions for colour reproduction from the same data/calculations then I have another reason to like nVidia :D the latest patch should let you compile and run your monster sized frags ;) I did manage to get _Dirt_01 to compile but missing some textures Title: Re: QScripting Fragmentarium Post by: Patryk Kizny on August 22, 2015, 11:08:34 PM I'll post an update on the raytracer work shortly. I was testing mostly on AMD and after moving to nVidia needed to tweak a lot to make it work.
I've been having lots of troubles with R9280x both under windows and OSX. Generally I think that the software and drivers side is very buggy. I think it relates to all AMD GPUs since they use the same driver environment. Never had such issues with NVidia. I don't think I ever buy an AMD GPU again unless these things change. Too unreliable. Title: Re: QScripting Fragmentarium Post by: ForestCat on February 04, 2016, 06:27:40 AM OK, continuing from the 1.0.20 release thread, can qscripting the same uniform at multiple points on the timeline be used interactively with the main program, in order to visualize (albeit at a lower rez/quality) that (and possibly other) qscripted uniforms, camera keyframes, etc. in the render window while the timeline runs in realtime?
If it can, then I've got to dig into scripting :) Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 04, 2016, 06:49:36 AM you can create any number of Range-nnn-nnn presets
they can each contain the same variable(s) but doing different things the easing curve stuff is, as I said, simple and somewhat crude but so is a hammer, until it is wielded by a skilled carpenter, that is my analogy of easing curve settings controlled by fqScript, they should work when applied in fqScript with setParameter(String) where String is an easing curve setting, so a fqScript might go something like this, apply the initial starting preset apply a range preset render the frames in this range set another one etc... but, there's always one but ;) fqScript control sort of negates the need for easing curves because you can also use math functions in fqScript like sin() and cos() in a loop and apply values to x and y to make a circular transition, in fact fqScript has the same basic stuff that java has including import so you could load any java library (in theory, I haven't actually tested this) Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 04, 2016, 06:52:07 AM oh, pardon me, I got carried away there :embarrass: to answer your question, no this is not interactive, but still very powerful, you could just set render and not save images when you run the script, maybe with a image size = display, would render fast and give you a sort of preview... I think
Title: Re: QScripting Fragmentarium Post by: ForestCat on February 05, 2016, 12:02:29 AM That's OK, lol, enthusiasm is good.
OK, this is hopefully related enuf to the topic to belong in this thread. When working w/ the easing curves ui, I assume that Loops essentially sets the number of repeats of the selected curve cycle with the defined frame range? If so, and the type is Linear AND Pong is selected, I'm not seeing the behavior I'd intuitively expect, and I haven't found any docs on this function. Here's what I'd expect: # of loops would set the # of times the entire cycle (ping/pong, +/-, yin-yang) would repeat within the frame range. You could think of it as the frequency of a triangle wave in the above case. But it doesn't seem to work that way at all. With a 30sec timeline @ 30fps, if I select half that range (450 frames), I get a max of 1 loop, no pong option unless I select -1 Loops :hmh: If I set the range to say 300 frames, I can set 3 Loops & Pong to 3, I get behavior that seem erratic. I'll get parameter "sweeps", but they extend beyond 300 frames, & sometimes "jump around" at the loop points, sometimes not. What am I doing wrong? My great hope here was to be able to simulate 'lfo's of sorts, and rhythmically modulate parameters across the timeline Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 05, 2016, 02:48:54 AM ok I'll see if I can remember how I set that up :-\ ...
total length of the animation is 300 frames @ 30fps = 10 seconds you have to do a little math in your head for this but... duration = Frame in 1 -> Frame out 100 ping is the same as one complete run through that is the duration, number of frames, set in the easing settings dialog, same as one loop, just one run with Pong NOT checked increment the Loops = 2 now it will run through 2 times and will take 200 frames, duration (Frame in -> Frame out) * 2 @ 100 frames this will restart the easing from the Value Start so 2 runs, both forward with Pong checked now it will run through 2 times and will take 200 frames but will run backwards from frame 100 -> 200 so... Frame Value 1 0.0 start of loop 1 ping 100 1.0 end of loop 1 start of loop 2 pong 200 0.0 end of loop 2 increment the Loops = 3 Frame Value 1 0.0 start of loop 1 ping 100 1.0 end of loop 1 start of loop 2 pong 200 0.0 end of loop 2 start of loop 3 ping 300 1.0 end of loop 3 the ponging and looping may need some refinement ie: 0th index and integer math means some fiddling to get it to land where you want, I am watching it play 3 loops, as I type, with Pong checked so Ping->Pong->Ping and it seems to be doing exactly what it should but I do see that the total is 3 frames short (1 for each loop) of the full length, in my case 3 loops = 297 instead of 300, I think I did this so that you don't get 2 frames the same in the middle, 100 and 101 + 200 and 201 would be the same if each loop ran the full easing curve when ping ponging so it stops short to make it transition with out a bump (also stops short on the last loop making 3) it starts at frame 1, not at frame 0. so for now there is a few frames to fudge. the animation in the Easing Curve Settings Dialog indicates the ping pong "motion" for the selected curve, you just have to play with it, get to know it, then apply it to suit your needs as best you can until this changes under fqScript control you can apply values from your own transition any way you like to any frame you like so I guess the fancy GUI has this one small trade-off for the convenience of the ability to point and click over writing the required code in an fqScript. hope that helps :evil1: Title: Re: QScripting Fragmentarium Post by: ForestCat on February 05, 2016, 03:20:46 AM That makes sense. I tried it as follows (just wanted to see many cycles...)
OK, I do have v1.0.20.160130. I load the program, the default white mandelbulb is in the render window. 1. I set the timeline length to 30s 2. I select the Coloring tab 3. I set OrbitStrength to about .28 4. I hit F7 5. I move the upper Value limit to about .60 6. I set FrameIn to 1, FrameOut to 150 7. I set Loops to 6, Pong checked I reset the timeline to start & run the animation. The slider moves up to .60, then down to .28 and QUICKLY JUMPS TO .60 AND BACK. It always does this at the Pong to Ping transition. Yours doesn't do that? What do you think could be wrong here? Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 05, 2016, 05:58:38 AM yep, that's a bug, totally my fault, :embarrass: it does work perfectly if you set (in preferences) fps to 25
25 fps is the value I had set while developing the ping pong loop feature I neglected to test it to use other fps set by user oops hmmm... I seem to have gelato on my shoe :-\ to review... 1. stepping for Q/E, Y/H, and T/G keys 2. mouse movement scale 3. easing curve ping pong loop I will try to get these things addressed over this long weekend, movable spline control points would be in the keyframe editor... eventually. Thank you ForestCat, keep on hacking :D Title: Re: QScripting Fragmentarium Post by: ForestCat on February 05, 2016, 06:18:25 AM Sorry I keep breaking sh!t, lol ;D
Listen, this is probably a stupid question, since it's such an obvious question, and the feature doesn't exist... What are the technical obstacles/reasons not to have the ability to simply manually edit in various other param settings into the preset blocks created by F8 and tween between them? That would be an enormous help if it were not a major PITA to implement... There's a LOT of beer in it for you :beer: :D Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 05, 2016, 06:31:49 AM lol, I don't actually drink beer, or alcohol for that matter...
there are no really big obstacles, but you will find it very rare that there will be an occasion to morph all parameters in a preset, I find that in the majority of cases only a few are ever needed or used this way. and please continue to break sh!t, it's the only way I will ever get the gelato cleaned up ;) Title: Re: QScripting Fragmentarium Post by: ForestCat on February 05, 2016, 06:50:00 AM Well, Pizza & coffee then, lol.
No I don't mean ALL the params. I mean selectively, maybe just one or two that would be useful to have change smoothly between presets. Say you've already created 10 camera presets w/ F8 in the main .frag file. What I'm talking about is being able to selectively type in an additional parameter/value or two or three into some of these 10 Preset code blocks, and have your engine parse and tween them along w/ the camera settings. WAY less overhead (and code space) than having to paste/parse/manage ALL the params into each preset. It would extend this thing SO far. (Wish I could get an Amen or two or three here...) :) Yes, I'm begging... Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 05, 2016, 07:31:56 AM Quote 10 camera presets w/ F8 you mean keyframe presets? they are meant only for Eye,Target,Up and FOV and represent control points on the spline paths.Easing Curves are meant to handle morphing parameters independently from camera/target, preset tweening might be an option for the future where you could add the parameters you want morphed to the keyframes like... Code: #preset KeyFrame.001 where RotAngle would transit from 001 -> 002 over the number of frames between them... or something, we'll see ;) Title: Re: QScripting Fragmentarium Post by: ForestCat on February 05, 2016, 02:27:38 PM That is EXACTLY what I'm asking for :)
Title: Re: QScripting Fragmentarium Post by: 3dickulus on February 05, 2016, 03:15:43 PM a couple of points though...
1. Easing Curves do this with 48 different types of mathematical functions and a few options, looping and ping pong etc. 2. fqScript control also does this in any way that you can think of and put into the code 3. using the time variable you can also do stuff like this in the fragment code I have a hard time justifying putting the effort into a fourth method to do the same sort of thing but is limited to, say, a linear transition, especially when I have other things to fix and it's been done three times already with a great deal of flexibility, I have to say, the source code is available if you would like to write a key frame editor and transit controller. The best way to proceed, in my mind at least, would be to spend some time exploring what's there already, fix up a few bugs and things familiarizing yourself with the source, then, if what's there is truly lacking the ability to do what you want/need and it's something that others want/need you can decide if it's something that might be worth writing the code for... just my 2 cents worth ;) Title: Re: QScripting Fragmentarium Post by: Sabine on November 13, 2016, 07:39:51 PM Is this still working in the newest version? Rendering presets does not seem to work here if I run one of the test-scripts, only for the default-preset for some reason, and loading from the commandline won't render even the 'default':}
But, IF it's all working (and it's me why it isn't here ;D), I have a question: is there a way to have fragmentarium load script and .frag, render, and then after completing the task shutdown the program? Title: Re: QScripting Fragmentarium Post by: 3dickulus on November 13, 2016, 09:26:42 PM just did some testing :angry: the last working script control is v1.0.23
it's supposed to be like this... Code: cd %HOME%\Fragmentarium\ this is not automagic, you have to create a script (like the example) that has render commands for each preset I will try to figure out what happened between 1.0.23 and 1.0.29 but for now it's broken, sorry about that :( Title: Re: QScripting Fragmentarium Post by: 3dickulus on November 13, 2016, 11:38:06 PM found it :D GUI event processing needed a tweak, will update the exe in the repo asap :embarrass:
edit: exe in repo is now updated, script loading and execution from cmdline works on the test machine. use the MaintenanceTool.exe to update your installation ;) Title: Re: QScripting Fragmentarium Post by: Sabine on November 14, 2016, 01:30:16 PM Quote this is not automagic, you have to create a script That's what I did:) I tried the commandline option with a script I derived from your renderpresets.fqs (nothing changed in there except for the preset- and output-names) and a .frag-file. The derived preset-fqs did work when started within the program, in so far that it does render the default-preset and saves it to file, but not any other preset. Something goes very wrong when it tries to app.applyPresetByName (btw, is its variable declared as String?), because it tries to load the preset, does not succeed as far as I can see and then hangs in trying to render. In the Variable Editor I can see that the preset is active. I then have to abort the render, stop the script, enable animation and only then then the preset is visible on screen. This is how it worked with the original version of Fragm. With the update, it does not even render the default! :embarrass: When starting the 'old' FragM from the commandline, it would nicely load the script and .frag, but then hang on trying to render the default-preset already, behaviour as up here. When you have the time and energy to look in to this... I am down with flu since waking up this morning, so brain is temporarily (I hope :}) on a holiday anyway, so certainly no rush! Title: Re: QScripting Fragmentarium Post by: 3dickulus on November 14, 2016, 02:01:46 PM funny, I ran the example and it rendered all presets ???
let me see your .fqs script please Title: Re: QScripting Fragmentarium Post by: Sabine on November 14, 2016, 05:53:39 PM See attachment: I changed only preset names and output-names and set the setFrameSpec to (64,36,1,10) instead of (64,36,60,60) ,because that latter setting gave me an error telling me that the image would be 48000x27000 and that that was way too big:} I thought it's supposed to mean an image rendered as 64x36 px, multiplied by 60 (=3840x2160), with 60 subframes?
The buffer in the mainwindow does not change and the script gets its buffer size from the HiRes&Animation dialogue (which I don't touch before running the script! It's a fresh start every time). Behaviour also seems to depend on whether FragM is in Animation- or Progressive rendermode. Also: debugging is more difficult because although fragmentarium is closed, its process is still running and must be closed with taskman. :crazyeyes: Only found out about that just now :sick: Title: Re: QScripting Fragmentarium Post by: 3dickulus on November 15, 2016, 04:29:48 AM Ok, event handling is a bit off between wine and genuine windows box, got it working as it should... here at least ;)
run the MaintenanceTool for an update if the "Build" button turns yellow when applying a preset from a script you need to add app.initializeFragment(); immediately after applying a preset or you will be rendering with locked variables set to their old values from the last preset. script ... app.applyPresetByName("AwesomePreset") app.initializeFragment(); // we need to adjust the filename for each preset app.setOutputBaseFileName("testscript1.png"); // if the user wants to stop rendering break before next image if(!app.scriptRunning()) break; // render an image app.tileBasedRender(); ... script // size of tiled/frame to render setFrameSpec(64,36,60,10); ^ ^ ^ ^ this should render 3840x2160 with 10 subframes let me know if this patch works for you :D edit: when run from the cmdline this way... > cd %HOME%\Fragmentarium\ <return> > Fragmentarium-1.0.29 -s fqScript\renderPresets.fqs Triumvirate_Files\Triumvirate.frag <return> ...the default render mode at startup and for rendering tiled images is Progressive and should not change when executing the script Title: Re: QScripting Fragmentarium Post by: Sabine on November 15, 2016, 03:49:06 PM Fantastic, Dick, works like a charm, from commandline as well! And in the resolution I specify... Thank you! :beer: :beer: :beer:
Title: Re: QScripting Fragmentarium Post by: 3dickulus on November 16, 2016, 02:57:49 AM I streamlined the GUI event handling for the progress dialog a bit to make it work the same on both windows and linux (haven't tested on OSX though) so it might even be a little faster ;)
Title: Re: QScripting Fragmentarium Post by: Sabine on November 16, 2016, 10:32:39 AM I surely does feel as if it's quicker! |