A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Exporting for Unity - object names get numbers added
Posted: 07 March 2019 08:44 PM   [ Ignore ]  
Total Posts:  1
Joined  2019-01-23

When I export my C4D file as an FBX for Unity, the names of objects in my scene get additional characters attached. For example if I have the following list of objects:

table
  Cube
  Cube.1
  Cube.2

This becomes:

table
  Cube_1
  Cube_1_1
  Cube_2_1


So at first I had assumed that it was only when I left names that were automatically generated when making the object and if they were names that were repeated somewhere else in the file. This however is not the case. This same problem seems to happen with any type of object but not consistently with all objects.

Does anyone know how to solve this? I have a Unity & Virtual Reality expert that I’m sending my files to and every time I have to edit the scene and send her the files they get a new name and it breaks all her scripts. She ends up having to replug in all her scripts with new names of objects knowing that in the next iteration of corrections this will happen again.

HELP PLEASE!

Profile
 
 
Posted: 08 March 2019 01:44 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi sjunca,

Any duplicate name and anything behind a period (like a suffix) will trigger a renaming. So far my tests here, it doesn’t happen when I import the same FBX twice (so it is during export).

To get predictable results, do not use the same name twice nor rely on anything behind, as well as including, the period.

I checked the 2012 version of FBX, and it didn’t provide an automatic change. Which might show that it caused trouble and was introduced later.

I guess you are not the first one being bothered by it
https://answers.unity.com/questions/44983/fbx-objects-exported-from-3dsmax-automatically-ren.html
The Autodesk Forum tells that they don’t enforce it
https://forums.autodesk.com/t5/fbx-forum/renaming-non-uniqe-names-in-the-scene/m-p/4226890#M4445
So it seems to be a decision for the FBX-SDK user, in this case, you can make a suggestion to MAXON. Given future problems down the road, I would not recommend this.
https://www.maxon.net/en-us/support/suggestions/

Typically the text version allows for manual change, but I wouldn’t do it.

Over the years, well it might be way over a decade by now, I get the question of how to change a lot of names quickly. At one event some argued even it wouldn’t be possible, without scripting.
My suggestion would be just to use the string format and a Math-Add node, set to string. With some other “managing” nodes, as shown below, I guess even many dozen of names can be created and changed (again) quickly.
Example (screen capture and scene file).

https://www.amazon.com/clouddrive/share/gvlHXUj3gnjaxUOE54rQDz4Pxjqk6NJG6GD8t9sBBvP
Yes, these days, one could use a list in a Python-Node even and organize a lot of objects quickly.
Again, this is just a little hint, an example.

The way the name has become so far, your example above, shows how it needs to be set up. If done this way: No change should happen then anymore.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile