Custom visualization of metadata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am experimenting with adding per-face metadata to meshes as described on this page: https://help.autodesk.com/view/MAYAUL/2022/ENU/?guid=GUID-688D724C-F0D9-4649-BDD4-86E2447CFA05. I have successfully used the commands dataStructure, addMetadata, and editMetadata to add some metadata. Now I am trying to view the metadata, but I have run into some limitations.
One of my metadata members is an int32. Using the "Metadata Visualizations Options" window, I can get it to display in grayscale. 0 maps to black and the highest value maps to white. But I would like to display it in more of an indexed color mode. For example:
- 0 - red
- 1 - teal
- 2 - brown
- etc.
I can see that the "Metadata Visualizations Options" window calls the command showMetadata under the hood. But it does not support indexed colors.
I am also interested on other custom visualization options. For example, if I have two boolean fields, I would like to color those faces where both booleans have a True value.
How can I achieve this?
- Could I load a custom HLSL shader into a dx11Shader node and use that? Is there any way for an HLSL shader to access Maya metadata?
- Could I use the API to write a custom software shading node or hardware shading node and access the metadata that way?
- Is there some other option I'm not thinking of?