Logo by Fiery - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. April 16, 2024, 05:58:56 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 2 3 [4]   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: Fractal Gun: paintbrush/spraypaint style modification of fractals  (Read 6116 times)
0 Members and 1 Guest are viewing this topic.
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #45 on: February 02, 2017, 03:45:12 AM »

If you do a global search for "Benesi" on the files in the source tree you will find about 20 occurrences, these mark the "feedback" code.

I only test for 6 uniforms to identify a frag as a working feedback shader but (there's always one but) the frag must have all of these vars in order to work...

1. "feedbackcrds"
2. "feedbackcontrol1"
3. "feedbackcontrol2"
4. "feedbackcount"
5. "feedbackrotation"
6. "FeedBackCutOff"

7. ApplyOnIteration
8. FormulaType
9. ApplicationType
10. FeedbackVariable1
11. FeedbackRadius
12. FeedbackStrength
13. FeedbackVariable2
14. FeedbackVariable3
15. FBRotVector
16. FBRotAngle

as listed in MainWindow::setFeedbackUniforms()

they are designed for 3D but should be accessible in the 2D fragment code, you'll just have more data to play with wink

I can probably dredge up some of the beta frags if you can't find an example in the threads, just let me know or ask Matt.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
claude
Fractal Bachius
*
Posts: 563



WWW
« Reply #46 on: February 02, 2017, 08:17:26 AM »

Thanks for the hints!

Ok, after adding the many uniforms with widgets where appropriate in a #group called Feedback (to help with the "widget doesn't display if GLSL compiler dead-code-eliminates it" issue), I get the Zappa toolbar to show when loading my frag, which I guess is a good sign.  But now I get this in the status bar, and the zappa spinbox is stuck on -1, and nothing seems to be happening with my ctrl-clicks....
Code:
Current Zappa:0, -1 : 226,24,0
Seems the count is -1, which reading the code I have no idea how it happens, possibly memory corruption is my current best guess sad  And the coordinates seem to be in window units for the 2D camera, whcih isn't great (but I could work around it, if I fix the other things).

Current non-working frag attached... appreciate any feedback (sorry for the pun!)..  I'm using 1.0.29 because I didn't see anything in the changelog to make it worth asking for the source of the latest.

* inflection.frag (2.59 KB - downloaded 88 times.)
Logged
3dickulus
Global Moderator
Fractal Senior
******
Posts: 1558



WWW
« Reply #47 on: February 03, 2017, 06:21:52 AM »

a little info here... represents the current state...
http://www.fractalforums.com/announcements-and-news/fragmentarium-1-0-10/msg91090/#msg91090
this ^ ^ ^ development was done with Examples/Benesi/Mandelbulb_with_Feedback.frag (attached) and works with all versions of FragM since v1.0.21

Matt came up with the idea and code for feedback and I helped expose it in the GUI, it's all his magic, so this is probably about as much help as I can offer. oh, you can also load and save the feedback data as a text file, when a frag is recognized as a valid feedback frag there will be 2 new items for this under the File menu.

in v1.0.30 the 2DCamera control switches to non-progressive mode when the mouse button (any) is down ie:when dragging the view around, so that there is less lag when running a "heavy" frag with high iterations or complicated formula. This does not seem to have any impact with the above mentioned frag because it uses the Fast-Raytracer.frag which doesn't do progressive rendering. reminder:please use the windows installer for FragM as it makes updating via MaintenanceTool painless, for linux/mac/win current source is available just ask wink

* Mandelbulb_with_Feedback.frag (10.03 KB - downloaded 99 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 #48 on: February 05, 2017, 02:32:10 AM »

EDIT: after a look at the code I must revise this post...

I know you're looking at this for 2D, however, in the 3D version depth is required for calculating the Z component, the attached Fast-Raytracer.frag has the depth code, adds checkboxes in the Post tab and copies the depth value into the alpha channel.

I noted a wee bug when testing with v1.0.30, you must click LMB in the GL area before pressing CTRL+LMB to add zappas or they get the wrong depth and you can't see their effect.

Mandelbulb_with_Feedback.frag and Fast-Raytracer.frag included in the dist should work out-of-the-box. For 2D you might have to populate the alpha channel with an offset or something but the depth code must exist as in Fast-Raytracer.frag for Fragmentarium to process the data properly. You should be able to add it to Progressive2D.frag.

in DisplayWidget.cpp lines 1190 - 1192
Code:
    /// copy the depth value @ mouse XY
    if(!zapLocked && cameraControl->getID() == "3D")
      glReadPixels ( mouseXY.x(), height() - mouseXY.y(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &ZAtMXY );

hmmm...
1. currently will not work with camera=2D
2. currently ZAtMXY is not initialized to a default at startup

I will make the adjustments in DisplayWidget.cpp so that ZAtMXY is initialized to 0.0 at startup and remove the cameraID test,
that should allow it to work, the frag depth code will still have to put a useful value there.
« Last Edit: February 05, 2017, 03:15:40 AM by 3dickulus, Reason: enlightening » Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
Pages: 1 2 3 [4]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
A fairly classic-style fractal Images Showcase (Rate My Fractal) David Makin 5 2605 Last post December 09, 2006, 02:30:37 AM
by Unhooked
Weird mandelbrot modification. Meet & Greet init 1 1185 Last post September 11, 2011, 11:48:16 PM
by lycium
Cheater's Brot... and spokes modification Theory M Benesi 0 2229 Last post February 29, 2012, 05:35:30 AM
by M Benesi
Do fractal-artists actually know which modification effects what in MB3D ?How..? Help & Support psYnfinite 1 536 Last post June 03, 2013, 07:27:46 PM
by vinz
Circle and Line, fractal style Images Showcase (Rate My Fractal) Eric B 1 2053 Last post January 07, 2014, 09:27:26 PM
by youhn

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.175 seconds with 25 queries. (Pretty URLs adds 0.008s, 2q)