Randomly assign material IDs

Become a member of the CGSociety

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

Thread Tools Display Modes
  05 May 2008
Question Randomly assign material IDs


I'm in need of scriptguy's help. It would be great if anyone would help me with the following - I need a script which would automatically assign material IDs (say from 1 to 50) to every single face on any high-polycount surface (say simple Plane with 100 000 faces). Also I want these IDs to be assigned and scattered randomly around the surface. Please help. Any assistance will be much appreciated.
  05 May 2008
Sounds like a right thing but I can't download it from there - the link on scriptspot.com is dead..

Any chance of downloading it from any other place? Thanks!
  05 May 2008
also very good stuff here neilblevins

  05 May 2008

 convertTo $ PolyMeshObject
 for i = 1 to $.polyOP.count do --can't remember what the facecount code is off my head, might be this...
 r = random 1 6 --6 being your number of material IDs u want
 $.face[i].matID = r --this line isn't right

Just written off the top of my head, so might not work.
Maxscript Made Easy...
  05 May 2008
Originally Posted by Defonten: Sounds like a right thing but I can't download it from there - the link on scriptspot.com is dead..

Works fine here.
  05 May 2008
DaveWortley, thanks man!

Quote: Works fine here.

Have just downloaded it from another place. Big big thanks! Everything works just fine!
  05 May 2008
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 11:25 PM.

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