What's New in API in Maya 2017 Update 3

Rendering

General

  • Added enumerators to the MLightParameterInformation class to support light information export for point lights and point light shadows. The updates include:
    • Added the kDepthRange enumerator to the StockParameterSemantic enum members.

      kDepthRange is used for point light shadows to indicate the far and near clipping depth of a point light camera. See the viewRenderOverridePointLightShadow.cpp plug-in.

    • Added the kTextureCube enumerator to the parameterType enum members.

    The dx11Shader, glslShader, and viewRenderOverridePointLightShadows devkit example plug-ins have been updated to include these enumerators.

  • Added the k3dPointLightShadowerShader enumerator to the MStockShader enum members to get a stock shader instance which can be used when rendering point light shadow maps. Use the following methods:

    MShaderInstance* MShaderManager::getStockShader( MStockShader name, MShaderInstance::DrawCallback preCb, MShaderInstance::DrawCallback postCb)const;

    The hwPhongShader devkit example plug-in has been updated to support this enumerator.

Lighting

  • The Maya API now supports the implementation of point lights and point light shadows. A new viewRenderOverridePointLightShadows devkit example plug-in demonstrates how to override the viewport 2.0 rendering for the purposes of showing how point light shadow maps(cube map), which is requested on demand, and then used for selective lighting and shadowing in a scene render. The example creates a single point light, but is not intended to be a fully supported render override example. To create multiple point lights, modify this line when setting up the parameters:

    status = shaderInstance->setParameter("mayaPointLight_position", &( lightPosition[0] ));

    The dx11Shader, glslShader, and hwPhongShader devkit example plug-ins have been updated to include the support for point lights.

Modeling

MFnMesh enhancements:

  • Added the MFnMesh::setEdgeSmoothings() function, which improves the performance of processing soft and hard edges. Use this method to specify whether an edge is hard or smooth (soft).
  • Added the MFnMesh::isPolygonUVReversed() method, which determines whether the winding order of the UV texture coordinates for a specified polygon are reversed (clockwise). The method returns true if the texture coordinates are reversed and false if they are not reversed (counter clockwise).
  • Added the MFnMesh::getClosestUVs() function, which returns the closest UV on a surface based on a given set and coordinate.
  • Added the MFnMesh::getPointsAtUV() function, which returns the positions of the points at the given UV value on the mesh.

    This function provides better performance for getting points at UV coordinates than MItMeshPolygon::pointAtUV().

MItMeshPolygon enhancements:

  • Add the MItMeshPolygon::isUVReversed() method, which checks the UV winding order for a face of the polygon being iterated. The method returns true if the UVs on the face are reversed (clockwise) and false if they are not reversed (counter clockwise).

Performance

  • A new footPrintNode_SubSceneOverride devkit example demonstrates how to implement sub-scene overrides for locator objects.