www.si-community.com
http://www.si-community.com/community/

Challenge: Make the fastest island selection compound
http://www.si-community.com/community/viewtopic.php?f=45&t=2115
Page 1 of 3

Author:  Chris_TC [ 12 Feb 2012, 17:11 ]
Post subject:  Challenge: Make the fastest island selection compound

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 172 times
CG Find Polygon Island.xsicompound [64.88 KiB]
Downloaded 179 times

Author:  iamVFX [ 12 Feb 2012, 18:08 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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

Author:  Chris_TC [ 12 Feb 2012, 19:39 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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

Yes.

Author:  Chris_TC [ 12 Feb 2012, 20:25 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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.

Author:  Mr.Core [ 13 Feb 2012, 02:08 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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

And here is my ( 1 s ):
http://xmages.net/storage/10/1/0/6/2/upload/1ad9f224.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 173 times

Author:  Chris_TC [ 13 Feb 2012, 16:20 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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 163 times
testgeo2.rar [194.1 KiB]
Downloaded 153 times

Author:  Mr.Core [ 13 Feb 2012, 16:58 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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 ?

Author:  Chris_TC [ 13 Feb 2012, 18:49 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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.

Author:  Chris_TC [ 13 Feb 2012, 18:58 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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

Author:  Mr.Core [ 13 Feb 2012, 19:27 ]
Post subject:  Re: Challenge: Make the fastest island selection compound

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 178 times

Page 1 of 3 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/