Challenge: Make the fastest island selection compound

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Challenge: Make the fastest island selection compound

Post by Chris_TC » 12 Feb 2012, 16:11

Hey folks,

The challenge is to make the fastest polygon island selection compound possible. Your compound has to work out of the box, as we don't want to install plugins, addons, workgroups or anything else (so I think you will need to rely on factory nodes).

I have attached my own polygon island compound along with a test object for you to compare performance. Please make something much faster, or pimp my existing compound :)
Depending on the island, my compound outputs the same polygon indices multiple times. I don't mind because it's not typically a problem for ICE Topo. If you prefer to output only unique indices, feel free to go for it. But it'll likely slow down your compound.

Image

P.S.: Just in case you were wondering, the idea for this was proposed to me by someone on Vimeo after I asked for a fast polygon island compound in my latest video.
Attachments
testgeo.zip
(11.28 KiB) Downloaded 312 times
CG Find Polygon Island.xsicompound
(64.88 KiB) Downloaded 331 times

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

Re: Challenge: Make the fastest island selection compound

Post by iamVFX » 12 Feb 2012, 17:08

Is it necessary to input a polygon index to select the island? If not, you can just wrap Bradley's script into a compound via PPGLogic, so on compound creation it's creates a clusters and on change of index value it's filter them

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 12 Feb 2012, 18:39

iamVFX wrote:Is it necessary to input a polygon index to select the island?
Yes.

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 12 Feb 2012, 19:25

After trying out some more things, I've managed to speed up the compound considerably. On the test geometry it's about 5 to 6 times faster than the one I posted previously. I will not post my updated compound yet - it is supposed to be a challenge after all :D
Just a hint: I got rid of one of the loops.

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

Re: Challenge: Make the fastest island selection compound

Post by Mr.Core » 13 Feb 2012, 01:08

Here is CG Find Polygon Island result ( 2 m 3 s ):
http://xmages.net/storage/10/1/0/1/3/up ... 5e5f85.jpg

And here is my ( 1 s ):
http://xmages.net/storage/10/1/0/6/2/up ... d9f224.jpg
It takes one int as polygon index and outputs rest of faces from the shared island ( no duplicates )


I have complicated your geo example a little bit because it has been calculated both on my and your compounds mostly at real-time, and have attached my own compound, check it out please, I am not sure that it works as expected but seems like it does that
Attachments
Polygon to Island.xsicompound
(28.35 KiB) Downloaded 317 times

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 13 Feb 2012, 15:20

Hi,

I have checked your compound, but it doesn't give me proper island selections. It seems to always select several islands.
I have attached a new test object and my updated compound. If you could fix yours, that would be awesome. It seems very fast!
Attachments
CG Find Polygon Island.1.2.xsicompound
(55.31 KiB) Downloaded 325 times
testgeo2.rar
(194.1 KiB) Downloaded 301 times

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

Re: Challenge: Make the fastest island selection compound

Post by Mr.Core » 13 Feb 2012, 15:58

Hi Chris,
On which scene you have checked it ? On the "testscene2" ?
I have tested it there and really encounter some strange behavior, but it has been solved by adding "build from set compound"
http://clip2net.com/s/1AzEo
Could you please share a scene with this problem ?

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 13 Feb 2012, 17:49

Mr.Core wrote:Hi Chris,
On which scene you have checked it ? On the "testscene2" ?
I tried with many different objects (also made new scenes just to be sure), but it didn't seem to work with any.

For example, when I use your compound with the first test object I posted and set your compound to index 1, it extrudes two polygon islands. If I use a Build Array from Set, it extrudes all polygon islands.

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 13 Feb 2012, 17:58

I made a new scene. Made a standard 8x8 grid. Deleted the 2 middle rows and columns. Then used your compound set to index 25:
Image

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

Re: Challenge: Make the fastest island selection compound

Post by Mr.Core » 13 Feb 2012, 18:27

Its a quite strange result
I have got next : http://clip2net.com/s/1AC56
I have also attached my scene,2012 sp1\ x64
Attachments
islDetectionChallenge.rar
(88.04 KiB) Downloaded 341 times

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 13 Feb 2012, 19:27

Mr.Core wrote:I have also attached my scene,2012 sp1\ x64
I opened your scene, and all 4 islands are extruded. If I remove the Array From Set, I'm back to the 3 islands from my screenshot.

Someone else is going to have to take a look, maybe something is broken on my end.

milanvasek
Posts: 143
Joined: 09 Jun 2009, 12:12
Location: Czech Republic
Contact:

Re: Challenge: Make the fastest island selection compound

Post by milanvasek » 13 Feb 2012, 19:51

i tried Mr.Core's scene and got the same result: http://clip2net.com/s/1AC56

2012 SAP, 64bit
Milan Vasek
ceramic artist & softimage fan
http://www.milanvasek.com

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Challenge: Make the fastest island selection compound

Post by Chris_TC » 22 Feb 2012, 18:14

I also tested the compound at work, but I get the same erratic behavior. I'm not sure why :-s
Regardless, everybody is free to add their compounds to the mix...

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

Re: Challenge: Make the fastest island selection compound

Post by gustavoeb » 01 Apr 2012, 23:42

Im currently building something related, but not quite the same... Im currently using a setup that is a slight variation of the method on Gui's Lafforge blog: http://frenchdog.wordpress.com/2010/03/ ... ng-arrays/

Im using a slightly different while loop, and a different way to organize the indexes... Anyhow it should be able to select from a PolyInput, and I dont find it that slow... Is anybody doing somehting completaly different?

I found a lot of broken links in this thread, so my question is:
What is the fastest working compound until now? So I can compare mine...
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Re: Challenge: Make the fastest island selection compound

Post by grahamef » 03 Apr 2012, 19:53

gustavoeb wrote:Im currently building something related, but not quite the same... Im currently using a setup that is a slight variation of the method on Gui's Lafforge blog: http://frenchdog.wordpress.com/2010/03/ ... ng-arrays/

Im using a slightly different while loop, and a different way to organize the indexes... Anyhow it should be able to select from a PolyInput, and I dont find it that slow... Is anybody doing somehting completaly different?

I found a lot of broken links in this thread, so my question is:
What is the fastest working compound until now? So I can compare mine...
I'm interested in knowing that too. I was thinking of trying that technique myself but I haven't had the time lately.

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

Re: Challenge: Make the fastest island selection compound

Post by gustavoeb » 18 Apr 2012, 15:05

my similar technique doesnt work on islands with very messed up geo ~x(
I had to make it slower, but even then it wont support islands with veeeeeeeeery messed up geo :))

Ill just have to copy and paste Guis work and start from there again, but Im being lazy lately
Gustavo Eggert Boehs
Blog: http://www.gustavoeb.com.br/

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests