Login - Create Account

Pattern Filling

Messages 46 - 90 of 90
First | Prev. | 1 2 | Next | Last 
Login or Register to post new topics or replies
ddaydreams
Frank Hawkins
Posts: 338
Filters: 1
Did this filter that Threedee made in 2012 in FF make it into the FF library or did the ffxml file get shared somewhere in the FF forums or elsewhere online?

  Details E-Mail
Skybase
2D/3D Generalist

Posts: 3907
Filters: 75
lol ahhh good memories.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4360
Filters: 65
Quote
Did this filter make it into the FF library?


Nope, I don't think it did.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
It would be nice to have it. smile:)
  Details E-Mail
Borkus McJorkus
Posts: 33
Filters: 12
Has this filter been completed? And if so, where can I find it? For maybe a decade now, I've been looking for a filter that fills the selection with bubbles; this is as close as I've ever found.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 9762
Filters: 33
If you are reading this thread, you have to know that all these started already in another thread that is this other one fr om here with more information if interested

As shown in the link above on my previous last post of previous page with this Cinema 4D tutorial link Non Overlapping 3D spheres, is easy in some way (I mean there are tools for it) to make Non Overlapping particles or objects, as shown also in these other ones

make-a-festive-holiday-wreath-with-cinema-4d

how-to-model-texture-and-light-a-gumball-machine

And you could also use 2D objects instead of 3D with Cinema 4D, but the problem is that obviously you must own this very expensive software so it would be good to have some kind of similar non overlapping algorithm available in Filter Forge

Quote
Skybase

SpaceRay, provided that tutorial, all you need to do is just add a repelling factor to each instance of a sphere.


Well, I have made successfully some of these when I had the 42 days demo trial but now I could not buy the software as it cost more than 1400$ and there is no possible subscription or rent as it already happens with other companies like Adobe, Autodesk, Microsoft, and others more

I think and suppose that is possible to make this in the free Blender software but I have not found any tutorial about this and do not know if blender also has similar tools for dynamic physics as Cinema 4D have.

PROCESSING SOFTWARE NON OVERLAPPING

I think that the Processing.org software also has some way to make Non Overlapping 2D particles but as it ALL a programming software language that has NO visual GUI and all is done with scripting and coding I can´t use it

Processing.org

OTHER EXTERNAL NON OVERLAPPING OBJECTS SOFTWARE

Percolator App in the Apple Store

Shape Collage software

Studio Artist 4.0 seems to have some kind of tools for non overlapping generation of textures but I really have not tested myself and has been only told by Skybase that it could be possible

Quote
ddaydreams
Did this filter that Threedee made in 2012 in FF make it into the FF library or did the ffxml file get shared somewhere in the FF forums or elsewh ere online?


Quote
Borkus McJorkus

Has this filter been completed?


No it has not been completed and is not available anywhere, only ThreeDee has it
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
ThreeDee, could you post the ffxml of this effect?

Image

Maybe, starting from your already excellent work, we could try to find a solution to pack the shapes more tight.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 9762
Filters: 33
Quote
Ramlyn

ThreeDee, could you post the ffxml of this effect?


I agree with you, and I also would like to see how this has been done

I now remember that there was some kind of FFXML that ThreeDee has been given somewhere in the forum about this topic, although is not about this example, if I find it I will put it
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 3907
Filters: 75
Question: doesn't this basically come down to how FilterForge renders something in the first place? In order for filling to work wouldn't there be a need for a buffer for determining where the next circle shoul go down?

I kinda don't remember but wasn't the method by Threedee based on a pattern and not randomly?
  Details E-Mail
SpaceRay
SpaceRay

Posts: 9762
Filters: 33
Quote
Skybase

Question: doesn't this basically come down to how FilterForge renders something in the first place? In order for filling to work wouldn't there be a need for a buffer for determining where the next circle shoul go down?


I do not know what would be needed to do it, and I agree that there should be some way that FF calculates and knows where the next circle should be AND also calculate the size as is not only that it must not be overlapped it also must have different circle sizes that could fit in the empty available space, because is called "Pattern filling" so it means it will FILL with the most possible number of circles as possible and fitting them in the most optimised way enlarging or reducing the size of them to fit them.

The Percolator app does this perfectly and well done and is a good example

CIRCLE PACKING WITHOUT CIRCLES USING TRIANGLES

This great artwork from Quasimondo shows a good example of having other textures made without circles

Circle packing with triangles by Quasimondo

Also another example using round triangles in a different way

Smooth Triangulation by Quasimondo

CIRCLES MAY BE EASY BUT HOW ABOUT USING OTHER SHAPES?

The Percolator app developer have ONLY made available a circles version and does not include any other possible shape.

So what would happen if you had squares, rectangles, triangles, star shape, o more irregular shapes and images?

The best example for this is from some of the Quasimondo artworks

And even more with other mixed colour artwork of different shapes (although I think that this has been done the placing physically by hand for real and not done with computer smile;) smile:D )

Circle Packing on the Beach

Would be the same to calculate, or as I think it would be much difficult as must take care of the space that the shape takes and how mushy space is using to calculate others positions?

Maybe is not important the shape because it could be calculated the distance to the edge of ANY shape it could find, so it could be any irregular shape, and just search and found for any available empty and free space and calculate the size that it would fit into it

Although I really I do not know as I do not have experience with this and may be thinking and telling silly things smile:?:

MULTISHAPE?

And perhaps even more difficult perhaps would to have a multi shape pattern filling, wh ere you could have circles, triangles and square mixed together in the same design

Although if what I said about finding the edge of the shapes could be true, this would not matter and could be done the same
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 3907
Filters: 75
I suspect in the case with FilterForge you need a way to store some of the data necessary. Currently FF does it but in a different sense. Hence there's just some possibility its "possible" through alternative methods like making up a predetermined pattern but nothing like you can do in processing.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1587
Filters: 38
ThreeDee, how do you "store"/get the information about surrounding circles?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Ah yes, the eternal packing issue...

Here's the ffxml for you to play with. This is as far as I got it. It is not fast nor efficient, and for some reason it even throws an error if you set the number of circles so high that you overfill the image, although I thought I had accounted for that in various ways.

Definitely needs serious optimization if one intends to make anything very useful out of it.

Circle packing 6B.ffxml
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 3907
Filters: 75
Thank you ThreeDee. Can you explain how it works?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Circle packing V6B
(picks circle size fr om grayscale image input so that darker areas have smaller circles)

Variables:
rnd = pseudorandom number
mindist = minimum distance between circles
maxrad = maximum radius for circles
minrad = minimum radius for circles
circles = total number of circles
init = initilization variable

Tables:
tx = x coordinates for circles center points
ty = y coordinates for circles center points
tr = radiuses for circles

Functions:
rndm(rnd) = gets next random number, current random number as input
get_circles = fills tx,ty,tr tables -- this is only done on init == 0, i.e. first time get_sample fucntion is called
get_sample = checks if current pixel is within a circle and if so, fills current pixel with the color fr om the center of the circle (tx,ty) (also assigns aa_zones for antialiasing)

get_circles() in more detail:
-pick a point at random
-use grayscale PARTICLE_ SIZE input to determine modifier (darker input = smaller) for circle radius at this spot
-randomize radius between minimum and maximum using modifier
-checks distance to every previous circle already added, if new circle that is between min and max radius fits there, use maximum available radius for this spot
- if successful, set circleadded variable to 1 (exit loop) if not, try again at new random spot
- try again until success or to upper lim it (currently set to number of circles), then go to next circle
(- loopcount variable is there to avoid infinite looping)

Note: There is a rendering error that shows up when the "Ten-Circle Sets" is raised too high. Not sure wh ere it comes from, but I assume it comes from the script not finding a new spot for a circle and thus giving no values to tx, ty and tr -- may have to subtract every failed circle addition from the total count of circles for the rendering stage.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Also note that since the image color input and the circle size inputs are two separate image inputs, you can use a different image to control the size variation (by slightly modifying the filter so you have two image inputs available at the user side).
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
For instance, with a gradient input for circle size, you get this:

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Skybase wrote:
Quote
I kinda don't remember but wasn't the method by Threedee based on a pattern and not randomly?


I had some ideas for that, but this was still done randomly. Ran out of patience trying to program something that is fairly easy to do in other software.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Sphinx wrote:
Quote
ThreeDee, how do you "store"/get the information about surrounding circles?

Probably pretty clear from the script, but essentially it does precalculation for the center points and radii, puts them in tables, and then just checks the tables for hits at the rendering stage. Right now it is calculating the distance the hard way by square root for every pixel for every circle. I'm sure better ways exist. The only real optimization there is is that unnecessary circles (those that would not be drawn) are discarded during the precalculation stage.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 3907
Filters: 75
Thanks! Very nice work.

Although yes, it does fall a bit out of the practical usage zone. Still works anyway.
  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 338
Filters: 1
Quote
Although yes, it does fall a bit out of the practical usage zone. Still works anyway.

Although I did not try it on a large image I would think a large image would take a really long time. To help it be a little more practical or useful, the generated image could be kept small since it's slow. Then vectorize it. This type of image vectorizes nicely in my vectorization software. I like the packing on this. Somehow looks more organic or imperfect to me than other CP software. I'll have to try the gradient thing you mentioned using other shaped non linear grayscale images.
Thanks for sharing.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 9762
Filters: 33
Thanks very much ThreeDee for sharing the filter you have done

Quote
ThreeDee

For instance, with a gradient input for circle size, you get this:


WOW!!!! This is really a great idea and very nice to use a gradient this way
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1587
Filters: 38
Thanks! I'll see if I can shave off some cups of coffee of that render time smile:-)
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Yes! A cup of coffee. The application for pattern filling in iPhone is Percolator, and the logo of the program are the bubbles of the coffee cream. smile:p

I'm working on a different approach :

1. Making some basic shape filled with circles ( that can be rotated to better fitting the picture area ).

2. Adding color to the circles on the basis of the picture colors.

It may have less variety than what ThreeDee made, but maybe I can make it faster ( ....I hope ).
Filter name : Chashka Kapuchino ( Чашка капучино ) = a cup of cappuccino. smile:D
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1587
Filters: 38
Alright, this is not a easy task - the initialization problem problem is quite challenging.

Here is a far from perfect revised version. The script is "unsafe" (meaning it may delete your HD, steal your account numbers and stuff) because it needs to save and load a cache table.

Instructions: wait for the first renderblock to show up, then uncheck "Initialize" to see how performance would be in a perfect "initialization problem free world" smile:dgrin:

Note that the reason why it "crashes" with more circles is that there is an internal timeout threshold which is not designed for initialization tricks like this.

You need to check "Initialize" wait for a render block and uncheck again each time you change something related to the circle packing algo.

Circle Packing - Sphinx.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Nice! Works good. Had to load V5 beta though...

It seemed to me that with that construction you ended up with the script saving the table for every rendering thread (which is 64 times or, for larger images, 256 times) as well as loading it for every rendering thread, so I made a minor modification, which should only save the table once and load it once, loading taking place in prepare(). Probably not the neatest possible code, which is why it actually slows down the rendering rather than speeding it up, but it looks clearer as you only render the first thread on initialize, so you can tell easier when initialization is done and you can turn it off.

Circle Packing - Sphinx, TD mod 2.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
But the actual point is that you've managed to make a 4X speed increase in the filter!

AND I can crank up the circles amount to 1000 from 800 which was the previous max before the script gave out.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Another thought occurred: What if the RGB values for the circles were also stored in the table? Then you could do the initialization with a smaller image and change the dimensions for the actual render -- and you wouldn't even need the original image at that point.

... but which would probably run into the script timeout error faster.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
You do get an interesting side effect with the current version: you don't have to re-initialize if you change only the image, not the other settings, as the same table from file is used automatically. Of course, the "wrong" image will be used to determine the circle sizes if done that way.

Perhaps an Int slider (range 1-10) with which to choose the file that you want to read/write? (number gets added to file name) => Presets of sorts.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Better way to increase size of output: Replace External Image with Color Input that allows images.

Ladybug enlarged in that fashion:

  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Sorry. I don't mean to ruin the work of anybody or being noisy, but... wouldn't be better if we continue with this filter on FF4.0?
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1587
Filters: 38
Quote
It seemed to me that with that construction you ended up with the script saving the table for every rendering thread (which is 64 times or, for larger images, 256 times) as well as loading it for every rendering thread, so I made a minor modification, which should only save the table once and load it once, loading taking place in prepare(). Probably not the neatest possible code, which is why it actually slows down the rendering rather than speeding it up, but it looks clearer as you only render the first thread on initialize, so you can tell easier when initialization is done and you can turn it off.


Yeah, I didn't do anything about that because I reckoned the user would just uncheck initialize after the first render block completes. The whole init procedure is somewhat strange usability wise.

The problem about the "x<1/16 and y<1/16" solution is that you assume the coordinates always comes in that way. Put a transformation/distorter in front and you may get 12345, 6789 as first coordinate and the table will not be rendered.

Sorry about the V5 conversion - I had V5 going to check out the new awesome stuff, and I wanted to see if they did anything about init problem. Ramlyn, I heard V5 is the future, go get it smile;-)

The difference speed wise on my old dual core here is 6 mins and 20 secs for the original and 36 secs for the optimized. Quite a difference. I hope they'll figure out how to make that super global prepare step at some point. The 3D mandelbrot filter I made is suffering severely by this. I should check out if the table trick can improve that too.
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Ha! Ha! smile;)
Yes Sphinx, I already got the V5.0.
I agree with you that the new version is the future.
The problem at the moment is that we still can't post filters in the Library with the 5.0, and the situation will probably not change within the next 5 months. So, any filter we do with the 5.0 can only be shared like you did in this topic. smile;)
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1587
Filters: 38
Well, any "unsafe" filter can't be submitted either, so we're stuck here nonetheless smile:banana: .
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
Quote
Put a transformation/distorter in front and you may get 12345, 6789 as first coordinate and the table will not be rendered.


True, if none of the coordinates meet the condition (x<1/16 & y<1/16), there will be no table. If one wanted to have a distorter after this effect, one would have to construct the filter so that during the initialization the distorters/transformations would be disabled as well (with Switch or something) to ensure it worked. I was considering this more of a standalone effect.

It doesn't place any circles outside the 0<x<1, 0<y<1 domain anyways.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1666
Filters: 111
For practical purposes, it would be more sensible to make this effect in such a fashion that you could just use the Lookup Component down the chain to fill the circles with flat colors (or with a circularly cropped version of the original image). If we take out the size modification based on input image, which is not all that essential for most purposes, all the precalculation can be done during Prepare().
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Today my version of circle packing filter should appear in the library.
It will be rather different from what I wanted to do and what ThreeDee did.

The basic idea was to :
1. Split an image in hexagons.
2. Build 7-8 patterns composed of circles of different sizes to fill every hexagon. The user could select what pattern using in every hexagon. He could also rotate the pattern to have nicer results.

Everything went fine till this point.
The problem came when I had to fill the circles with the image colors.
Because the circles were not on a straight line, I had to set the color almost circle by circle.
I tried different solutions, but it was impossible to do it with a reasonable number of components.

That's why I decided to change filter style, setting a single color for all circles or the image itself. I also packed the circles more tight, to let appear the hexagonal structure ( it looked interesting ).
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Here is a preview :

Image
  Details E-Mail
LexArt
LexArt

Posts: 256
This is very good and interesting, did not know that this may be possible in some way in FF, great work ThreeDee, and thanks for sharing the filter result, will see how it works
  Details E-Mail
SpaceRay
SpaceRay

Posts: 9762
Filters: 33
i want to return to this and see what can be done with the exceleent work done by Threedee on the filter above, as it could be interesting and useful for other things and some cool effects

i would really love that the FF 6.0 bomber could have non-overlapping particles option, but meanwhile this I think may be the closest thing available now

Thanks very much for making it ThreeDee
  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Some new filters :

Almost Polygon Packing

  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Another image from Almost Polygon Packing :

  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Then Almost Cube Packing :

  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
These two filters are already uploaded and should appear soon.

The following is Takkekei Coffee, still not uploaded.

  Details E-Mail
Ramlyn
Ramlyn

Posts: 1908
Filters: 320
Another image :

  Details E-Mail

Messages 46 - 90 of 90
First | Prev. | 1 2 | Next | Last 

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

29,459 Registered Users
+12 new in 7 days!

137,923 Posts
+63 new in 7 days!

13,450 Topics
+8 new in 7 days!

Online Users Last 5 minutes:

11 unregistered users.

Recent Wiki Edits:

Follow filterforge on Twitter