K Means Clustering

Plugins linking to this thread: (hide)

K-Means ClusteringAuthor: Constantine Tarasenkov
Partitions a polygon mesh with the k-means method.

In the thread linked below, Constantine shows some applications of that method.

local backup: k-means.rar

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

K Means Clustering

Post by iamVFX » 21 May 2012, 09:40

Well, sort of k-means (: The truth must be told: I don't know math much so I made it myself. No repeat nodes, just pure awesomeness of "build array from set" and "find in array" nodes.

1,000,000 points in one second

[rimg=1000]http://xsisupport.files.wordpress.com/2012/05/no1bhm.png[/rimg]

Download: http://dl.dropbox.com/u/10965660/ice_stuff/k-means.zip
Last edited by iamVFX on 15 Mar 2013, 19:01, edited 2 times in total.

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 21 May 2012, 10:28

Origami

[rimg=1000]http://screensnapr.com/e/c4l5Lj.png[/rimg]

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 21 May 2012, 12:26

You can disconnect polygon islands by k-means also (Disconnect Islands compound is attached below)

[rimg=1000]http://screensnapr.com/e/PPZH78.png[/rimg]

Compound is allow you to switch to any context

[rimg=400]http://screensnapr.com/e/XXyqM4.png[/rimg]
You do not have the required permissions to view the files attached to this post.

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: K Means Clustering

Post by Tekano » 21 May 2012, 13:09

who's a clever lad eh!? so basically you made this?

Image

awesome stuff. wouldn't know where to begin. thanks very much for posting, will have a look to see if I can understand the ICE tree flow later , thanks!
Gossip is what no one claims to like, but everybody enjoys.

User avatar
Hirazi Blue
Administrator
Posts: 4972
Joined: 04 Jun 2009, 12:15

Re: K Means Clustering

Post by Hirazi Blue » 21 May 2012, 13:52

Nicely done, obviously.
But for the even more mathematically challenged like me,
could you perhaps say something more about the specific situations
where you would use this?
...

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 21 May 2012, 15:56

Tekano wrote:who's a clever lad eh!? so basically you made this?

Image

awesome stuff. wouldn't know where to begin. thanks very much for posting, will have a look to see if I can understand the ICE tree flow later , thanks!
Yes, you can! Everyone can, I continue my K.I.S.S. workflow. And the most funniest part - that formula that you showed me - I don't understand it and I'm not used it. All stuff inside of compound is working on arrays sorting. And it works as if it was that formula! How can this be even possible?!
Hirazi Blue wrote:Nicely done, obviously.
But for the even more mathematically challenged like me,
could you perhaps say something more about the specific situations
where you would use this?
I don't know. But what I know for sure is that it was implemented in Houdini first, and I was thinking on that moment "I can do this in xsi too". He used for each (we call it repeat) node I guess (from description: "as the iterations go along"), I made it without any loops.

User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 14:09
Location: Birmingham

Re: K Means Clustering

Post by SamHowell » 21 May 2012, 17:27

Nope.

I still have no idea what this is for.

I would like to know though.

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: K Means Clustering

Post by Tekano » 21 May 2012, 17:41

SamHowell wrote:Nope.

I still have no idea what this is for.

I would like to know though.

Hi Sam, am fairly certain that this is related to breaking up objects into pieces where each piece is a voronoi cell http://en.wikipedia.org/wiki/Voronoi_cell - this you must have heard of / seen already :)
Gossip is what no one claims to like, but everybody enjoys.

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 21 May 2012, 18:03

SamHowell wrote:Nope.

I still have no idea what this is for.

I would like to know though.
lol, guys

it's about the question... why we want to get an answer, if we don't need it :D

i mean what that sequence of numbers means... they're placed together for some reason, right? why you can find so many people who remembers them? :D

just watch it 'till the end


User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 14:09
Location: Birmingham

Re: K Means Clustering

Post by SamHowell » 21 May 2012, 18:55

OK thanks for the help guys. :) I think I see what is being done here and I now know (sort of) what a Veroni Cell is.

Used by John Snow (no less) to help cure cholera. My favourite pub in Soho is named after him. I shall tell everyone about it when I'm in there next. Maybe I'll get a free drink (maybe not).

What use is this for computer graphics? Specifically Softimage users? Some kind of organic procedural modelling, shattering, noise?
Or something else?

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 21 May 2012, 19:15

SamHowell wrote:What use is this for computer graphics? Specifically Softimage users?
I'm not deliver a product :D I have fun of messing with ice and sharing stuff with the hope that someone can find it useful.

Because I know that I can get bored and do something else soon...

User avatar
Mathaeus
Posts: 1763
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia

Re: K Means Clustering

Post by Mathaeus » 21 May 2012, 20:40

SamHowell wrote:
What use is this for computer graphics? Specifically Softimage users? Some kind of organic procedural modelling, shattering, noise?
Or something else?
Whatever you do with "cell" pattern. Let's say, well known tutorial about creating stones in Max. Basically, sphere is "flattened" by cells. Well, for something realistic, procedural pattern is just a start...
Some real challenge would be a crumpled paper.... :)

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 22 May 2012, 14:56

Transferring cluster ids to disconnected island polygons

[rimg=500]http://img542.imageshack.us/img542/2598/0d727d412162497faefb6bf.png[/rimg]
Last edited by iamVFX on 13 Oct 2012, 23:20, edited 1 time in total.

User avatar
SamHowell
Posts: 364
Joined: 09 Jun 2009, 14:09
Location: Birmingham

Re: K Means Clustering

Post by SamHowell » 23 May 2012, 13:19

Mathaeus wrote:
SamHowell wrote:
What use is this for computer graphics? Specifically Softimage users? Some kind of organic procedural modelling, shattering, noise?
Or something else?
Whatever you do with "cell" pattern. Let's say, well known tutorial about creating stones in Max. Basically, sphere is "flattened" by cells. Well, for something realistic, procedural pattern is just a start...
Some real challenge would be a crumpled paper.... :)
Cool. I look forward to seeing what turns up on this thread.

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: K Means Clustering

Post by iamVFX » 13 Oct 2012, 23:21

[rimg=800]http://img28.imageshack.us/img28/7640/83e078322acd4176b11fc08.png[/rimg]

Bullit
Moderator
Posts: 2511
Joined: 24 May 2012, 09:44

Re: K Means Clustering

Post by Bullit » 14 Oct 2012, 09:47

Nice. Is there a way to go from object to polygons islands to independent objects and vice versa based on distance between them?