Unfortunately the 3D API hasn't changed in recent versions of Acrobat (and won't), so what I said back then still stands. For reasons I won't go into the material object has no constructor function, so you cannot create and assign materials with a script - only change the properties of existing ones. If you need a polygon to change color it must have its own material in the 3D model before you import it.
Not sure what you're using to create the model, but most CAD/CAM applications have their own scripting engines through which you can quickly assign a unique material ID to every object/element/face.