Hi, I try to export 2 meshes with color on vertices to FBX. But when I import the FBX file the result is that one mesh has its colors and the other doesn’t show the colors. How can I solve this problem?
The attached python script worked for keeping the vertex colors when I export to fbx and reimport to rhino, however, it removed all UV texture mapping. Is there any plan to fix the default rhino fbx export? I looked and it didn’t appear that there was a python method to get texture? Material Texture or MeshHasTextureCoordinates didn’t seem to do the trick, but i’m more comfortable in C# so I could be wrong?
original mesh (left is shaded view, right is rendered)
Correct, the original file was created in Rhino 5. I’ve attached the same file in Rhino 6 and added a layer for the Rhino 6 fbx export test, which seems to not capture the vertex colors still. (in the rhino file I have four layers: “original_mesh_rhino_5” this is what I’m trying to export as an fbx and reimport into rhino and have it still maintain the vertex colors and texture mapping, it is an original mesh created in rhino 5, no imported into rhino). “default_fbx_export” is the Rhino 5 export. “python_fbx_import” is using the python script mentioned in this post, then exporting from Rhino 5 as fbx and reimporting into Rhino. “rhino6_default_fbx_export” is my attemp at exporting “original_mesh_rhino_5” in Rhino 6 and reimporting, but as you can see from the image it still isn’t working for me (i’ve also included the texture map I’m using at the very bottom).
Thanks Nathan, the upgrade from 6.11 to 6.12 did the trick! I noticed it only works with Version 7 binary/ascii and not Version 6. What does the rhino script look like for specifying Version 7? If Version 7 was the last fbx export I made, my script runs fine, but if my last fbx export was Version 6, then it doesn’t work.
This line of code works: Rhino.Command "-Export " & strFile & " _Enter" & " Enter", 0
This line of code does not work: Rhino.Command "-Export _Version=Version7binary" & strFile & " _Enter" & " Enter", 0
I’m not good at scripting myself. But I did confirm that setting the version option in the command line is working. I know that the -export part must come first because that’s how Rhino determines which plugin to get subsequent command line i/o options. This will get you the command line options, for instance.
Looks like “ExportFileAs” is what you set for the FBX flavor.