PDA

View Full Version : Randomly assign material IDs


Defonten
05-19-2008, 05:01 PM
Hi,

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.

scrimski
05-19-2008, 05:13 PM
http://www.scriptspot.com/3ds-max/epoly-matid-randomizer

Defonten
05-19-2008, 05:26 PM
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!

DigitalNeutrinos
05-19-2008, 06:09 PM
also very good stuff here neilblevins


http://www.neilblevins.com/ :cool:

DaveWortley
05-19-2008, 06:11 PM
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.

scrimski
05-19-2008, 06:21 PM
Sounds like a right thing but I can't download it from there - the link on scriptspot.com is dead..

Works fine here.

Defonten
05-19-2008, 07:53 PM
DaveWortley, thanks man!


Works fine here.

Have just downloaded it from another place. Big big thanks! Everything works just fine!

CGTalk Moderation
05-19-2008, 07:53 PM
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.