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

Re: K Means Clustering

Post by iamVFX » 14 Oct 2012, 09:54

Can you rephrase the question please?

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

Re: K Means Clustering

Post by Bullit » 14 Oct 2012, 11:30

Ok. Thinking about it again it is more the case of turning several objects into a unique object conforming to a reference form.

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

Re: K Means Clustering

Post by iamVFX » 14 Oct 2012, 13:52

K Means Clustering compound provides unique island indices by which you can filter and move points as if they were a separate object, if you mean it

[rimg=250]http://img59.imageshack.us/img59/9571/30fb5cfd29454a4388e3ac0.png[/rimg]

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

Re: K Means Clustering

Post by Bullit » 14 Oct 2012, 16:39

But unique objects are necessary for export for other packages i think.

User avatar
gustavoeb
Moderator
Posts: 587
Joined: 21 Jul 2010, 00:33
Skype: gustavoboehs

Re: K Means Clustering

Post by gustavoeb » 14 Oct 2012, 20:55

Looks very intersting for stone walls, or stone giant creatures and stuff... :D
good job
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Ahmidou
Posts: 105
Joined: 04 Jan 2010, 14:00

Re: K Means Clustering

Post by Ahmidou » 14 Oct 2012, 23:39

@bullit: Then script it, polygon island are easy to isolate via the SDK! And by the way, you can't create new objects with ICE

Falam

Re: K Means Clustering

Post by Falam » 15 Oct 2012, 00:24

iamVFX wrote:K Means Clustering compound provides unique island indices by which you can filter and move points as if they were a separate object, if you mean it

[rimg=250]http://img59.imageshack.us/img59/9571/30fb5cfd29454a4388e3ac0.png[/rimg]
Beep, Beep, back up for a minute :) This compound can take a solid object, and break it up as though it was modeled separately, is that what I read correctly ?

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

Re: K Means Clustering

Post by iamVFX » 15 Oct 2012, 06:19

Falam wrote:Beep, Beep, back up for a minute :) This compound can take a solid object, and break it up as though it was modeled separately, is that what I read correctly ?
Not exactly... It breaks up geometry on islands, as if you break object with some sort of shatter tool but within of ice. And by breaks up I mean just gives the unique indices to random polygon clusters (see the screenshot from the first post).

If you want to break up the geometry by its existing polygon islands, see Guillaume's Polygon Islands Transformation using ICE, it's pretty effin awesome tool for all sorts of procedural animations.
gustavoeb wrote:Looks very intersting for stone walls, or stone giant creatures and stuff... :D
With such power we can make Flintstones movie!

But really not just for stones... The only limit is your imagination.

[rimg=650]http://img202.imageshack.us/img202/9987/b120de02b3c841afb3d6f43.png[/rimg]

User avatar
Rork
Posts: 1359
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands

Re: K Means Clustering

Post by Rork » 15 Oct 2012, 10:16

very cool! :)

keep them coming, this kind of stuff should be shown out of the forums more often.

we're not just a particle app people!! =))

rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ
So long, and thanks for all the Fish!!

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

Re: K Means Clustering

Post by iamVFX » 15 Mar 2013, 19:04

Compound is updated, now you can feed custom array of center points to it

User avatar
Mr.Core
Posts: 147
Joined: 10 Aug 2011, 12:35
Skype: giga-core
Location: Kharkov, Ukraine

Re: K Means Clustering

Post by Mr.Core » 23 Mar 2013, 01:20

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
I guess that's not KISS, but partial understanding of the k-means article. What you show here is just a search for closest center from array of centers to each particle. And looks like you can improve this bruteforce search by get rid of the last "Find In array Node"
I got 3.3 sec against 5.0 when did this removing on 1k centers.
You do not have the required permissions to view the files attached to this post.

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

Re: K Means Clustering

Post by iamVFX » 23 Mar 2013, 09:34

This is embarrassing :D You're right, there's no need for second Find in Array node

olivier jeannel
Posts: 30
Joined: 10 Feb 2012, 12:50

Re: K Means Clustering

Post by olivier jeannel » 15 Apr 2013, 14:49

Hi there,
Trying to reproduce the "Transferring cluster ids to disconnected island polygons" Ice Tree http://img542.imageshack.us/img542/2598/0d727d412162497faefb6bf.png
I get context troubles either connecting the "Cluster To Center Indices" output to the disconnect Islands" input or
to the "3d vector to 4d vector" input.

(Ice tree is on the Dragon polymesh) (but doesn't work either on the pointcloud)

I'm missing something probably obvious here...

A little help ?

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

Re: K Means Clustering

Post by iamVFX » 15 Apr 2013, 15:06

Dive into the K Means Clustering compound and replace Get Point ID and Get Point Position nodes to Get Polygon Index and Get Polygon Position respectively

olivier jeannel
Posts: 30
Joined: 10 Feb 2012, 12:50

Re: K Means Clustering

Post by olivier jeannel » 15 Apr 2013, 15:30

... I love you man :D

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

Re: K Means Clustering

Post by iamVFX » 15 Apr 2013, 16:55

do not