FBX Import Broken

It happened in one of the most recent Unity updates. Importing FBX models no longer works correctly. Now, any object that has children that have the same material as the parent gets imported without its proper material. A new material called “No Name” is created and assigned to the children. This means I have to go in and assign the correct materials to 100s of objects after importing. This is a new problem. It always worked correctly in the past.

Also, is there a better way to import Cinema 4D models? I thought I remember reading somewhere that Unity could now import C4D models natively. But that doesn’t seem to be the case. Cinema 4D must still be installed for the C4D import to work. And I don’t have it on my machine. Up till now, FBX seemed like the way to go. Any suggestions on how to get C4D models importing without losing texture settings?

Hm, not sure if this has to do with your issue, but when i import fbx then Unity doesn´t always create a new material, but grabs an existing one when the texture name matches.

This leads to really interesting results when you don`t think about it, and modify a material that is already in use in another level. Happy hunting :frowning:

After just finishing a big project, I finally updated to Unity 4.0.1 in hopes that the FBX import problem was fixed. It’s not. Same problem as the last few Unity updates, child objects lose their materials. I’ve reported this as a bug a few times now, but each update still has the problem.

Anybody else have this problem? Any solutions or workarounds? With even slightly complex scenes, this is becoming a HUGE PITA.

Hi! What is the bug case number?

494914 (Open)
You may want to save your case’s ticket: 494914_1cugftv1tc0j12r6

Should I submit this again since it’s a new version of Unity?

One other thing I forgot to mention, tiling doesn’t work either. An object that had a texture that is supposed be tiled has tiling reset from 20 to 1. And diffuse shaders that have a color and no texture have the color reset to white.

Now it seems to be getting worse. I just tried to reimport an updated scene, and NONE of the textures made it. All the materials are there, but none of the bitmap textures. This is getting really frustrating!

Hi

I just had a look at your bug report. There was no file attached maybe something went wrong.
Please submit it again and attach the fbx file and if you have the c4d file please also attach that.

Best regards
Steen

While I very much appreciate the interest in this problem, what I really need now is a workaround. I can no longer import or even update any scenes into Unity. A file that imported partially the other day will now not even update. All textures were lost when I tried.

Does anybody else use C4D (Mac, 11.5) that’s NOT installed on the same system with Unity? (We can’t afford a second copy for my machine just to import files into Unity.) How do you export files? I save them in FBX format with the Include Materials option checked.

I just submitted a third bug report (one about 6 months ago, one the other day, and one just now). All three had sample FBX files attached. The most recent is Case 525373. The others are 494914 and 524094.

I’ve had strange material issues that turned out to be a problem in the FBX itself. Max doesn’t require that sub materials be named, so when I exported a multi-material model all the materials were assigned incorrectly or missing. I ended up writing a script to make sure the materials had unique names and running it before exporting.

Do you happen to have some older FBX files somewhere, to check if this is an error solely on unity’s side?
I am using Cinema4d R13 and 11.5 (the older version due to plugins i don’t want to ditch that haven’t been updated) and for both cinema’s im using FBX Version 7.1 (2011) to export the objects, i remember 6.1 (2010) to have more material naming issues (also submeshes weren’t always passed on succesfully), have you tried updating your FBX exporter plugin? if not, please send me a PM in response!

It looks like the problem is most likely C4D. I tried every export format in C4D 11.5, and all lost the textures (most of the time).

When I tried opening an FBX file in an app called Shade 3D for Unity, it showed that it was looking for textures in the original path on the machine where the models were created. They were clearly not embedded in the FBX file.

My workaround was to install the old PPC version of C4D on our iBook laptop (yes, it’s that old). I was able export from C4D 11.5 then open the files in C4D 9 on the laptop. C4D 9 correctly exports FBX files. So it’s a bit of a PITA, but it’s better than manually importing and reassigning textures.

I didn’t know I could update the FBX exporter. C4D says the format is FBX 2010.2.

Hi,

Whenever I have an issue like this and need a work around, here’s what I usually do…

  • Create a new test project.
  • Save / export the problem asset and see if it works correctly.
  • If it does, then it is generally safe to say that something is wrong with:
    a) A cached item in your problem project.
    b) A duplicate item somewhere, that Unity is finding and using first. In this case it appears that Unity isn’t doing anything, but in fact it is… just not where you’re looking.
    c) You’ve changed the import settings at some point and it’s causing a conflict.

If my test project works fine, then I track down and completely delete all meshes, textures, materials that have been imported so far and then save a new version into the real project.

Just forcing a ‘reimport’ over the existing doesn’t always solve the issue if there are links to other items.

Failing that and if you’re using source control, I delete the project and get a fresh copy or delete the library file and let Unity do a rebuild.

I don’t use C4D so I can’t offer any experience there.

Good luck!

I’ve been in contact with C4D tech support, and they’ve been very helpful. He took one of our C4D files and saved it in several different FBX formats and versions from different versions of C4D (turns out we don’t have the latest version). Here are the results in a new, empty Unity 4.0.1 project:

• C4D 11.5 - FBX 2010 - no textures are imported, colors all set to white (this is the C4D version we have)

• C4D 11.5 - FBX 6 5_0 compatible - no textures are imported, but diffuse textures with no bitmap retain their correct colors

• C4D 14.0 - FBX 6_1, FBX 7_1, FBX 7_2 - textures are imported, but lose connections with their materials.

So it looks like the problem is partly C4D and partly Unity. Everything gets imported from a C4D 14 FBX export, but gets screwed up in Unity.

Bottom line, the only version of C4D that currently exports FBX that Unity can import is version 9.0, which is PPC and doesn’t run on any of our current Macs.

So I’m back to my original question, is it no longer possible to use C4D to build models for Unity? That is, without having to re-do all textures and materials after importing.

We have not done anything to break it, but it could very well be that some has changed without us noticing it. Can you please send me the FBX file that is supposed to work and can I take a look what is going wrong.

If you need a work around right now my best suggestion would for you is to write an AssetPostprocessor and assign the textures and materials there.

I’ve attached sample FBX files to each of the three bug reports I’ve submitted. Is there somewhere else I should send one?

My workaround is to dig out the old iBook laptop, import the files into C4D 9, and use that to export to FBX. A PITA, but a lot easier than trying to do it all in code.

And to me this does suggest something has changed. C4D most definitely has, since it looks like each new update since version 9 exports a different version of FBX. C4D 9 doesn’t indicate which version it exports in, but that FBX seems to be the last that Unity has been able to recognize correctly.

Hi

I did look at the three you submitted earlier
case 494914 did not have the fbx attached
cases 525373 and 524094 do have the fbx file but none of them includes textures.

I would like to have the fbx file that has everything so I can figure out why the textures does not get attached.

Hi

Sorry I was wrong the last one does include the textures and they do get assigned fine when I import the fbx file.
So the only problem is the children that uses the same material does not get setup correctly, am I right?

I’m not sure if you’re saying the textures in the last sample get assigned correctly or not.

Part of the problem is that C4D is NOT embedding the textures consistently. Since that last file I attached, I have not been able to save that scene again with the textures included. Sometimes it looks like C4D just doesn’t embed the textures in an FBX import. Looks like all the time now.

But yes, when the textures are in the FBX file, Unity has problems with children that have the same material as their parent. Also diffuse textures that have only a color and no bitmap, the color gets set to white. And tiling gets set to 1. Those are the three problems I’ve noticed.

In the sample scene, the floor has a tiled pattern that should be 24 (x and y) or something like that, which gets set to 1. The table top is just a solid color (off-black) with no texture, which gets set to white.