photoshop Ifs fractals

  • 13 Replies
  • 471 Views

0 Members and 1 Guest are viewing this topic.

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« on: January 30, 2019, 06:37:48 PM »
I have a new way of making fractals I think it belongs hear as it kind of falls under theoretical stuff
https://youtu.be/bpvn_IF1IMg
« Last Edit: February 01, 2019, 12:03:27 AM by matty686 »

Online claude

  • *
  • 3f
  • ******
  • Posts: 1214
    • mathr.co.uk
« Reply #1 on: January 30, 2019, 10:22:30 PM »
Nice.

Using transformed layers "dynamically linked" to files on disk is a nice feature of Photoshop.  Get an image to reference itself via a rasterize step, then just hit Save to run one iteration of the classical "multiple copy reduction machine" method of IFS generation.

GIMP 2.8.18 (the old version I have installed at the moment) doesn't support this workflow (no dynamically linked layers, afaict), but it does have Python and Scheme scripting - so you could write code to do it instead of performing simple user interface manipulations.

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #2 on: January 30, 2019, 10:43:23 PM »
if you wright a code please share it we all need an open-source way to do this

Online claude

  • *
  • 3f
  • ******
  • Posts: 1214
    • mathr.co.uk
« Reply #3 on: January 31, 2019, 03:54:28 AM »
I discovered you can do it in Inkscape, tested version 0.92.4 from Debian Buster.
https://mathr.co.uk/blog/2019-01-31_ifs_fractals_in_inkscape.html

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #4 on: January 31, 2019, 02:34:19 PM »
yay this is what i am talking about thanks so much


ok i tried it, it works. thanks claude I am very happy to have a backup now just in-case the
photoshop people change there code around 

next i will be trying it with big images like the ones i normally use

i want to find its max resolution on my pc 
« Last Edit: January 31, 2019, 03:21:28 PM by matty686 »

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #5 on: January 31, 2019, 03:48:23 PM »
Hear is an example showing that this is indeed the breakthrough i was looking for


Offline tavis

  • *
  • Fractal Fanatic
  • ***
  • Posts: 39
  • Bill Tavis
    • Mandelmap poster
« Reply #6 on: January 31, 2019, 03:58:55 PM »
Cool post! Here's an IFS fractal I made using Photoshop. I used actions to automate the transformations rather than a file layer but it basically works the same. I think the original was around 4000x4000 pixels which I then zoomed into with After Effects. The cool thing about making fractals in a paint program is that you can paint on them!


GIMP 2.8.18 (the old version I have installed at the moment) doesn't support this workflow (no dynamically linked layers, afaict)
If you are looking for an open source solution, I know that Krita supports file layers as well as transformation masks. I successfully made some IFS fractals with it a few years back but it was buggy so I gave up. However, they've done a lot of work lately so I'd bet the bugs are fixed by now
Check out the Mandelmap poster

Offline tavis

  • *
  • Fractal Fanatic
  • ***
  • Posts: 39
  • Bill Tavis
    • Mandelmap poster
« Reply #7 on: January 31, 2019, 04:57:29 PM »
Ok, I just tried with the newest version of Krita 4.1.7 and it works now (still ever-so-slightly slightly buggy, but hey it's free). It works basically in the same way as the Photoshop method presented. A file layer is made, and then a transformation mask is applied to that layer. When the image is exported as the file in the file layer, it updates the fractal. Another cool thing about this raster fractal method is that all sorts of filters  and blending modes can be applied to the layers, affecting the fractal (not shown in this pic)




Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #8 on: January 31, 2019, 11:42:44 PM »
I made a video of the Inkscape method

I think it works verry well 

thanks for showing me it claude


https://youtu.be/aom1Tkt_Mag
« Last Edit: February 01, 2019, 12:00:05 AM by matty686 »

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #9 on: January 31, 2019, 11:56:44 PM »
Cool post! Here's an IFS fractal I made using Photoshop. I used actions to automate the transformations rather than a file layer but it basically works the same. I think the original was around 4000x4000 pixels which I then zoomed into with After Effects. The cool thing about making fractals in a paint program is that you can paint on them!

If you are looking for an open source solution, I know that Krita supports file layers as well as transformation masks. I successfully made some IFS fractals with it a few years back but it was buggy so I gave up. However, they've done a lot of work lately so I'd bet the bugs are fixed by now


I am interested in learning how you use Photoshop actions to do this please teach us   

Offline matty686

  • *
  • Fractal Friend
  • **
  • Posts: 16
« Reply #10 on: February 01, 2019, 12:47:28 AM »
I took Claudes method for inkscape

and applied it to adobe illustrator cc  its slower but has better anti aliasing

https://youtu.be/fvjnzQEEykk

Offline tavis

  • *
  • Fractal Fanatic
  • ***
  • Posts: 39
  • Bill Tavis
    • Mandelmap poster
« Reply #11 on: February 01, 2019, 02:09:41 AM »
I am interested in learning how you use Photoshop actions to do this please teach us   
ok, so in basic form it goes like this:
step 1: Create a new document, which by default will automatically make a white layer named "background"
step 2: Create a new layer and fill it black. Call this layer something like "base"
step 3: Open the actions panel and create a new action. I called mine "IFS_Sierpinski". Make sure to set a function key to trigger it later (I chose F2) and then hit record.
Steps 4 through 7 are all done while recording. Anything else you do is recorded as well. For example, try shifting the hue slightly.
step 4: Make a copy of the "base" layer and transform it as you wish.
step 5: Repeat step 4 for all desired transformations
step 6: Delete the "base" layer
step 7: Select all of the new transformed layers and press "Ctrl-e" to merge them into a single layer, which you must rename as "base"
step 8: Hit stop on the action. Now you can run it by pressing F2 and see the fractal form! A really neat thing is that you can start with all kinds of images and it will always converge to the same result.
So here is what it looked like after step 7

and then after running it several times, it looks like this:

It is light because the black is slowly disappearing. You can counteract this by increasing the contrast on the "base" layer at the end of the action. Now that it is iterated, the black fractal is on the layer named "base" surrounded by alpha, with the white being provided by "background". This means that we can add another layer in between called "Other". On this layer, I painted a face in the main hole of the triangle fractal.

Now select another layer first (this is important).
step 9: select the last item in the action, and hit record again, for steps 10 and 11
step 10: select the "Other" layer and duplicate it.
step 11: select "base" and merge it down onto the copy of "Other" and rename it "base"
step 12: hit stop again, and use F2 to watch the fractal happen!

This method is actually much more flexible than the typical programmatic approach for IFS. In addition to being able to modulate color per transform, a huge difference is that you can apply non-affine transformations!
Here's an example where I modified the action to increase the contrast on the lower left, colorize the lower right to be red, and inverse the top, while also using a warp transform on each. It's not the prettiest thing but it get the idea across! I should note that in the animated eye example, the fractal itself was not made with any deformations, these were added as a post-production effect





Offline tavis

  • *
  • Fractal Fanatic
  • ***
  • Posts: 39
  • Bill Tavis
    • Mandelmap poster
« Reply #12 on: February 01, 2019, 02:16:41 AM »
I've attached a zip file with a psd file with the layers I've described along with the action. Also I should note another quirk - you must have the "base" layer selected when you start the action, since this was not recorded at the beginning.

Offline tavis

  • *
  • Fractal Fanatic
  • ***
  • Posts: 39
  • Bill Tavis
    • Mandelmap poster
« Reply #13 on: February 01, 2019, 05:24:32 AM »
to demonstrate the Krita method, I will use a more classic example, of a Maple leaf. Krita is awesome for raster work and a big reason I started using it is because of its support for 16- and 32-bit images. But ultimately, the results will be similar with any program.
The first step was to go to wiki commons and find a public domain picture of a maple leaf. I then cropped it to a square image and removed the background. Like before, the white background is a separate layer. I save my file as "maple.kra"

Step 2: Export the leaf without the background as "maple.png". Keeping the name the same and only changing the extension makes iteration easier later.
Step 3: Add a new file layer and select maple.png as the file. This is done on the layers panel by clicking the drop-down on the plus button
Step 4: Add a transform mask to this layer, from that same drop-down menu
Step 5: Use the transform tool to move the layer to it's new location.
Step 6: Repeat steps 3-5 to set up all the transforms. The idea is to use the collage theorem to fully cover the leaf with smaller copies of itself. I've used 4 copies for the maple leaf. For the stem, I applied a non-affine transformation to get a curve in it. It's slow but I felt it was worth it. On each of the 3 leaf copies, I applied a slight hue and lightness adjustment

Without the background visible, now you can press "Shift-E" to export to "maple.png" and the layers should update. If they do not update, close the krita file and/or the program and reopen it and it should work. That was the slight bug I mentioned before. After exporting several times, you'll have a fractal! Here is the maple leaf result. Not exactly photo-real but cool looking anyway! I started with a full red layer, and iterated it about 15 times I think.

And then what the heck, everyone loves a good fern. Here's one done with the same method, only using affine transforms. This one I had to iterated dozens and dozens of times to eliminate the starting box. It would be nice to automate things with scripting, but it's also cool that anyone can do this without any coding knowledge!


clip
tumble weeds in the matrix ( a photoshop IFS collage)

Started by matty686 on Fractal Image Gallery

0 Replies
105 Views
Last post January 31, 2019, 01:16:54 AM
by matty686
xx
Printing big fractals

Started by drcoolson on Discuss Fractalforums

15 Replies
1749 Views
Last post May 27, 2019, 01:17:18 AM
by 3DickUlus
clip
Paper fractals

Started by julofi on Other Artforms

3 Replies
479 Views
Last post May 02, 2018, 10:56:31 AM
by julofi
clip
Julofi's fractals

Started by julofi on Image Threads

56 Replies
2333 Views
Last post September 12, 2019, 08:18:31 AM
by julofi
clip
Classic fractals

Started by utak3r on Synthclipse

4 Replies
375 Views
Last post March 06, 2018, 11:15:34 PM
by utak3r