This is a relatively simple script for Maya which will transfer vertex colors from one mesh to any number of meshes.
This script was originally made to make the process of transferring vertex color data from meshes painted in Unreal Engine to meshes in Maya more straight forward but it can also be used to transfer colors from any object to any other though within Maya.
- Import mesh from Unreal.
- With the imported object (or any object you wish to transfer colors from) selected, press 'Set original'.
- To transfer colors the objects should be as close as possible, if the objects have the same geometry and pivot point you can set the object you wish to transfer to and press 'Set Root Object' then press 'Align to Root Object' (which should reposition the original to match the Root Object*)
- Alternatively, if you are using a hierarchy and you are exporting this hierarchy then the pivot point of the top most object is your 'Root Object' and you can select this and press 'Set Root Object' and 'Align to Root Object'.
- Now you can transfer to either every object in the hierarchy (if using this method) or any number of selected objects.
Advantages of using this tool:
- Store vertex color data safely (it is easily lost in Unreal).
- Paint colors in unreal and store only the painting on desired elements of the object.
- Automatically cleans up data to ensure the object will import to Unreal without issue.
Hover the mouse over any buttons to get an annotation that will hopefully help if you're having trouble.
Can be used for commercial use
Tested with Maya 2020 and Unreal 4.25.
This script is written in Python so will not work for Maya LT.
This script can work with Maya 2022 but will not currently work in Maya 2022 out of the box. The issue is that Maya 2022 uses python 3 and this script was written in python 2, here is instructions on how to use scripts using python 2 in Maya 2022: https://matiascodesal.com/blog/how-to-launch-maya-2022-with-python-2-if-you-are-not-ready-for-python-3/
I intend to update it to work with Python 3 so it will work without any additional action.
*This may not work in all situations and the meshes may need to be manually aligned.
Vertex Color Transfer Tool Script