Logo by mclarekin - 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 the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 20, 2024, 07:29:27 AM


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 6258 times)
0 Members and 1 Guest are viewing this topic.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« on: November 30, 2015, 03:56:12 AM »

  I'm mulling over developing a method of modifying fractals on the fly.  Not sure if it's pragmatic to do in Fragmentarium, or if it's more of a Mandelbulber type of thing  (I have access to free c++ compilers- not free Delphi, so... M3D programming is out of reach at the moment).

  1)  Calculate and display fractal (or other mathematically generated object), storing pixel position and orbit information

  2)  Modify or add to original fractal with a "spray gun" that either:

     a) "sprays" math that penetrates the fractal to specified depths and/or permeability settings (perhaps weighed by orbit values and/or fractal density in the area)
     b)  "sprays" another formula that grows from the surface of the other fractal, with a new origin point set either on the surface of the fractal, or seeded to a specific depth.  Scale the pixels around the new origin so that the longer you "spray", the larger the fractal gets.

  2a  will allow us to alter existing fractal structures with various formulas that we can "spray" on, that penetrate the fractal in such a way that it modifies the original fractal.  So you could spray a bit of Menger on a Mandelbulb and see how it changes the fractal, when you set its penetration level and the other fractal's permeability level....

  2b  will allow us to spraypaint sections of other types of fractals onto the original fractal.  So we'll have one fractal, then spray something on it that is slightly different.  Grow some other fractals on the surface of the first like crystals... or plants.  As long as nobody makes fun of me for growing fractal plants in the desert.  


  Set new origins (0,0,0) at the center of the "spray" for 2b.  You wouldn't want full sized fractals to grow from there, so for a fractal that is the size of a Mandelbulb, you'd probably start out with a really high pixel scale (100x) from the new origin, so that you have a tiny one growing out of the other at first, that would slowly grow as you sprayed more "formula" on the fractal (reduce the pixel scale... so if pixel scale = 1, you get a full sized fractal growing out of the side of your original, if pixelscale=100, you get a 1/100th size fractal growing out of the original).

  That's not the only idea- but these 2 options would greatly increase the ability of those who pursue the mathematical arts, and may lay the groundwork for the creation of fractal worlds to explore, that evolve according to their own rules.  
Logged

Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #1 on: November 30, 2015, 10:53:45 AM »

Very interesting!
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
mclarekin
Fractal Senior
******
Posts: 1739



« Reply #2 on: December 01, 2015, 03:01:58 AM »

Quote
Grow some other fractals on the surface of the first like crystals... or plants.

That will be cool afro afro afro
Logged
0Encrypted0
Fractal Fertilizer
*****
Posts: 384



WWW
« Reply #3 on: December 01, 2015, 04:14:01 AM »

Animate multiple sprays with collision detection to mimic real world fractal formation?! wink
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #4 on: December 01, 2015, 06:45:31 AM »

  Let's hope we can pull this one off.  cheesy  I'm caught up in a coloring scheme at the moment... will post it in another thread.

Logged

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



WWW
« Reply #5 on: December 01, 2015, 07:06:14 AM »

wow, some crazy math, in some of my latest pics (and posted frag) a mandelbulb and a menger sphere are rendered in the same space and we see the interference. Being able to control that interference via a "spray" would be an amazing feat.
The "spray" controls which formula has dominance in the same space?
Spray "droplets" grow clusters based on orientation when they hit the surface?
I think the first will be easier, spraying bulb solvent and/or sponge solvent at a space that contains both bulb and sponge, area eroded by bulb solvent is dominated by sponge formula and area eroded by sponge solvent is dominated by bulb formula.
Way out there man!  afro
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #6 on: December 01, 2015, 07:17:41 PM »

  I would think we might be able to weight the formulas for dominance, permeability, and penetration   tongue stuck out

 1) set up a framework to target specific locations of the fractal on mouse over.

  I think Syntopia said something about there being some hurdles to overcome if we wanted to do something like that with Fragmentarium- I think an early feature request was to be able to click on the fractal to select a specific part of it (extract Julia coordinates), and Syntopia said there were problems passing information back and forth between the GPU and CPU.

   We need to implement a way to pass the fractal window's pixel position and depth to an accessible array that mouse over would allow us to select from.  That would be useful for exploration anyway (x,y,z position on mouse over).  This will have to be hard coded into Fragmentarium, rather than being another frag, since it will be part of the interface.  I think M3D and Mandelbulber already have the ability to extract Julia coordinates from the fractals, so... they have at least part of this covered already.  We need to do this for M3D exploration window!!!!

  2)  use this information to allow local alteration of the fractal.  For now, I'd recalculate the whole fractal just to get this thing working, but we eventually want to be able to do a quick local redraw.  

   -center the alteration at a certain point (new origin at that point)
   - scale pixel distance from new origin for added fractal
      -- either do a simple blend of the old fractal's orbit values with the new fractal (centered at and scaled to the new origin values), grow where the old fractal is not, or blend formulas according to permeability, penetration, dominance, etc.   We might not want the new formula to add new structure: it might be an acid that eats away at the existing structure...

  We can already do pretty simple blends, by programming a second formula to only interact in a specific area after we calculate the first formula*.  The major thing is the ability to mouse over and select specific areas to do it visually, instead of using parameters to center a second formula.  Pretty sure Mandelbulber might have something that allows you to do things like this already, from what I've seen.  Mclarekin?
      
 * So, I'd calculate the first formula, and if it is withing a certain distance of the new origin, scale pixels appropriately, start out new fractal from new origin (one or more iterations:f2,f2,f2), then add in (maybe scaled) orbits from the first formula as you continue to iterate

  Down the line:  3) set up permeability, etc.  4) set up spray gun- maybe create multiple new origins due to adherence (3Dickulus), sometimes they could interfere, sometimes not...  


Logged

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



WWW
« Reply #7 on: December 02, 2015, 05:30:26 AM »

Fragmentarium currently renders to 2 textures (flipping with each subframe to accumulate, rendering to one and accumulating to the other), RGB, and uses A for accumulation amount, this texture is rendered to a quad for display. At this stage (display) the depth buffer is lost due to the flat surface used for rendering the texture... and these are 2 separate glframebufferobjects. Standard GL mouse "picking" code does not work here.

the first subframe depth buffer gets filled with real fractal depth values and is used to draw the spline paths with occlusion and for saving (1.0/z) as alpha channel in EXR format images,  in "progressive" render the alpha channel is preoccupied with tracking accumulation but before the texture is rendered to a quad for display (buffer shader) the depth buffer is available (this is when it can be written to EXR file as alpha channel).

the glframebufferobject with the depth information should be able to be polled for a z value and xy can be figured out using a transform on mouse@screenXY vs camera->pos->dir

but me thinks your average gfx card would be way too slow to make this useable... however... there is this <a href="https://www.youtube.com/v/uFWw6hGIKmc&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/uFWw6hGIKmc&rel=1&fs=1&hd=1</a>

Logged

Resistance is fertile...
You will be illuminated!

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



WWW
« Reply #8 on: December 02, 2015, 05:53:15 PM »

however... there is this
How add this chromatic aberration effect in fragmentarium?  embarrass  roll eyes Maybe other simple post-effects...
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #9 on: December 02, 2015, 06:19:01 PM »

the first subframe depth buffer gets filled with real fractal depth values and is used to draw the spline paths with occlusion and for saving (1.0/z) as alpha channel in EXR format images,  in "progressive" render the alpha channel is preoccupied with tracking accumulation but before the texture is rendered to a quad for display (buffer shader) the depth buffer is available (this is when it can be written to EXR file as alpha channel).

the glframebufferobject with the depth information should be able to be polled for a z value and xy can be figured out using a transform on mouse@screenXY vs camera->pos->dir

  So we can't grab the pixel position prior to passing it to the DE loop, saving it if it's a hit, then compare mouse@screenXY to camera->.... because the pixel position is not passed by the front end, rather it is calculated in the GPU..


  nevermind. 
Logged

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



WWW
« Reply #10 on: December 03, 2015, 05:30:26 AM »

yes, no pixel information is available until after the shader executes on the GPU
I tried, some time ago, to poll the depth buffer for coordinate feedback but did not get it working right, I do think it is possible to get depth value @mouseXY, I just haven't found the method yet, I was looking at GL "object picking" example but this requires two passes of GLpaint, one for image one for depth, and a "pick" buffer.
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #11 on: December 03, 2015, 07:01:38 AM »

  There has to be an efficient way to pass the depth to a cpu array on detection of hit.

  What about mouse click on the window recalculates the depth of the pixel the mouse pointer is over?  Or we could do mouse hover> .3 seconds = pixel depth check at current location...


Other stuff:
http://www.fractalforums.com/index.php?topic=21759.msg87160#msg87160

https://www.opengl.org/sdk/docs/man2/xhtml/glReadPixels.xml

 
Logged

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



WWW
« Reply #12 on: December 03, 2015, 07:47:18 AM »

I use...
Code:
glReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_FLOAT, myDepths);
...to copy the depth buffer for writing as alpha channel in image file, if I make myDepths array public (or at least available to mainWindow) we should be able to read it @mouseScreenXY cheesy
Logged

Resistance is fertile...
You will be illuminated!

                            #B^] https://en.wikibooks.org/wiki/Fractals/fragmentarium
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #13 on: December 03, 2015, 09:10:52 AM »

  cheesy  might be nice.

  So we will have depth + coord, so we can get the vertex from that.

  I think there should be a function that you can put coord + depth into to extract a vertex, right?  Inverse projection matrix???
Logged

Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #14 on: December 03, 2015, 06:34:38 PM »

You guys actually inspired me quite a lot to mix spatially various formulas. And this can be easily done using sin-based fields or so.
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
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 2614 Last post December 09, 2006, 02:30:37 AM
by Unhooked
Weird mandelbrot modification. Meet & Greet init 1 1192 Last post September 11, 2011, 11:48:16 PM
by lycium
Cheater's Brot... and spokes modification Theory M Benesi 0 2234 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 545 Last post June 03, 2013, 07:27:46 PM
by vinz
Circle and Line, fractal style Images Showcase (Rate My Fractal) Eric B 1 2064 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.198 seconds with 25 queries. (Pretty URLs adds 0.014s, 2q)