Keeping control over your materials
It is very convenient that the materials defined inside a 3D modeling tool can be used in Papervision3D. On the other hand, there are situations where you want to have control over materials. To name a few:
When you want to use another material type such as a movie clip or streaming video
When you want to change a material property such as
interactive, precise, andsmoothWhen you want to apply a shader
The moment you call the load() method using any of the 3D model parsers, you can pass a material list, specifying the materials you want to use. This works in a similar way to specifying a material list at instantiation of a cube and looks as follows:
var materials:MaterialsList = new MaterialsList();
load() methodcallingmaterials.addMaterial(new ColorMaterial(0x0000FF), "materialDefinition");
var model:DAE = new DAE();
model.load("model.dae",materals);
The materialDefinition string in the materials list refers to the unique ID of a material that was automatically...