Island selection tool?

370 views
Skip to first unread message

Morten Bartholdy

unread,
Nov 1, 2011, 8:51:46 AM11/1/11
to soft...@listproc.autodesk.com

I am have a complex CAD model imported to Soft where all parts are merged in one obj file - other than that they look right. In order to split it in seperate parts I want to select polygon islands and extract them. Is there a script somewhere that does this or is there a polygon island selection mode in Soft I haven't found yet - like the UV island select tool in the texture editor?

 

Any hints or suggestions will be much appreciated :)

 

Morten Bartholdy

VFX Supervisor/3D Lead

www.gimmickvfx.com

 

Sajjad Amjad

unread,
Nov 1, 2011, 8:59:07 AM11/1/11
to Morten Bartholdy, soft...@listproc.autodesk.com
Hi,
There is a poly island selection mode. It appears in the filter list
if the selection mode is set to Polygon.

1. Select Polymesh object
2. Switch to polygon selection (y)
3. Hit the little round arrow button which brings up the filter list
4. Select Polygon Island

I think there are a couple of scripts floating around which
automatically extract all islands at the click of a button.

Hope this help,
Sajjad

--

-----
"Consistency is the last resort of the unimaginative" - O. Wilde

polyisland.png

Eric Thivierge

unread,
Nov 1, 2011, 8:59:58 AM11/1/11
to Morten Bartholdy, soft...@listproc.autodesk.com
Switch to polyong selection mode. Then in the selection filter look for "Polygon Island". Also check out GEAR. There is a tool in there that splits islands as well.

--------------------------------------------
Eric Thivierge
Currently: Digital Artist, Rigging at Animal Logic
http://www.ethivierge.com

Adam Seeley

unread,
Nov 1, 2011, 9:09:18 AM11/1/11
to soft...@listproc.autodesk.com
Hi Morten,

I put these commands into a button so I could have a Raycast Poly Island Selection

ActivateRaycastPolySelTool
SetSelFilter "Polygon_Island"

i.e. You don't need to surround a polygon to select the island, you just click on a polygon.This is handy for selecting multiple islands as well.

There's a couple of scripts on www.rray.de that will separate all islands as well, search for "island"

Adam.
 
"If it wasn't for the last minute, nothing would get done...!"

From: Morten Bartholdy <x...@colorshopvfx.dk>
To: soft...@listproc.autodesk.com
Sent: Tuesday, 1 November 2011, 12:51
Subject: Island selection tool?

Ponthieux, Joey

unread,
Nov 1, 2011, 9:26:33 AM11/1/11
to soft...@listproc.autodesk.com
Is this what you are looking for? I will separate the entire model by islands.

http://area.autodesk.com/downloads/scripts?word=JP_Separate.js&where=1&software=&script=


Joey Ponthieux
ATOL Experiment Specialist
LaRC Information Technology Enhanced Services (LITES)
Science Systems and Applications, Inc.
NASA Langley Research Center
15 Langley Blvd B1268 R1051
Hampton, VA, 23681
Phone: 757-864-6754
EMail: j.pon...@nasa.gov
____________________________________________________________
Opinions stated here-in are strictly those of the author and
do not represent the opinions of NASA or any other party.

Jens Lindgren

unread,
Nov 1, 2011, 9:50:07 AM11/1/11
to Morten Bartholdy, soft...@listproc.autodesk.com
If you use Softimage 2012 SAP you just double click a polygon to select the island.
Double click now also works on edgeloops in edge mode.
 
/Jens

On Tue, Nov 1, 2011 at 1:51 PM, Morten Bartholdy <x...@colorshopvfx.dk> wrote:

I am have a complex CAD model imported to Soft where all parts are merged in one obj file - other than that they look right. In order to split it in seperate parts I want to select polygon islands and extract them. Is there a script somewhere that does this or is there a polygon island selection mode in Soft I haven't found yet - like the UV island select tool in the texture editor?

 

Any hints or suggestions will be much appreciated :)

 

Morten Bartholdy

VFX Supervisor/3D Lead

www.gimmickvfx.com

 




--
Jens Lindgren
--------------------------
Lead Technical Director

Adam Seeley

unread,
Nov 1, 2011, 10:14:46 AM11/1/11
to soft...@listproc.autodesk.com
Hi,

Are 2012 SAP scenes ok to load into 2012 SP1?

e.g.  If you submit a 2012 SAP scene onto a 2012 SP1 farm, will it cause any problems?

Looks like it's mostly interace additions and a lot of the new functions are ICE based.

Thanks,

Adam.
 


From: Jens Lindgren <jens.lin...@gmail.com>
To: Morten Bartholdy <x...@colorshopvfx.dk>; soft...@listproc.autodesk.com
Sent: Tuesday, 1 November 2011, 13:50
Subject: Re: Island selection tool?

Grahame Fuller

unread,
Nov 1, 2011, 10:45:21 AM11/1/11
to Adam Seeley, soft...@listproc.autodesk.com
They should be as long as they don't use the new objects or operators, e.g., annotation objects, Bullet physics or the updated SplitEdge and SubdivideEdge.

gray

From: softimag...@listproc.autodesk.com [mailto:softimag...@listproc.autodesk.com] On Behalf Of Adam Seeley
Sent: Tuesday, November 01, 2011 10:15 AM
To: soft...@listproc.autodesk.com
Subject: Re: Island selection tool?

Hi,

Are 2012 SAP scenes ok to load into 2012 SP1?

e.g. If you submit a 2012 SAP scene onto a 2012 SP1 farm, will it cause any problems?

Looks like it's mostly interace additions and a lot of the new functions are ICE based.

Thanks,

Adam.


________________________________
From: Jens Lindgren <jens.lin...@gmail.com>
To: Morten Bartholdy <x...@colorshopvfx.dk>; soft...@listproc.autodesk.com
Sent: Tuesday, 1 November 2011, 13:50
Subject: Re: Island selection tool?
If you use Softimage 2012 SAP you just double click a polygon to select the island.
Double click now also works on edgeloops in edge mode.

/Jens


On Tue, Nov 1, 2011 at 1:51 PM, Morten Bartholdy <x...@colorshopvfx.dk<mailto:x...@colorshopvfx.dk>> wrote:
I am have a complex CAD model imported to Soft where all parts are merged in one obj file - other than that they look right. In order to split it in seperate parts I want to select polygon islands and extract them. Is there a script somewhere that does this or is there a polygon island selection mode in Soft I haven't found yet - like the UV island select tool in the texture editor?

Any hints or suggestions will be much appreciated :)

Morten Bartholdy
VFX Supervisor/3D Lead

www.gimmickvfx.com<http://www.gimmickvfx.com>


--
Jens Lindgren
--------------------------
Lead Technical Director

Magoo 3D Studios<http://www.magoo3dstudios.com/>


winmail.dat

Adam Sale

unread,
Nov 1, 2011, 12:47:38 PM11/1/11
to soft...@listproc.autodesk.com
I haven't noticed any probs so far going from SAP to SP1..
And as for the new double click poly select island.. Love it.. !!!

Previous I would use Joey's separate plugin.. Worked a treat.

Morten Bartholdy

unread,
Nov 2, 2011, 4:36:13 AM11/2/11
to Adam Seeley, soft...@listproc.autodesk.com

Thanks guys - very useful list this is :) and many ways to skin a cat. After all these years I still have plenty to learn about this package.

 

/Morten

Morten Bartholdy

unread,
Nov 2, 2011, 4:46:45 AM11/2/11
to soft...@listproc.autodesk.com

Excellent tool for my purpose Joey. I have a really complex piece of machinery coming into Soft as a one-piece obj and need to split it into separate components so we can work with it. Thanks a lot, it made my day!

 

/Morten

Ponthieux, Joey

unread,
Nov 2, 2011, 11:42:32 AM11/2/11
to Morten Bartholdy, soft...@listproc.autodesk.com
:) Terrific! Its why I wrote it ironically enough. I was so used to Maya's separate command for processing all the CAD geometry I would receive back in the day, when I started using XSI it was the first (really obvious) missing function I ran into. Glad to hear it is still useful!

Joey Ponthieux
ATOL Experiment Specialist
LaRC Information Technology Enhanced Services (LITES)
Science Systems and Applications, Inc.
NASA Langley Research Center
15 Langley Blvd B1268 R1051
Hampton, VA, 23681
Phone: 757-864-6754
EMail: j.pon...@nasa.gov
____________________________________________________________
Opinions stated here-in are strictly those of the author and
do not represent the opinions of NASA or any other party.

On 11/2/2011 4:46 AM, Morten Bartholdy wrote:

Excellent tool for my purpose Joey. I have a really complex piece of machinery coming into Soft as a one-piece obj and need to split it into separate components so we can work with it. Thanks a lot, it made my day!

 

/Morten

 


Den 1. november 2011 kl. 14:26 skrev "Ponthieux, Joey" <j.pon...@nasa.gov>:

Bradley Gabe

unread,
Nov 2, 2011, 12:38:46 PM11/2/11
to Morten Bartholdy, soft...@listproc.autodesk.com
I've posted a simple tool that might also help in this regard.
It basically walks through a poly mesh and creates a cluster for each polygon island in the scene.

It gives you a Progress Bar so you can see that it's working, even though the algorithm tends to accelerate over time as islands are discovered and polys get removed from the test array.


Appears in the Modfy>Poly. Mesh Menu
Self Installing Plugin (Python)

Alan Fregtman

unread,
Nov 2, 2011, 3:46:37 PM11/2/11
to soft...@listproc.autodesk.com
Hi Brad,

Cool tool!

With complete respect and not meaning to sound condescending in any way... you can speed it up even further by using the Polygon_Island selection filter and also don't forget you don't need to iterate the island to get the IDs one by one since there's .IndexArray (on all subcomponent collections) which returns a list all ready for you, courtesy of the SDK.

Oh, and the mere act of incrementing the progressbar for every single polygon regardless if it's processed or not will slow it down also to some extent, so setting the bar value as you jump past used polygons is more desirable speed-wise.

Knowing these few things, the version below is on average about 3 times faster than your current:

-----------------------------

def IslandsToClusters_Execute( polymesh ):

    if not polymesh or polymesh.type <> "polymsh":
        Application.LogMessage("IslandsToClusters(arg0) -- Requires input polygon mesh object", 2)
        return
    
    # Progress Bar
    PB = XSIUIToolkit.Progressbar
    PB.Maximum = polymesh.ActivePrimitive.Geometry.Polygons.Count
    PB.Visible = 1
    PB.Caption = 'Testing polygons and making clusters...'

    selFilter = xsi.Filters("Polygon_Island")
    thisPoly = XSIFactory.CreateActiveXObject("XSI.Collection")

    usedArr = []
    for poly in polymesh.ActivePrimitive.Geometry.Polygons:
        if poly.Index not in usedArr:
            PB.StatusText = str(poly.Index)

            thisPoly.Add(poly)
            island = selFilter.Subset(thisPoly)
            island = xsi.Dictionary.GetObject(island).SubComponent.ComponentCollection.IndexArray
            polymesh.ActivePrimitive.Geometry.AddCluster('poly', 'poly_0', island)
            usedArr.extend(island)
            thisPoly.RemoveAll()
            
            PB.Value = poly.Index
    PB.Visible = 0

    return True
-----------------------------

Just wanted to share my $0.02. ;)
Cheers,

  -- Alan



ps: For anyone wondering how I pasted highlighted code without Gmail mangling it, I used http://tohtml.com/python/

Jens Lindgren

unread,
Nov 2, 2011, 4:15:29 PM11/2/11
to soft...@listproc.autodesk.com
I love this list :D

Bradley Gabe

unread,
Nov 2, 2011, 5:01:16 PM11/2/11
to soft...@listproc.autodesk.com
Thanks Alan! Any advice for speed enhancements are always welcome.

I was not aware of the existence of the Polygon_Island filter or grabbing IndexArrays off a Component Collection, both very useful tidbits. I *was* well aware of the Progress Bar performance hit. :-)

I've made the recommended changes (and added a credit for Alan) to the tool, so this is now a new link:

Morten Bartholdy

unread,
Nov 3, 2011, 5:47:17 AM11/3/11
to soft...@listproc.autodesk.com

You guys are just awesome - starting the day with a happy face :)

 

 

Best Regards

Reply all
Reply to author
Forward
0 new messages