Automatically disconnecting faces

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2007   #1
Automatically disconnecting faces

Okay here is what Iím trying to do:

My goal is to make an exploding disco ball. I can use the Shatter plugin on a sphere, but it makes the sections too long. I need to somehow make 100 little cubes out of a sphere without manually modeling each one. If I cant do that, is there a plugin that will automatically disconnect every face of a model into a new object?
 
Old 04 April 2007   #2
This script will extract copies of all the polygons in the selected object and move their centers to the center of the polygon's vertices. It's slow and poorly written with no error checking, but still faster than doing it by hand.

I haven't tried this on anything over 600 polygons, so your system may lock up on anything larger than that.

Be sure to save your work before running this!


 
Logging False

set oObj = Selection(0)

set oPoly = oObj.activeprimitive.geometry.polygons

polycnt= oPoly.count

for i = 1 to polycnt

mynum = polycnt -i

logmessage mynum

SelectGeometryComponents oObj &".poly["&mynum&"]"

ExtractFromComponents "ExtractPolygonsOp" , , oObj&"poly_1", ,SiImmediateOperation, siKeepGenOpInputs

 

MoveCtr2Vertices selection(0)

next

 

Logging True 

 

Function Logging(value)

SetValue "preferences.scripting.cmdlog", value

SetValue "preferences.scripting.msglogrealtime", value

SetValue "preferences.scripting.msglogverbose", value

SetValue "preferences.scripting.msglog", value

SetValue "preferences.scripting.cmdlogfile", value

End Function

 
Old 04 April 2007   #3
somehow i cant get it to work.. does this script work with xsi 6?
 
Old 04 April 2007   #4
Post the error that is being shown in the script editor. The script is VBScript, you'll want to right click in the script editor and make sure it is set to that and not JScript (JavaScript), or the syntax will be wrong.
__________________
Marooned - A Space Opera in the Wrong Key!
http://www.maroonedcomic.com
 
Old 04 April 2007   #5
Originally Posted by timur04: somehow i cant get it to work.. does this script work with xsi 6?


Works fine for me in 6.01.

What you need to do is:
1) make sure the script editor is set to vbscript. (in the script editor select File/preferences/scripting tab/script language)
2) Copy and paste the script into the script editor
3) select the object
4) run the script
5) wait for a bit (took about 30 seconds on a 1000 poly mesh)

I have logging disabled while it runs to speed things up, because it's extremely slow with logging enabled turned on. It also leaves the original object alone and only makes copies of the original object's polygons, so you will need to hide or delete it.

If this still doesn't work, change the first line from Logging False to Logging True and let me know what error messages you are getting.
 
Old 04 April 2007   #6
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:36 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.