I know I wrtoe a script to do this in LightWave a while back, but cannot
locate it.
I am using 5.11.
Thanks,
--
Joe Laffey | Visual Effects for Film and Video
LAFFEY Computer Imaging | -------------------------------------
St. Louis, MO | Show Reel http://LAFFEY.tv/?e10937
USA | -------------------------------------
. | -*- Digital Fusion Plugins -*-
--------------------------------------------------------------------------
---
Unsubscribe? Mail Majo...@Softimage.COM with the following text in body:
unsubscribe xsi
Joe, I'm sure I've seen a better script around to do this but this
Python snippet will work on a selected object, convert the polygon
islands to individual objects and parent them under a null at the scene
root...is this what you want?
Julian
Joe Laffey wrote:
Joe, I'm sure I've seen a better script around to do this but this Python snippet will work on a selected object, convert the polygon islands to individual objects and parent them under a null at the scene root...is this what you want?
Julian
def GetIslands(obj):
islands = []
ofilter = Application.Filters("Polygon_Island")
polys = obj.ActivePrimitive.Geometry.Polygons
polyidx = [0]*polys.Count
curpoly = XSIFactory.CreateObject("XSI.Collection")
for x in range(len(polys)):
if polyidx[x]:
continue
curpoly.Add(polys[x])
curisland = ofilter.Subset(curpoly)
LogMessage(curisland)
curisland = Application.Dictionary.GetObject(curisland).SubComponent.ComponentCollection
curpoly.RemoveAll()
for y in range(len(curisland)):
polyidx[curisland(y).Index] = 1
LogMessage(polyidx)
islands.append(curisland)
Application.DeselectAll()
return islands
obj = Application.Selection(0)
islands = GetIslands(obj)
oNull = Application.ActiveSceneRoot.AddNull('Objects_Parent')
for x in islands:
Application.SelectObj(x)
oIsland = Application.ExtractFromComponents("ExtractPolygonsOp", "", "polymsh_extracted", "", "siPersistentOperation", "siKeepGenOpInputs", "")
oNull.AddChild(oIsland[0][0])
http://community.softimage.com/downloads.php?do=file&id=21
Joey Ponthieux
NCI Information Systems Inc.
NASA Langley Research Center
____________________________________________________________
Opinions stated here-in are strictly those of the author and
do not represent the opinions of NASA or any other party.
> Joe this is qualified for 5 and up. It should do what you want.
>
> http://community.softimage.com/downloads.php?do=file&id=21
Thanks, and thanks to Julian Johnson for his script as well. I was able to
find a solution last night. In NetView there is one script that tags
separate poly islands with different clusters, and then there is another
script that separates clusters into distinct objects. These two new tools
are even better, though (one step).
Thanks again,
--
Joe Laffey | Visual Effects for Film and Video
LAFFEY Computer Imaging | -------------------------------------
St. Louis, MO | Show Reel http://LAFFEY.tv/?e10939
Did you try the shatter script, (XSI shatter v4), from:
-----Original Message-----
From: owne...@Softimage.COM [mailto:owne...@Softimage.COM] On Behalf Of
Joe Laffey
Sent: Monday, June 30, 2008 10:25 PM
To: Softimage XSI Mailing List
Subject: Separate polygon groups into separate objects
> Hi Joe,
>
> Did you try the shatter script, (XSI shatter v4), from:
>
> http://www.motionblur.it/
Thanks, yes. It was decent, but in the end I had to make a custom cutter
object and boolean it in order to get the pieces into the shapes I wanted.
Then I needed to make each piece a separte object... But XSI began to
choke on so many dynamic objects (600), and many of the booleaned objects
caused "Could not generate convex hull" errors.
I took it into LightWave instead (because LW lets you have a single object
with multiple polygon islands and the dynamics engine treats it individual
pieces instantly), and the dynamics ran very fast. I was able to get the
results I wanted there.
Thanks,
--
Joe Laffey | Visual Effects for Film and Video
LAFFEY Computer Imaging | -------------------------------------
St. Louis, MO | Show Reel http://LAFFEY.tv/?e10946