Notifications
Clear all

[Closed] Randomly assign material IDs

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.

6 Replies

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!

1 Reply
(@scrimski)
Joined: 11 months ago

Posts: 0

Works fine here.

also very good stuff here neilblevins

http://www.neilblevins.com/


 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.

DaveWortley, thanks man!

Works fine here.

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