FBX Texture Import issue!

Hi All

I have a very simple test scen in Max, it is a cube with a material with a diffuse texture and a texture in the bump map slot. When I import this into Unity the diffuse material is imported and shows up in Unity, but the bump texture does not. But if I then reimport the fbx file the bump texture appears. Is this a known problem.

It also happens that sometimes the diffuse texture doesnt get imported straight away, I could import the fbx and no diffuse texture shows up, can then go and edit a script or something and when I go back to Unity it then imports the diffuse texture. Do I have something set wrong somewhere or something?

Many thanks
Chris

I think unity only loads the diffuse map and then only if the map is added to your project assets.

Normally to add bump you have to create or modify the diffuse material by changing it to a bump or parallax material. And fill the texture slots manually.

Thats how it’s always worked for me anyway. You don’t make the final materials in Max but in the editor itself.

It’s definitely better to create and manage your materials in Unity, in my experience. There’s no real way for Unity to know if materials in two different meshes are intended to be the same*, so it will create two different materials. This is wasteful when it comes to rendering (state changes are typically one of your biggest rendering bottlenecks) so it’s better to create your own and apply it to all the meshes which use it. It may take a little longer, but it’s worth it in the long run.

  • If you have two materials called “Default 01”, are they the same material? Maybe not.

Thank you for the help :slight_smile: Iam just curious as to why the importing of the bump map is delayed if its not used at all, so it seems Unity attempts to import all the textures it finds in an Fbx file but just doesnt seem consistent in how it goes about it.

My aim is to get Unity to work like our in house game engine where materials etc are managed inside Max and we really just want a one click export to Unity that deals with shapes, animations, materials, shaders etc. Guess Ill look for a workaround for this particular issue.

Thankyou again for your guidance.
Chris

You would probably have to create your own exporter to do that. I’ve seen it with other engines like Ogre3D but those are custom commercial exporters that cost $200 - $600 per license.

With shaders, the .fx format 3dsmax uses for shaders isn’t compatible with Unity’s own proprietary shader format which I believe is based around cg. It would be quite an undertaking to produce a parser that converted between the two even if the underlying shader language is essentially the same.

That is exactly what I have done, I did the exporter for our own game engine for Max so wasn’t too hard to get it working, our shaders have been converted to work with Unity already so that side all works. Ive changed the texture side now so I directly import the textures instead of relying on Unity so we now pretty much have the one click exporter we want, shame I cant add layers procedurally as that is the only thing we are missing at the moment, all the controllers are working, and all our custom physics, sound, stuff is working. Sure makes life a lot easier.
Thanks again for your time.
Chris

Your exporter sounds very nice. You could probably make a fair bit selling your exporter as a 3rd party tool for Max users. Having said that, judging by the Ogre ones I mentioned, it would probably be a bit of a drain with all the support needed. Ogremax began as a freebie and ended up becoming a full time job for the developer.