What's New
Hardware selection features
If you are writing your own custom shader for use with the dx11Shader or glslShader plug-in in Viewport 2.0, the following semantics have been added that allow your DX11 or GLSL shader to perform hardware selection; for example, semantics that allow you to specify whether selection is to be done at the object level or vertex level. Annotations have also been added that allow you to draw non-material items such as the wireframe and selected edges/vertices components.
Hardware selection is enabled when you run Maya in OpenGL Core Profile mode. Alternatively, you can also set the environment variable MAYA_USE_HARDWARE_SELECTION = 1.
The Maya Developer Kit has been updated to include new versions of the dx11Shader and glslShader plug-in examples. These examples have been updated to illustrate hardware selection. In addition, the glslShader example also supports shadow pass, transparency and advanced transparency passes. Varying inputs are selectable (choice of color or UV sets), and performance is improved.
The Developer Kit is available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index.
New selection semantics
Name Type Description
HWS_PrimitiveBase
int
Integer used to generate the color of the object, or the first component, or the first geometry instance. (GPU Instancing must be enabled in the Viewport 2.0 options window.)
Corresponds to: MUniformParameter::kSemanticHWSPrimitiveBase.
HWS_PrimitiveCountPerInstance
int Specifies the amount that HWS_PrimitiveBase needs to be incremented for each geometry instance.
Corresponds to: MUniformParameter::kSemanticHWSPrimitiveCountPerInstance.
HWS_ObjectLevel
bool Specifies whether selection is to be done at the object level.
Corresponds to: MUniformParameter::kSemanticHWSObjectLevel.
HWS_FaceLevel
bool Specifies whether selection is to be done at the face level.
Corresponds to: MUniformParameter::kSemanticHWSFaceLevel.
HWS_EdgeLevel
bool Specifies whether selection is to be done at the edge level.
Corresponds to: MUniformParameter::kSemanticHWSEdgeLevel.
HWS_VertexLevel
bool Specifies whether selection is to be done at the vertex level.
Corresponds to: MUniformParameter::kSemanticHWSVertexLevel.
HWS_FrontCCW
bool Specifies whether a counter clockwise triangle is front facing. Useful when generating fat points or lines.
Corresponds to: MUniformParameter::kSemanticHWSFrontCCW.
HWS_InstancedDraw
bool Specifies whether geometry instances are being drawn.
Corresponds to: MUniformParameter::kSemanticHWSInstancedDraw.
New supported technique annotations
Name Type Description
OverridesNonMaterialItems
string (bool)
Specifies if this technique should be used to render non-material items such as the wireframe and the selected edges/vertices components.
This is particularly useful for shading effects that compute displacement for which the object geometry will not match the rendered material, making selection difficult.
false : does not override non-material items (default)
true : used to render non-material items, so that the shader can display UI primitives
See DrawContext in New supported pass annotations below.
Corresponds to: MPxShaderOverride::overridesNonMaterialItems().
New supported pass annotations
New nonMaterialItemsPass and selectionPass contexts are now available for the DrawContext annotation, and a new PrimitiveFilter annotation has been added.
Name Type Description
DrawContext string
Specifies that this pass should be enabled only for this draw context.
Multiple passes can have the same DrawContext value.
This can be any string value that matches a pass semantic in MHWRender::MPassContext. For example, the following contexts are supported: colorPass, shadowPass, depthPass, and normalDepthPass.
An empty value (or if DrawContext is not set) is equivalent to setting this annotation to colorPass.
You can now set this annotation to nonMaterialItemsPass for passes used to render non-material items. Set to selectionPass for passes used to select non-material items See OverridesNonMaterialItems in New supported technique annotations above.
PrimitiveFilter
string
Specifies that this pass can handle the rendering of the following components:
line as fat line (line size > 1)
point as fat point (point size > 1)
Can be used to handle edge or vertex components during the rendering pass or the selection pass.
Vertex components are rendered as quads instead of single pixels, and edge components, mostly during pre-selection highlighting, are rendered larger, for better visibility.
This is usually achieved by using a geometry shader to convert lines and points to quads.
fatLine : this pass can render lines as quads
fatPoint : this pass can render points as quads
If there is no pass defined that handles this special case, the default pass that handles the draw context nonMaterialItemsPass or selectionPass is used.
Varying attributes for vertex streams
Additional functionality has been added for the GLSL Shader, for use with the COLOR0 and TEXCOORD0-7 semantics.
Semantic Type Description
COLOR0
float3/4 (dx11Shader)
vec3/4 (glslShader)
Instructs Maya to bind this attribute to the color set vertex buffer.
NOTE:
For glslShader only:
Currently, there is only 1 stream available.
While OGSFX is limited to only one color stream defined by the COLOR0 semantic, it is still possible to define more than one color stream by using the TEXCOORDx semantic.
An attribute using the TEXCOORDx semantic that is of a vec3 or vec4 type can be used to convey a color stream to the shader, and an attribute using the TEXCOORDx semantic that is of vec2 type used to convey a UV coordinate stream.
TEXCOORD0-7
float3/4 (dx11Shader)
vec 2 or vec3/4 (glslShader)
Instructs Maya to bind this attribute to the UV set vertex buffer.
Currently, there are 8 streams available.
NOTE:
For glslShader only:
While OGSFX is limited to only one color stream defined by the COLOR0 semantic, it is still possible to define more than one color stream by using the TEXCOORDx semantic.
An attribute using the TEXCOORDx semantic that is of a vec3 or vec4 type can be used to convey a color stream to the shader, and an attribute using the TEXCOORDx semantic that is of vec2 type can be used to convey a UV coordinate stream.
Shader example
The WaterSimulation example has been updated to use the newly added semantics and annotations to demonstrate how to write a shader that performs hardware selection on displaced geometry, and to draw vertex, edge, and face components at their correct displaced positions. For the GLSL version of the shader example, see WaterSimulation.ogsfx in the presets\GLSL\examples folder of the Maya installation directory. For the DX11 version, see WaterSimulation.fx in the presets\HLSL11\examples folder.
The following describes the new additions to the GLSL version of the example.
To select and draw displaced components
The technique NormalView_Selection demonstrates how to perform hardware selection on displaced components, and to render non-material items (such as wireframe and selected edges/vertices) at their displaced positions.
Hardware selection allows you to select tessellated geometry. In addition, wireframe and components draw with the same outline as the shaded material in the viewport. This technique has 7 different passes.
Before defining the techniques, the #include directive is used to load four shaders as follows. The #include directive allows you to share the same GLSL fragments between different applications, and maintain separate shader code files instead of having to combine them all into one .ogsfx file.
GS_FatLine.ogsfh: This is a geometry shader that converts a line to a rectangle, and therefore allow render lines to be drawn bigger (for example, red pre-selection highlighting edges are drawn larger than dormant edges).
GS_FatPoint.ogsfh: This is a geometry shader that converts a point to a quad, and therefore allow render points to be drawn bigger (for example, vertices are rendered as a square instead of a single pixel).
PS_SolidColor.ogsfh: This is a pixel shader that draws with a solid color.
PS_HWSelection.ogsfh: This is a pixel shader that renders the components during hardware selection, where each component is rendered in a different solid color that is calculated using the object or component ID.
The first 4 passes are used for drawing in the viewport; therefore the PS_SolidColor pixel shader is used.
Pass pNormal: renders the textured material
Pass pNonMaterialItems: renders components such as wireframe and vertices. Components are rendered with a solid color, such as blue for edges of dormant objects and light green for edges of active objects.
Pass pNonMaterialItemsFatLine: renders lines using the GS_FatLine geometry shader.
Pass pNonMaterialItemsFatPoint: renders points using the GS_Point geometry shader.
The last 3 are used to render components during hardware selection, and therefore the PS_HWSelection pixel shader is used. The PS_SolidColor pixel shader is not used, as these passes are not used to draw in the viewport.
A primitive id (such as vertex id) is used to produce a color to identify the object that is picked. An offscreen buffer is used to store these computed colors so that Maya knows what is picked by the mouse.
Pass pNonMaterialItemsSelection: used for selection of components such as wireframe and vertices.
Pass pNonMaterialItemsSelectionFatLine: used for selection of fat lines
Pass pNonMaterialItemsSelectionFatPoint: used for selection of fat points.
Technique and pass annotations
The overridesNonMaterialItems technique annotation specifies that this technique can be used to render non-material items such as the wireframe and components like edges or vertices.
string overridesNonMaterialItems = "true";
Pass annotations are used to tell the plug-in which pass to use for which render items.
For example:
pass pNonMaterialItemsFatLine
<
// This pass will be used to render non material items as fat lines
string drawContext = "nonMaterialItemsPass";
string primitiveFilter = "fatLine";
>
Therefore, if a render item is categorized as a non-material item, and the primitive type is categorized as fat line, then the pNonMaterialItemsFatLine pass is used.
New C++ API methods added
MUIDrawManager::beginDrawInXray() and MUIDrawManager::endDrawInXray() methods have been added so that primitives drawn between calls to these two methods will display on top of other geometries in the scene. These methods can be used to draw objects such as locators.
The squaresNode_noDepthTest example in the Maya Developer Kit has been updated to illustrate the use of these methods. This example draws meshes without performing depth testing. MUIDrawManager is used to draw two squares and some text, and these two squares and text display on the top of other geometries in the scene.
The Developer Kit is available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index.
The method descriptions are as follows:
void MHWRender::MUIDrawManager::beginDrawInXray ( )
void MHWRender::MUIDrawManager::endDrawInXray ( )
The drawables between calls to beginDrawInXray() and endDrawInXray() will display on top of other geometries in the scene, as the depth test is disabled for these drawables.
These methods can be used to draw objects such as locators.
Limitations:
Only drawables that meet the following conditions will be affected by beginDrawInXray() and endDrawInXray().
Created by the method MUIDrawManager::mesh()
The first input parameter (primitive type) for MUIDrawManager::mesh() is one of kTriangles, kLines and kPoints.
Any other drawables between calls to beginDrawInXray() and endDrawInXray() will display as normal.
painter.beginDrawInXray();
painter.mesh(MHWRender::MUIDrawManager::kTriangles, ...); // assume this is geometry A
painter.mesh(MHWRender::MUIDrawManager::kLines, ...); // assume this is geometry B
painter.mesh(MHWRender::MUIDrawManager::kPoints, ...); // assume this is geometry C
painter.endDrawInXray();
painter.text(...); // assume this is text D
If several meshes are drawn between these two APIs, then their draw order is the reverse of the mesh() function call order. For example, in the sample code above: C will be drawn on top of B; B on top of A. If text calls are made after these two APIs, the text will be drawn on top. In sample code above, text D will be drawn on top of C.
Return to Top
What's Fixed
The following list contains bug numbers and corresponding descriptions for issues fixed in this release.
Bug Number Description
Animation
MAYA-16724 Playback is not as fast as expected when all rigs are hidden
MAYA-45974 Performance : Investigate why transform nodes have a lot of attributes evaluated
MAYA-48500 Performance : Manipulation with Evaluation Manager in Legacy Default Viewport after switching from Viewport 2.0 doesn't always work
MAYA-50016 Fixed the filterCurve slowdown when motion trails are used
MAYA-51067 Trax Editor Offset poses key incorrectly
MAYA-51112 Undo of key all controls will hang Maya for a long time when autokey is on
MAYA-51181 Sequencer : Message displayed in viewport after Ubercam creation
MAYA-51394 MotionTrail : Maya fails to create motion trail on a simple sphere
MAYA-52178 Performance : Hide on playback does not perform as well as turning off visibility
MAYA-52247 Sequencer : Memory spikes with large number of shots
MAYA-52252 Performance : softMod GPU override doesn't support per vertex weights
MAYA-52313 Performance : Zooming causes mesh to disappear
MAYA-52414 Performance : Shadows disappear when GPU override is enabled
MAYA-52430 Performance : Shadows don't properly update with Evaluation Manager and Viewport 2.0
MAYA-52544 Performance : Wrap deformer evaluation triggers a wait cursor
MAYA-52910 Geometry cache : Crash when switching topology on the cached mesh
MAYA-53076 Fixed performance of cmds.deformer
MAYA-53381 Fixed an error loading Python scripted plug-in (Unknown C global variable)
MAYA-53941 MFnGeometryFilter::indexForOutputConnection produces error for sparse outputs
Bifröst
MAYA-34678 Mesh clip bounding box inexact
MAYA-35206 Bifröst: Attributes left behind when object is removed from simulation
MAYA-35458 Attribute Editor tabs for bifrostContainer and bifrostShape should be displayed upon selection (showEditor.mel : More than one object matches name)
MAYA-35974 When creating a liquid without a mesh selected, an error occurs (but the liquid is created)
MAYA-36645 Bifröst: Auto-rename does not check if renamed name exists
MAYA-42236 Bifröst emitter density values of 0 hang/crash Maya
MAYA-44322 Turning on meshing on an Aero returns vorticity warning
MAYA-45283 Clip Bounding Box Min and Max are still exposed as channels in the Channel Box
MAYA-45947 Mesh node that holds current or prior Bifröst attributes will break redo if Attribute Editor is open
MAYA-48543 Bifröst: Too much dissipation in Aero voxels compared to particles
MAYA-48544 Bifröst: Performance problems when emitter is outside adaptive mesh
MAYA-49577 Unable to render both liquid and aero together
MAYA-49946 Bifröst Aero: Adaptive mesh deletes all particles outside mesh
MAYA-51397 Bifröst: Accelerators consume too much RAM
MAYA-51440 Bifröst Aero: Adaptive mesh is not managed by state server, consumes RAM
MAYA-51469 Gravity is applied twice when spatial is Off
MAYA-51509 Bifröst cached scenes that are saved at a non-start frame should read cache on load
MAYA-51526 Unable to emit into thin geometries with spatial on
MAYA-51614 Foam moves too slowly when time steps are used
MAYA-51634 Particle properties not properly transferred to the mesh with spatial on
MAYA-51747 Turning off BGcompute after user caching multi-liquid Bifröst simulations with the same user cache name crashes Maya during playback
MAYA-51863 Imported Bifröst Visor example scenes have zeroed out foam (foam 0.0) attributes
MAYA-52068 Adaptive Aero memory leak
MAYA-52110 Opening Bifröst scene twice on windows with GTX card prints a lot of hardware shader code
MAYA-52153 Viewing Aero voxels from orthographic view at far distances hangs Maya
MAYA-52167 Diffusion in emitted aero quantities presents problems for adaptive Aero
MAYA-52431 Aero blockiness
Color Management
MAYA-43869 Adding an invalid transform while in regional mode (for example, Simplified Chinese) fails to generate a popup error and adds the invalid transform to list
MAYA-49394 Shaderball swatch without file texture doesn't update with Color Management preference settings
MAYA-50854 The Color Management setting does not update after loading a policy that enables Color Management
MAYA-51125 Color Management custom view transform is not loaded after adding a new transform from Apply Output Transform to Playblast in the Preferences window
FBX
MAYA-53738 relativeNamespace flag of file command doesn't work on FBX files when Dialog style preference set to OS native
General
MAYA-44677 GameExporter FBXReview feature on Mac OS X - folder not found error occurs if FBXReview has never been launched
MAYA-45050 Mac OS X: Menu labels in Bullet drop down menu are missing their labels
MAYA-47723 Crash when importing FBX
MAYA-49175 Fixed an issue where removing a connectAttr edit would delete other connectAttr edits involving the same plug
MAYA-51363 Fluid shelf icons not executing commands as expected
MAYA-51551 Fixed renaming of multi-attribute
MAYA-51628 Fixed an FBX import/export problem when blendShape items have the same short name
MAYA-51689 Fixed the MFnMesh::setFaceVertexColors() API
MAYA-52207 getFilesToArchive() never gets called for MPxLocatorNode
MAYA-52449 nParticles > Paint Soft Body Weights Tool menu now appears correctly
MAYA-52943 Alembic reference doesn't work with dir mapping correctly (command dirmap)
MAYA-53385 HIK rename character tool only changes the name of the character in Outliner once
MAYA-53631 Can't right-mouse paint goal weights on nSoftbody
MAYA-54273 Game Exporter does not find FBX Review on Mac OS X
MAYA-54358 PySide Phonon fails to import on Mac OS X
mental ray
MAYA-49286 Maya crashes when performing several mental ray renders consecutively in scenes with instances
MAYA-50396 mila_material specular highlight in IPR is too large and creates a cloudy halo effect
MAYA-50932 Runtime error returned with mila_material and render layer material override workflow upon invoking Attribute Editor
MAYA-51275 Improved mental ray render times with procedural shaders/textures (ocean, fractal, and so forth)
MAYA-51970 mental ray always uses/creates optimized texture for UV-tiled textures
MAYA-52168 mental ray colorprofile shader parameter always enabled for UV-tile scenes
MAYA-52657 mental ray, if selected as the renderer in the Hypershade Material View, will crash the given scene if file nodes use UV-tiling
MAYA-52696 Hypershade Material Viewer errors with mental ray mila_material
MAYA-52863 mental ray batch render crashes or hangs after a few frames with large mental ray mi proxy, abc and UV tiles in scene
MAYA-53478 Adding mental ray bake set throws error
MAYA-53719 mental ray preference 'Use optimized textures (auto-conversion)' does not work
Modeling
MAYA-32188 Bevel produces bad results on a simple geometry
MAYA-40032 Bevel creates skewed geometry in example scene
MAYA-43256 MAC OS X: Multi-cut tool cut line is drawn on mouse up or when dragging
MAYA-43491 In Viewer Editor text and values are in bold on Mac OS X and on Windows when using the Legacy Default Viewport
MAYA-44278 Crash beveling edges after merging vertices to center
MAYA-45889 Sculpting may stop working if mesh has been rotated
MAYA-47328 Mac OS X: Stamp thumbnail sometimes does not display in the Sculpt Tool settings window
MAYA-48630 Editing blend shape targets using the Scale tool and symmetry causes problems
MAYA-48987 Cannot sculpt mesh after delete history and freeze transforms
MAYA-50720 OpenSubdiv Adaptive displacement is always on even when disabled
MAYA-50806 Edge selection is inaccurate after bevel
MAYA-50824 Freeze brush not working properly with pen pressure and surface falloff
MAYA-50970 Pinch brush not creating symmetrical strokes in object mirror mode
MAYA-50995 Delete part edges of smoothed mesh crashes Maya
MAYA-51026 Screen pixel performance drop in Volume falloff
MAYA-51029 While in UV Editor, soft select doesn't work on any other components than UVs
MAYA-51184 Grab brush's Grab silhouette doesn't work properly with Volume or Surface falloff
MAYA-51530 Bevel Fraction not working as expected
MAYA-52156 Grab UV and Pin UV tool are missing from UV Editor right-mouse menu
MAYA-52441 Bevel problem when increasing segment count
MAYA-52867 Pivot reset when changing the view
MAYA-53447 Bevel is not connecting an edge
MAYA-53479 Component axis orientation sometimes incorrect on rotated or non-uniformly scaled objects
MAYA-53602 Disappearing geometry with Bevel tool
MAYA-53610 Performing Poly Smooth while in Sculpting Tool corrupts geometry
MAYA-53926 Increasing segments moves UVs to -1 -1
MAYA-54476 Beveling this geometry creates non-planar faces
Rendering
MAYA-47111 Maya Software renderer IPR crashes the application
MAYA-47703 Soloing/unsoloing complex Layered Shader locks up Maya even though nothing changes
MAYA-50337 Removing default windows inside Hypershade and then re-adding them will not be restored upon File > New
MAYA-50529 Docking Hypershade windows, then closing Maya with Hypershade still open, will not restore the docked windows after restart
MAYA-50549 Changing Node Editor tabs or re-opening the Hypershade causes the Material Viewer to render the selected node if an upstream node is selected
MAYA-51087 Hardware Material Viewer is always active and causes unnecessary Viewport 2.0 processing (slow down)
MAYA-51327 Scene is dirtied when selecting File > New after opening the Render Settings
MAYA-51829 Texture-centric UV linking does not work with Hypershade open
MAYA-52321 Fatal error trying to snap with Bifröst shape visible
MAYA-52418 Frames per second drops unexpectedly when setting Hypershade swatch button to OFF
MAYA-53409 Viewport and Hypershade Material Viewer get out of sync when deleting a node and soloing in Hypershade
MAYA-54004 Maya will crash when rendering scenes with textures over 8k using the software renderer
MAYA-54403 Maya crashes when IPR renders checker texture using the software renderer
MAYA-54709 Latest mental ray satellite doesn't have the right mental ray version
User Interface
MAYA-54522 Node Editor bookmark stops shape node from being removed when you delete history
MAYA-55057 Unconnected DG nodes get deleted on save
MAYA-53166 hotkey command doesn't work anymore
Viewport
MAYA-17905 Viewport 2.0: rawfootPrintNode node shaded display is incorrect
MAYA-31779 Mac OS X with wacom pen : viewport frames per second much slower during manipulation with help line visible
MAYA-37518 Viewport 2.0: Assign Shader to Each Projection does not work as expected
MAYA-42089 User can't select the XGen guide in the viewport in OpenGL Core Profile mode
MAYA-50042 Image sequence fails to load with image names such as image<f>.<ext>
MAYA-50565 Joints and locators are not drawn when isolated in Viewport 2.0
MAYA-50891 OpenSubdiv smoothed geometry in Viewport 2.0 in Core Profile mode is covered in cross-hatched artifacts
MAYA-50931 Cannot point snap to geometry in OpenGL Core Profile mode (middle mouse move snap to curve fails)
MAYA-51013 Errors when switching renderer in Render Settings window if rendering shelf is open
MAYA-51094 Crash adjusting subdivisions on extruded faces that are isolated
MAYA-51215 Viewport 2.0 locator depth drawing is inconsistent with Legacy Default Viewport
MAYA-51437 Incorrect intersection point computation in software selection mode when all points are in selection region
MAYA-51638 Maya crashes in Viewport 2.0 when duplicating instancer of fireworks
MAYA-51818 Pivot edit mode curve and point snap problems in OpenGL Core Profile mode
MAYA-51831 playblastTest crashes when run in automated test mode
MAYA-51862 Selected spring components are not shown in Viewport 2.0
MAYA-52549 MotionTrail : Viewport 2.0 sorting issue when show frame markers are enabled
MAYA-52746 Major memory leak in Viewport 2.0 when cycling select/unselect
MAYA-52966 Image plane losing alignment in Viewport 2.0
MAYA-53350 Missing transparency in Playblast
MAYA-53388 Image sequences as textures do not load
MAYA-53661 Image sequence cache on image plane doesn't work well for the specified scene
MAYA-53869 Framing locator with no bounding box confuses perspective layout
MAYA-54045 Viewport 2.0 MRenderOverride heads-up display does not appear
XGen
MAYA-51245 Performance problem when iterating objects in XgmUtil::pushOver()
MAYA-51976 Select Material Attributes context menu fails for items with XGen groomable splines attached
MAYA-52246 XGen Export Selected as Archives triggers firewall message on Mac OS X
MAYA-52496 The _lo and _med objects are exported twice using batch export archive with manual Level of Detail
Return to Top
Limitations
The following section describes limitations and workarounds (where applicable) about this release.
Bug Number Description
API and Scripting
MAYA-54817
Maya Developer Kit does not contain file OpenMayaMac.h on Mac OS X.
OpenMayaMac.h has been removed as it is no longer used. Customer's legacy projects must be updated to remove the use of the header file.
Bifröst
MAYA-49898
Adaptivity is not turned off when step is set to zero
To turn adaptivity off, you must set min and max steps both to 1.
MAYA-38451
Large user cache files not readable
Bifröst cache files that exceed 4.2 GB may not play back.
mental ray
When the mental ray interactive preview render view (IPR) is active, the mental ray Material Viewer in the Hypershade will not update on changes or selections.
Modeling
MAYA-45402
OpenSubdiv: Painting texture maps does not display on polygon in smooth mode.
Workaround: Use Maya Catmull-Clark instead of OpenSubdiv Catmull-Clark subdivision method.
Scene Assembly
MAYA-45340
Incorrect order of scene assembly edits may cause animated components to not respect the timeline animation when a key framed scene representation is unloaded and then reloaded.
If the animated component does not reflect the animation timeline after reloading the scene representation, workaround the issue by scrubbing the timeline.
Viewport
MAYA-53164
Scenes with many procedural textures in one network may cause the Hypershade to hang when the Material Viewer is open in Viewport 2.0 in OpenGL mode only (cg library failure).
If the Hypershade hangs or crashes while using OpenGL mode in Viewport 2.0, this may be due to a legacy Cg library issue. A possible workaround is to use the more modern OpenGL Core Profile or DirectX 11 mode.
XGen
MAYA-39333 / MAYA-39354
XGen control guides: Soft-select falloff color is not yet supported.
Hardware selection features
If you are writing your own custom shader for use with the dx11Shader or glslShader plug-in in Viewport 2.0, the following semantics have been added that allow your DX11 or GLSL shader to perform hardware selection; for example, semantics that allow you to specify whether selection is to be done at the object level or vertex level. Annotations have also been added that allow you to draw non-material items such as the wireframe and selected edges/vertices components.
Hardware selection is enabled when you run Maya in OpenGL Core Profile mode. Alternatively, you can also set the environment variable MAYA_USE_HARDWARE_SELECTION = 1.
The Maya Developer Kit has been updated to include new versions of the dx11Shader and glslShader plug-in examples. These examples have been updated to illustrate hardware selection. In addition, the glslShader example also supports shadow pass, transparency and advanced transparency passes. Varying inputs are selectable (choice of color or UV sets), and performance is improved.
The Developer Kit is available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index.
New selection semantics
Name Type Description
HWS_PrimitiveBase
int
Integer used to generate the color of the object, or the first component, or the first geometry instance. (GPU Instancing must be enabled in the Viewport 2.0 options window.)
Corresponds to: MUniformParameter::kSemanticHWSPrimitiveBase.
HWS_PrimitiveCountPerInstance
int Specifies the amount that HWS_PrimitiveBase needs to be incremented for each geometry instance.
Corresponds to: MUniformParameter::kSemanticHWSPrimitiveCountPerInstance.
HWS_ObjectLevel
bool Specifies whether selection is to be done at the object level.
Corresponds to: MUniformParameter::kSemanticHWSObjectLevel.
HWS_FaceLevel
bool Specifies whether selection is to be done at the face level.
Corresponds to: MUniformParameter::kSemanticHWSFaceLevel.
HWS_EdgeLevel
bool Specifies whether selection is to be done at the edge level.
Corresponds to: MUniformParameter::kSemanticHWSEdgeLevel.
HWS_VertexLevel
bool Specifies whether selection is to be done at the vertex level.
Corresponds to: MUniformParameter::kSemanticHWSVertexLevel.
HWS_FrontCCW
bool Specifies whether a counter clockwise triangle is front facing. Useful when generating fat points or lines.
Corresponds to: MUniformParameter::kSemanticHWSFrontCCW.
HWS_InstancedDraw
bool Specifies whether geometry instances are being drawn.
Corresponds to: MUniformParameter::kSemanticHWSInstancedDraw.
New supported technique annotations
Name Type Description
OverridesNonMaterialItems
string (bool)
Specifies if this technique should be used to render non-material items such as the wireframe and the selected edges/vertices components.
This is particularly useful for shading effects that compute displacement for which the object geometry will not match the rendered material, making selection difficult.
false : does not override non-material items (default)
true : used to render non-material items, so that the shader can display UI primitives
See DrawContext in New supported pass annotations below.
Corresponds to: MPxShaderOverride::overridesNonMaterialItems().
New supported pass annotations
New nonMaterialItemsPass and selectionPass contexts are now available for the DrawContext annotation, and a new PrimitiveFilter annotation has been added.
Name Type Description
DrawContext string
Specifies that this pass should be enabled only for this draw context.
Multiple passes can have the same DrawContext value.
This can be any string value that matches a pass semantic in MHWRender::MPassContext. For example, the following contexts are supported: colorPass, shadowPass, depthPass, and normalDepthPass.
An empty value (or if DrawContext is not set) is equivalent to setting this annotation to colorPass.
You can now set this annotation to nonMaterialItemsPass for passes used to render non-material items. Set to selectionPass for passes used to select non-material items See OverridesNonMaterialItems in New supported technique annotations above.
PrimitiveFilter
string
Specifies that this pass can handle the rendering of the following components:
line as fat line (line size > 1)
point as fat point (point size > 1)
Can be used to handle edge or vertex components during the rendering pass or the selection pass.
Vertex components are rendered as quads instead of single pixels, and edge components, mostly during pre-selection highlighting, are rendered larger, for better visibility.
This is usually achieved by using a geometry shader to convert lines and points to quads.
fatLine : this pass can render lines as quads
fatPoint : this pass can render points as quads
If there is no pass defined that handles this special case, the default pass that handles the draw context nonMaterialItemsPass or selectionPass is used.
Varying attributes for vertex streams
Additional functionality has been added for the GLSL Shader, for use with the COLOR0 and TEXCOORD0-7 semantics.
Semantic Type Description
COLOR0
float3/4 (dx11Shader)
vec3/4 (glslShader)
Instructs Maya to bind this attribute to the color set vertex buffer.
NOTE:
For glslShader only:
Currently, there is only 1 stream available.
While OGSFX is limited to only one color stream defined by the COLOR0 semantic, it is still possible to define more than one color stream by using the TEXCOORDx semantic.
An attribute using the TEXCOORDx semantic that is of a vec3 or vec4 type can be used to convey a color stream to the shader, and an attribute using the TEXCOORDx semantic that is of vec2 type used to convey a UV coordinate stream.
TEXCOORD0-7
float3/4 (dx11Shader)
vec 2 or vec3/4 (glslShader)
Instructs Maya to bind this attribute to the UV set vertex buffer.
Currently, there are 8 streams available.
NOTE:
For glslShader only:
While OGSFX is limited to only one color stream defined by the COLOR0 semantic, it is still possible to define more than one color stream by using the TEXCOORDx semantic.
An attribute using the TEXCOORDx semantic that is of a vec3 or vec4 type can be used to convey a color stream to the shader, and an attribute using the TEXCOORDx semantic that is of vec2 type can be used to convey a UV coordinate stream.
Shader example
The WaterSimulation example has been updated to use the newly added semantics and annotations to demonstrate how to write a shader that performs hardware selection on displaced geometry, and to draw vertex, edge, and face components at their correct displaced positions. For the GLSL version of the shader example, see WaterSimulation.ogsfx in the presets\GLSL\examples folder of the Maya installation directory. For the DX11 version, see WaterSimulation.fx in the presets\HLSL11\examples folder.
The following describes the new additions to the GLSL version of the example.
To select and draw displaced components
The technique NormalView_Selection demonstrates how to perform hardware selection on displaced components, and to render non-material items (such as wireframe and selected edges/vertices) at their displaced positions.
Hardware selection allows you to select tessellated geometry. In addition, wireframe and components draw with the same outline as the shaded material in the viewport. This technique has 7 different passes.
Before defining the techniques, the #include directive is used to load four shaders as follows. The #include directive allows you to share the same GLSL fragments between different applications, and maintain separate shader code files instead of having to combine them all into one .ogsfx file.
GS_FatLine.ogsfh: This is a geometry shader that converts a line to a rectangle, and therefore allow render lines to be drawn bigger (for example, red pre-selection highlighting edges are drawn larger than dormant edges).
GS_FatPoint.ogsfh: This is a geometry shader that converts a point to a quad, and therefore allow render points to be drawn bigger (for example, vertices are rendered as a square instead of a single pixel).
PS_SolidColor.ogsfh: This is a pixel shader that draws with a solid color.
PS_HWSelection.ogsfh: This is a pixel shader that renders the components during hardware selection, where each component is rendered in a different solid color that is calculated using the object or component ID.
The first 4 passes are used for drawing in the viewport; therefore the PS_SolidColor pixel shader is used.
Pass pNormal: renders the textured material
Pass pNonMaterialItems: renders components such as wireframe and vertices. Components are rendered with a solid color, such as blue for edges of dormant objects and light green for edges of active objects.
Pass pNonMaterialItemsFatLine: renders lines using the GS_FatLine geometry shader.
Pass pNonMaterialItemsFatPoint: renders points using the GS_Point geometry shader.
The last 3 are used to render components during hardware selection, and therefore the PS_HWSelection pixel shader is used. The PS_SolidColor pixel shader is not used, as these passes are not used to draw in the viewport.
A primitive id (such as vertex id) is used to produce a color to identify the object that is picked. An offscreen buffer is used to store these computed colors so that Maya knows what is picked by the mouse.
Pass pNonMaterialItemsSelection: used for selection of components such as wireframe and vertices.
Pass pNonMaterialItemsSelectionFatLine: used for selection of fat lines
Pass pNonMaterialItemsSelectionFatPoint: used for selection of fat points.
Technique and pass annotations
The overridesNonMaterialItems technique annotation specifies that this technique can be used to render non-material items such as the wireframe and components like edges or vertices.
string overridesNonMaterialItems = "true";
Pass annotations are used to tell the plug-in which pass to use for which render items.
For example:
pass pNonMaterialItemsFatLine
<
// This pass will be used to render non material items as fat lines
string drawContext = "nonMaterialItemsPass";
string primitiveFilter = "fatLine";
>
Therefore, if a render item is categorized as a non-material item, and the primitive type is categorized as fat line, then the pNonMaterialItemsFatLine pass is used.
New C++ API methods added
MUIDrawManager::beginDrawInXray() and MUIDrawManager::endDrawInXray() methods have been added so that primitives drawn between calls to these two methods will display on top of other geometries in the scene. These methods can be used to draw objects such as locators.
The squaresNode_noDepthTest example in the Maya Developer Kit has been updated to illustrate the use of these methods. This example draws meshes without performing depth testing. MUIDrawManager is used to draw two squares and some text, and these two squares and text display on the top of other geometries in the scene.
The Developer Kit is available online at Autodesk Exchange at https://apps.exchange.autodesk.com/MAYA/en/Home/Index.
The method descriptions are as follows:
void MHWRender::MUIDrawManager::beginDrawInXray ( )
void MHWRender::MUIDrawManager::endDrawInXray ( )
The drawables between calls to beginDrawInXray() and endDrawInXray() will display on top of other geometries in the scene, as the depth test is disabled for these drawables.
These methods can be used to draw objects such as locators.
Limitations:
Only drawables that meet the following conditions will be affected by beginDrawInXray() and endDrawInXray().
Created by the method MUIDrawManager::mesh()
The first input parameter (primitive type) for MUIDrawManager::mesh() is one of kTriangles, kLines and kPoints.
Any other drawables between calls to beginDrawInXray() and endDrawInXray() will display as normal.
painter.beginDrawInXray();
painter.mesh(MHWRender::MUIDrawManager::kTriangles, ...); // assume this is geometry A
painter.mesh(MHWRender::MUIDrawManager::kLines, ...); // assume this is geometry B
painter.mesh(MHWRender::MUIDrawManager::kPoints, ...); // assume this is geometry C
painter.endDrawInXray();
painter.text(...); // assume this is text D
If several meshes are drawn between these two APIs, then their draw order is the reverse of the mesh() function call order. For example, in the sample code above: C will be drawn on top of B; B on top of A. If text calls are made after these two APIs, the text will be drawn on top. In sample code above, text D will be drawn on top of C.
Return to Top
What's Fixed
The following list contains bug numbers and corresponding descriptions for issues fixed in this release.
Bug Number Description
Animation
MAYA-16724 Playback is not as fast as expected when all rigs are hidden
MAYA-45974 Performance : Investigate why transform nodes have a lot of attributes evaluated
MAYA-48500 Performance : Manipulation with Evaluation Manager in Legacy Default Viewport after switching from Viewport 2.0 doesn't always work
MAYA-50016 Fixed the filterCurve slowdown when motion trails are used
MAYA-51067 Trax Editor Offset poses key incorrectly
MAYA-51112 Undo of key all controls will hang Maya for a long time when autokey is on
MAYA-51181 Sequencer : Message displayed in viewport after Ubercam creation
MAYA-51394 MotionTrail : Maya fails to create motion trail on a simple sphere
MAYA-52178 Performance : Hide on playback does not perform as well as turning off visibility
MAYA-52247 Sequencer : Memory spikes with large number of shots
MAYA-52252 Performance : softMod GPU override doesn't support per vertex weights
MAYA-52313 Performance : Zooming causes mesh to disappear
MAYA-52414 Performance : Shadows disappear when GPU override is enabled
MAYA-52430 Performance : Shadows don't properly update with Evaluation Manager and Viewport 2.0
MAYA-52544 Performance : Wrap deformer evaluation triggers a wait cursor
MAYA-52910 Geometry cache : Crash when switching topology on the cached mesh
MAYA-53076 Fixed performance of cmds.deformer
MAYA-53381 Fixed an error loading Python scripted plug-in (Unknown C global variable)
MAYA-53941 MFnGeometryFilter::indexForOutputConnection produces error for sparse outputs
Bifröst
MAYA-34678 Mesh clip bounding box inexact
MAYA-35206 Bifröst: Attributes left behind when object is removed from simulation
MAYA-35458 Attribute Editor tabs for bifrostContainer and bifrostShape should be displayed upon selection (showEditor.mel : More than one object matches name)
MAYA-35974 When creating a liquid without a mesh selected, an error occurs (but the liquid is created)
MAYA-36645 Bifröst: Auto-rename does not check if renamed name exists
MAYA-42236 Bifröst emitter density values of 0 hang/crash Maya
MAYA-44322 Turning on meshing on an Aero returns vorticity warning
MAYA-45283 Clip Bounding Box Min and Max are still exposed as channels in the Channel Box
MAYA-45947 Mesh node that holds current or prior Bifröst attributes will break redo if Attribute Editor is open
MAYA-48543 Bifröst: Too much dissipation in Aero voxels compared to particles
MAYA-48544 Bifröst: Performance problems when emitter is outside adaptive mesh
MAYA-49577 Unable to render both liquid and aero together
MAYA-49946 Bifröst Aero: Adaptive mesh deletes all particles outside mesh
MAYA-51397 Bifröst: Accelerators consume too much RAM
MAYA-51440 Bifröst Aero: Adaptive mesh is not managed by state server, consumes RAM
MAYA-51469 Gravity is applied twice when spatial is Off
MAYA-51509 Bifröst cached scenes that are saved at a non-start frame should read cache on load
MAYA-51526 Unable to emit into thin geometries with spatial on
MAYA-51614 Foam moves too slowly when time steps are used
MAYA-51634 Particle properties not properly transferred to the mesh with spatial on
MAYA-51747 Turning off BGcompute after user caching multi-liquid Bifröst simulations with the same user cache name crashes Maya during playback
MAYA-51863 Imported Bifröst Visor example scenes have zeroed out foam (foam 0.0) attributes
MAYA-52068 Adaptive Aero memory leak
MAYA-52110 Opening Bifröst scene twice on windows with GTX card prints a lot of hardware shader code
MAYA-52153 Viewing Aero voxels from orthographic view at far distances hangs Maya
MAYA-52167 Diffusion in emitted aero quantities presents problems for adaptive Aero
MAYA-52431 Aero blockiness
Color Management
MAYA-43869 Adding an invalid transform while in regional mode (for example, Simplified Chinese) fails to generate a popup error and adds the invalid transform to list
MAYA-49394 Shaderball swatch without file texture doesn't update with Color Management preference settings
MAYA-50854 The Color Management setting does not update after loading a policy that enables Color Management
MAYA-51125 Color Management custom view transform is not loaded after adding a new transform from Apply Output Transform to Playblast in the Preferences window
FBX
MAYA-53738 relativeNamespace flag of file command doesn't work on FBX files when Dialog style preference set to OS native
General
MAYA-44677 GameExporter FBXReview feature on Mac OS X - folder not found error occurs if FBXReview has never been launched
MAYA-45050 Mac OS X: Menu labels in Bullet drop down menu are missing their labels
MAYA-47723 Crash when importing FBX
MAYA-49175 Fixed an issue where removing a connectAttr edit would delete other connectAttr edits involving the same plug
MAYA-51363 Fluid shelf icons not executing commands as expected
MAYA-51551 Fixed renaming of multi-attribute
MAYA-51628 Fixed an FBX import/export problem when blendShape items have the same short name
MAYA-51689 Fixed the MFnMesh::setFaceVertexColors() API
MAYA-52207 getFilesToArchive() never gets called for MPxLocatorNode
MAYA-52449 nParticles > Paint Soft Body Weights Tool menu now appears correctly
MAYA-52943 Alembic reference doesn't work with dir mapping correctly (command dirmap)
MAYA-53385 HIK rename character tool only changes the name of the character in Outliner once
MAYA-53631 Can't right-mouse paint goal weights on nSoftbody
MAYA-54273 Game Exporter does not find FBX Review on Mac OS X
MAYA-54358 PySide Phonon fails to import on Mac OS X
mental ray
MAYA-49286 Maya crashes when performing several mental ray renders consecutively in scenes with instances
MAYA-50396 mila_material specular highlight in IPR is too large and creates a cloudy halo effect
MAYA-50932 Runtime error returned with mila_material and render layer material override workflow upon invoking Attribute Editor
MAYA-51275 Improved mental ray render times with procedural shaders/textures (ocean, fractal, and so forth)
MAYA-51970 mental ray always uses/creates optimized texture for UV-tiled textures
MAYA-52168 mental ray colorprofile shader parameter always enabled for UV-tile scenes
MAYA-52657 mental ray, if selected as the renderer in the Hypershade Material View, will crash the given scene if file nodes use UV-tiling
MAYA-52696 Hypershade Material Viewer errors with mental ray mila_material
MAYA-52863 mental ray batch render crashes or hangs after a few frames with large mental ray mi proxy, abc and UV tiles in scene
MAYA-53478 Adding mental ray bake set throws error
MAYA-53719 mental ray preference 'Use optimized textures (auto-conversion)' does not work
Modeling
MAYA-32188 Bevel produces bad results on a simple geometry
MAYA-40032 Bevel creates skewed geometry in example scene
MAYA-43256 MAC OS X: Multi-cut tool cut line is drawn on mouse up or when dragging
MAYA-43491 In Viewer Editor text and values are in bold on Mac OS X and on Windows when using the Legacy Default Viewport
MAYA-44278 Crash beveling edges after merging vertices to center
MAYA-45889 Sculpting may stop working if mesh has been rotated
MAYA-47328 Mac OS X: Stamp thumbnail sometimes does not display in the Sculpt Tool settings window
MAYA-48630 Editing blend shape targets using the Scale tool and symmetry causes problems
MAYA-48987 Cannot sculpt mesh after delete history and freeze transforms
MAYA-50720 OpenSubdiv Adaptive displacement is always on even when disabled
MAYA-50806 Edge selection is inaccurate after bevel
MAYA-50824 Freeze brush not working properly with pen pressure and surface falloff
MAYA-50970 Pinch brush not creating symmetrical strokes in object mirror mode
MAYA-50995 Delete part edges of smoothed mesh crashes Maya
MAYA-51026 Screen pixel performance drop in Volume falloff
MAYA-51029 While in UV Editor, soft select doesn't work on any other components than UVs
MAYA-51184 Grab brush's Grab silhouette doesn't work properly with Volume or Surface falloff
MAYA-51530 Bevel Fraction not working as expected
MAYA-52156 Grab UV and Pin UV tool are missing from UV Editor right-mouse menu
MAYA-52441 Bevel problem when increasing segment count
MAYA-52867 Pivot reset when changing the view
MAYA-53447 Bevel is not connecting an edge
MAYA-53479 Component axis orientation sometimes incorrect on rotated or non-uniformly scaled objects
MAYA-53602 Disappearing geometry with Bevel tool
MAYA-53610 Performing Poly Smooth while in Sculpting Tool corrupts geometry
MAYA-53926 Increasing segments moves UVs to -1 -1
MAYA-54476 Beveling this geometry creates non-planar faces
Rendering
MAYA-47111 Maya Software renderer IPR crashes the application
MAYA-47703 Soloing/unsoloing complex Layered Shader locks up Maya even though nothing changes
MAYA-50337 Removing default windows inside Hypershade and then re-adding them will not be restored upon File > New
MAYA-50529 Docking Hypershade windows, then closing Maya with Hypershade still open, will not restore the docked windows after restart
MAYA-50549 Changing Node Editor tabs or re-opening the Hypershade causes the Material Viewer to render the selected node if an upstream node is selected
MAYA-51087 Hardware Material Viewer is always active and causes unnecessary Viewport 2.0 processing (slow down)
MAYA-51327 Scene is dirtied when selecting File > New after opening the Render Settings
MAYA-51829 Texture-centric UV linking does not work with Hypershade open
MAYA-52321 Fatal error trying to snap with Bifröst shape visible
MAYA-52418 Frames per second drops unexpectedly when setting Hypershade swatch button to OFF
MAYA-53409 Viewport and Hypershade Material Viewer get out of sync when deleting a node and soloing in Hypershade
MAYA-54004 Maya will crash when rendering scenes with textures over 8k using the software renderer
MAYA-54403 Maya crashes when IPR renders checker texture using the software renderer
MAYA-54709 Latest mental ray satellite doesn't have the right mental ray version
User Interface
MAYA-54522 Node Editor bookmark stops shape node from being removed when you delete history
MAYA-55057 Unconnected DG nodes get deleted on save
MAYA-53166 hotkey command doesn't work anymore
Viewport
MAYA-17905 Viewport 2.0: rawfootPrintNode node shaded display is incorrect
MAYA-31779 Mac OS X with wacom pen : viewport frames per second much slower during manipulation with help line visible
MAYA-37518 Viewport 2.0: Assign Shader to Each Projection does not work as expected
MAYA-42089 User can't select the XGen guide in the viewport in OpenGL Core Profile mode
MAYA-50042 Image sequence fails to load with image names such as image<f>.<ext>
MAYA-50565 Joints and locators are not drawn when isolated in Viewport 2.0
MAYA-50891 OpenSubdiv smoothed geometry in Viewport 2.0 in Core Profile mode is covered in cross-hatched artifacts
MAYA-50931 Cannot point snap to geometry in OpenGL Core Profile mode (middle mouse move snap to curve fails)
MAYA-51013 Errors when switching renderer in Render Settings window if rendering shelf is open
MAYA-51094 Crash adjusting subdivisions on extruded faces that are isolated
MAYA-51215 Viewport 2.0 locator depth drawing is inconsistent with Legacy Default Viewport
MAYA-51437 Incorrect intersection point computation in software selection mode when all points are in selection region
MAYA-51638 Maya crashes in Viewport 2.0 when duplicating instancer of fireworks
MAYA-51818 Pivot edit mode curve and point snap problems in OpenGL Core Profile mode
MAYA-51831 playblastTest crashes when run in automated test mode
MAYA-51862 Selected spring components are not shown in Viewport 2.0
MAYA-52549 MotionTrail : Viewport 2.0 sorting issue when show frame markers are enabled
MAYA-52746 Major memory leak in Viewport 2.0 when cycling select/unselect
MAYA-52966 Image plane losing alignment in Viewport 2.0
MAYA-53350 Missing transparency in Playblast
MAYA-53388 Image sequences as textures do not load
MAYA-53661 Image sequence cache on image plane doesn't work well for the specified scene
MAYA-53869 Framing locator with no bounding box confuses perspective layout
MAYA-54045 Viewport 2.0 MRenderOverride heads-up display does not appear
XGen
MAYA-51245 Performance problem when iterating objects in XgmUtil::pushOver()
MAYA-51976 Select Material Attributes context menu fails for items with XGen groomable splines attached
MAYA-52246 XGen Export Selected as Archives triggers firewall message on Mac OS X
MAYA-52496 The _lo and _med objects are exported twice using batch export archive with manual Level of Detail
Return to Top
Limitations
The following section describes limitations and workarounds (where applicable) about this release.
Bug Number Description
API and Scripting
MAYA-54817
Maya Developer Kit does not contain file OpenMayaMac.h on Mac OS X.
OpenMayaMac.h has been removed as it is no longer used. Customer's legacy projects must be updated to remove the use of the header file.
Bifröst
MAYA-49898
Adaptivity is not turned off when step is set to zero
To turn adaptivity off, you must set min and max steps both to 1.
MAYA-38451
Large user cache files not readable
Bifröst cache files that exceed 4.2 GB may not play back.
mental ray
When the mental ray interactive preview render view (IPR) is active, the mental ray Material Viewer in the Hypershade will not update on changes or selections.
Modeling
MAYA-45402
OpenSubdiv: Painting texture maps does not display on polygon in smooth mode.
Workaround: Use Maya Catmull-Clark instead of OpenSubdiv Catmull-Clark subdivision method.
Scene Assembly
MAYA-45340
Incorrect order of scene assembly edits may cause animated components to not respect the timeline animation when a key framed scene representation is unloaded and then reloaded.
If the animated component does not reflect the animation timeline after reloading the scene representation, workaround the issue by scrubbing the timeline.
Viewport
MAYA-53164
Scenes with many procedural textures in one network may cause the Hypershade to hang when the Material Viewer is open in Viewport 2.0 in OpenGL mode only (cg library failure).
If the Hypershade hangs or crashes while using OpenGL mode in Viewport 2.0, this may be due to a legacy Cg library issue. A possible workaround is to use the more modern OpenGL Core Profile or DirectX 11 mode.
XGen
MAYA-39333 / MAYA-39354
XGen control guides: Soft-select falloff color is not yet supported.