YOUR ACCOUNT

Messages 1 - 45 of 96
First | Prev. | 1 2 3 | Next | Last 
Login or Register to post new topics or replies
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Starting with the non-overlapping circles and moving toward pattern filling, now in Scripting mode.

Here is the first brute-force non-overlapping circles Script.

Not very sophisticated. I just take random locations and put a circle of random size there and make sure the radius isn't larger than the distance to the closest existing sphere. Lots of extra needless circles this way without really filling up the space.

  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
Very nice to see your progress smile:)

Still have a bit of empty areas...
How about move + shrink strategy? I mean, you drop a circle at a random location, check for overlap (so far the same as what you did till now). Now instead of just shrinking the circle, how about nudging it's center a bit too?
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
According to my measurements (External > Average) you've achieved 78.1% circle coverage.

Decent first effort. smile:D
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
you've achieved 78.1% circle coverage


If you calculate it like that, filling a square with just one big circle will fill 78.5% of the image... smile:D

Quote
How about move + shrink strategy?


I have a few different steps planned.

The first obvious improvement would be to ingore any coordinates for new circles that are inside other circles (and thus have a radius of 0). And to ensure a minimum size for the circles in the initial circle-creation stage, so we don't get tons of those tiny dots.

But, more to the point, I have a different strategy planned, which works at least on paper, that is a fast way to do circle filling with no gaps in between. It's a bit more involved programming-wise. It is to fill the area so that any new circle created (apart from the first two) is always touching at least two existing circles.

A fancier version would take into account the original image, it's lightness value or local contrast (detail amount) in determining the radius. This way it gets closer ot the original challenge.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
The proper term is "circle packing". I just Googled "circle packing" and landed right on Quasimondo's Flickr images.

(Whatever happened to Quasimondo anyways? Haven't heard of him since 2008.)

The proper circle packing algorithms seem quite complex.
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Quasimondo was the guy (or one of the guys) who developed Aviary Peacock. I believe he stopped hanging here when he starting developing it.

You should email him and tell him we want him back.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Just giving the circles some space around them makes it look better.

I finally read up on anti-aliasing zones and implemented it, so I don't have to set the antialiasing to "all pixels".

  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Oooo these are interesting to see in FilterForge.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Some improvements. A new circle is added to the table only if it is a valid circle (no overlap, above minimum size), so 600 circles fill the image in better than 2000 totally random circles did.

The index number is now used for shading as well (combined with an 5-color gradient and an elevation gradient).

I have one problem: For the life of me I can't seem to be able to handle getting out of the while-loop when the pattern is "full". So it just throws an error when I increase the "Number of circles" slider above the point where the pattern is full. (by "full" I mean when 100 consecutive attempts to place a new circle fail.)

  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Nice work there! This should be made into an official component.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
WOW!!!! W O W !!! You are a genius ThreeDee, you have done a really great, nice and good work!! I like much what you have done until now.

AWESOME!
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Now this is starting to become fun. Image as color source.

  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Nice!
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
This will be the next FilterForge number one hit filter.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
With my luck, this feature will be included in the next beta version of V4... smile:|
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
I would like to use the original image to modify the radius of the circles as well. For some reason math.random() is disabled for get_sample function smile:?: so looks like I need to create a pseudo random number function for this.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
By the way, here's a question. When sampling the color, are you deriving the mean or median? :o
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Quote
Skybase wrote: When sampling the color, are you deriving the mean or median?

Just the center point of the circle.

Okay, so I got the pseudo-random number function working, so now I can use the original image for size information. Darker areas make the initial circle sizes smaller.

  Details E-Mail
Sharandra
Filter Forge Addict

Posts: 863
Filters: 26
Very cool, Threedee! Great that you took this challenge up! smile:D
I guess once you got it all working properly it could be any shape, not just circles?
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Circles are easier than random shapes as you can calculate the distance from their perimeter very easily. But yes, the ultimate goal is to be able to do this with any shape. Or even a number of different shapes.

I like how the Lionfish comes out.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Maximum circle size variation gives a fractal-like look.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Small size range.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Ok, pretty good. But now let's go back to basics.

The packing density achieved with the current method is fairly good.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
However, when you compare it to a properly packed texture, you can see it can be vastly improved.

  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Now, the math necessary to achieve that is way too complex for my taste, so here's my simplified approach/theory which should give a relatively good result:

Take two connected circles in the center and start drawing circles which touch the previous circle and the lowest available index circle filling in the space in clockwise direction.

Should be simple to implement and should give a good result.

The only foreseeable problem is what to do if the shape grows itself into an internal dead-end. So there needs to be an excape route when the next circle cannot be added in this wise.

  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
:o Interesting approach. I always imagined you needed some form of buffer for doing this.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
Nice, well done and interesting this two examples you have made





Of course that this can´t be compared to the very tight and very compressed and VERY packed circles like this other example



BUT I think that although this is better, your example are not in bad at all, and are just different way, and I agree that surely to be able to make this very compact and tight packing would involve much more complex math and a different algorithm.

Please, continue your great work and keep getting it better and better smile:)
  Details E-Mail
Quasimondo
Quasimondo

Posts: 147
Filters: 32
Quote
(Whatever happened to Quasimondo anyways? Haven't heard of him since 2008.)


Hi guys,

it's been a few years but I just downloaded the latest version of Filter Forge only to discover that there is scripting possible now. Wow that's neat! I guess that might drag me right back in here. Looks like I have to learn Lua now.

Also saw the "Bomber" component (which did not exist back in the days when I was still quite active here) which I cannot help to remind me a quite a but of my "Autopainter" hub in Peacock smile;-). But of course I can't deny that I might have taken the one or the other inspiration here when I made Peacock.

Seeing this thread makes me want to try out how my circle packing method works perfomance-wise with Lua: Starry Night Pie Packed
Cheers
Mario
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Awesome, Quasimondo has returned! smile:ff: Welcome back!

I love your implementations of circle packing, especially the flavor of fitting them into the largest available space.

Lua will be a piece of cake for you.

TD
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Quasi is alive! smile:beer: smile:D
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
Please, any information update of this amazing and awesome filter project?

Is ThreeDee missing again? The last message is from 26 October, one month ago, and in this thread was in september 18 and now we are in November 26.

What ThreeDee have done here looks really nice and well done and does not necessarily need to be like the Quasimondo examples, I like it already just as the examples available above from ThreeDee
  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 412
Filters: 1
It looked promising I hope something good will come from the effort. In the mean time I use peculator on my iphone. This level of math is way beyond me or I would give it shot in FF.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
Quote
ddaydreams

It looked promising I hope something good will come fr om the effort.


I wish and hope that too, although I think that he has already got it right as it is now, as the image of the FF Lionfish is already well done as shown here.



Quote
ddaydreams
In the mean time I use peculator on my iphone


YES!! The Percolator App for Iphone or Ipad is really excellent and amazing what it can do.

Although the problem with it is that is limited to a resolution of 2048 x 2048, and here in filter forge would not have a lim it, BUT you can use the "Live Trace" or "Image trace" of Adobe Illustrator or from Corel Draw and convert it to vector (it seems that it works very well) and then you can have the percolated image in ANY resolution you want.

PERCOLATOR USED THE WAY OF THREEDEE AND NOT FROM QUASIMONDO

ThreeDee wanted to get to the level of very tight circle packing that Quasimondo have shown in his beautiful and wonderful examples, BUT it seems that this is more complex than it seems, and so others app available, like Percolator is using the more separate and less space filling as shown already by ThreeDee in the examples above and it looks very nice too anyway.

I have not yet found any information related to the very tight and compressed circle packing that Quasimondo have shown and is using, and do not know how he has done it, perhaps is a own special programmed software made by himself or using something like the Processing language to make his own algorithm.
  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 412
Filters: 1
Quote

YES!! The Percolator App for Iphone or Ipad is really excellent and amazing what it can do. Although the problem with it is that is limited to a resolution of 2048 x 2048, and here in filter forge would not have a lim it, BUT you can use the "Live Trace" or "Image trace" of Adobe Illustrator or from Corel Draw and convert it to vector (it seems that it works very well) and then you can have the percolated image in ANY resolution you want.


Yes convert peculator image to vector is probably a good option. I'll have to try that sometime
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
so... well aside from our established group, anybody doing actual research on how this effect is achieved properly? smile:p

Might be interesting to see it implemented with this: http://en.wikipedia.org/wiki/Halton_sequence
  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 412
Filters: 1
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
That's probably the most direct manner, though given the fact that it's a pretty set thing, you don't have many choices for alternative design attempts.

ThreeDee's approach is actually kinda neat. If done right, you probably don't need trig because each circle is being drawn in a spiral form. So given the first x radius, draw the next circle next to it, and spiral outwards = probably a nice clean method.

//unrelated to filterforge....

On a totally unrelated FilterForge note... here's something I did a while ago. Colors derived from image. smile:) Self homework = make it fully original without deriving bits and pieces of code from everywhere.

  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 412
Filters: 1
Skybase, what app did you do that in?
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Processing. smile;)
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
//more commentary unrelated to filterforge
A less elegant but hyper easy approach using StudioArtist 4. Program lets you do a lot of crazy things. Which is nice.

  Details E-Mail
Betis
The Blacksmith

Posts: 1207
Filters: 76
Hey guys, I came across this cool 3DS Max plugin that does this in 3D!
https://sites.google.com/site/autofill21/gallery

It's written in python, but it's open-source! Maybe similar methods could be applied to FF lua.
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
autoPack is pretty cool. As more of a side-information related to autoPack, the plugin lets you load up protein molecules with studied structures and animation in various model modes. You use these to fill space up with cellPack. They were doing a contest a while ago promoting the cellPack thing. CellPack crashes a lot so I've only gotten it to work once unfortunately.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12298
Filters: 35
If you may be interested in circle packing in 3D (sphere packing) I have found some time ago this very good and interesting tutorial for Cinema 4D --> Some kind of Sphere Packing in 3D

It shows how to make the sphere be packed in the tighest and closer one to each other in a dynamic way.

Quote
ddaydreams

Skybase, what app did you do that in?


Skybase is using the Processing scripting language and if you want to have more information you can see this other thread with further links to know what it is about.
  Details E-Mail
ddaydreams
Frank Hawkins
Posts: 412
Filters: 1
Thanks SpaceRay
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
SpaceRay, provided that tutorial, all you need to do is just add a repelling factor to each instance of a sphere. You can then turn up the ambient color and get flat-shaded circles for output. Cinema also allows you to sample colors based on image input. Pretty sure I remember I did that so the shader setup might be confusing but the actual process shouldn't be difficult.
  Details E-Mail

Messages 1 - 45 of 96
First | Prev. | 1 2 3 | Next | Last 

Join Our Community!

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

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

15 unregistered users.