Hi,
In a Maya/VRay plugin, I have a custom-built geometry created with a GeomStaticMesh (e.g., simple cube with 6 faces), and would like to assign different shaders per face.
I extracted the list of shaders in a MObjectArray (lambert,blinn,VRayMtl...) which are already available in the Maya's hypershade and assigned to other meshes. How can I assign randomly these shaders to different faces of the geometry ?
Geometry built like this:
I think I should use the "face_mtlIDs" parameter, but not sure how to convert my array of Object shaders to an Mtl array exploitable by VRay.
Thanks.
In a Maya/VRay plugin, I have a custom-built geometry created with a GeomStaticMesh (e.g., simple cube with 6 faces), and would like to assign different shaders per face.
I extracted the list of shaders in a MObjectArray (lambert,blinn,VRayMtl...) which are already available in the Maya's hypershade and assigned to other meshes. How can I assign randomly these shaders to different faces of the geometry ?
Geometry built like this:
Code:
baseGeomPlugin->setParameter(¶m_vertices); baseGeomPlugin->setParameter(¶m_faces); baseGeomPlugin->setParameter(¶m_normals); baseGeomPlugin->setParameter(¶m_faceNormals); baseGeomPlugin->setParameter(¶m_dynamic_geometry); baseGeomPlugin->setParameter(¶m_dynamicGeom);
Thanks.
Comment