Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom visualization of metadata

1 REPLY 1
Reply
Message 1 of 2
rflannery
255 Views, 1 Reply

Custom visualization of metadata

rflannery
Collaborator
Collaborator

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?
0 Likes

Custom visualization of metadata

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?
Labels (3)
1 REPLY 1
Message 2 of 2
rflannery
in reply to: rflannery

rflannery
Collaborator
Collaborator

Still digging into this.  Maybe it would be better to use blind data instead of metadata?  I prefer the way that blind data is stored in the Maya ASCII file over the way metadata is stored.  But I still have no clue which would be better for making a custom data visualization.

0 Likes

Still digging into this.  Maybe it would be better to use blind data instead of metadata?  I prefer the way that blind data is stored in the Maya ASCII file over the way metadata is stored.  But I still have no clue which would be better for making a custom data visualization.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report