Save the maya model vertex color information and write it in Unity's FBX.

Save the maya model vertex color information and write it in Unity's FBX.

243202504
Enthusiast Enthusiast
619 Views
1 Reply
Message 1 of 2

Save the maya model vertex color information and write it in Unity's FBX.

243202504
Enthusiast
Enthusiast

Background: Unity engine game production, after submitting the model and binding into the game, again in Maya modified the model's vertex color, need to synchronize the changes to the fbx within the engine, do not use the model to the binding, the binding to replace the model and binding after uploading to the engine, the engine to replace the fbx and then use it, which is too cumbersome. You need to sync the vertex color data directly to the fbx in Unity after the model is modified.

Option 1: I tried it, save the vertex color in maya as a Json file, record the vertex number and color information, read the Json in Unity, write to the vertex in FBX. This process ran through, but there is a fatal problem, let me know, in Unity, the number of vertices will always be more than in maya, for example, a cube, maya is 8 vertices, but Unity is 24, so I read the Json to write the information is bound to be wrong.


Option 2: I noticed that Maya's FBX added two pieces of information to the ASCII file after manually writing the vertex color, then I took the FBX without vertex color in Unity, opened it with VSCODE, added those two pieces of information, and the vertex color was displayed normally in Unity. This is perfect! But a new problem was encountered, projects usually use binary FBX files, not ASCII.
So is there a way to fix it?

 

 

0 Likes
Accepted solutions (1)
620 Views
1 Reply
Reply (1)
Message 2 of 2

243202504
Enthusiast
Enthusiast
Accepted solution

I just came up with a new solution, since the vertex count doesn't match up, why don't I just convert the vertex color data to a texture and then read it in Unity? Is this possible? How to make a map from Maya vertex color data?

0 Likes