Please help this time : FBX scale not working

Hi all.

This is the third project I am experiencing this in and the second time I am asking for help with this. this is now really getting me down!

Why in the world is it that when I change an FBX’s import scale that nothing happens and as soon as I leave the tab, the scale is reset?

I just bought Dexsoft’s modern city pack today and after importing all the fbx files into my scene and configuring all the materials I finally realise that each brick in the pavement is about a meter wide… Wow! Huge town! So I try to scale the models down to 0.1 and lo and behold the objects in the scene stay the same size… So I click on the next one, click on the first one again and lo and behold, the scale is set back to 1 again… WTF!!!

I tried setting the scale on the FBX itself andI tried setting it on the mesh inside it but in neither case does it make a difference. The only way for me to get around this problem is by making each model a prefab after scaling it in the scene. Why is it necessary to create a prefab for my models to be the right size? Why does the size automatically revert after I hit apply? How do I fix this annoying occurrence?

I am Using pro, adding lights to my scene, setting it up to cast soft shadows, set my meshes to cast and receive shadows and for the life of me, I can see my model being eluminated when I change the value of the lights but nothing along the lines of shadows on the ground model! ARGH! Then I try to rescale my models and that doesn’t work. Then I try “turning it off and on again” but even restarting Unity doesn’t fix anything… So shadows don’t work any more and
I can’t scale my models. WTF?!?!?

I am at my wit’s end…

Thanks for any insights you might have…

I am still stuck on this!

Has anybody else experienced this before or does this sound like a bug I should report to Unity to look into?

Hmm sounds weird I have 3ds max set to centimeters and I base all my sizes on 256x256 centimeters for floor. The sizes fit well in unity I dont know if that helps but I haven’t seen any responses on this thread so I figure I would try and help and give you a free bump. Good luck = )

Sounds to me that the models may be all set to not “Cast Shadows” and perhaps may have something else going on like a script overriding their scaling. No way for me to tell without looking at the project.

You can give up using the import settings and just scale the gameobjects the models are in

I’ve seen this before, and it wasn’t just for scale, but that was for versions prior to 3.3. Not sure if it goes back as far as pre 3.0.

I think it was an OnGUI bug where it showed you editing one textbox when internally it thought you were editing another. Probably another control in the background somewhere is stealing focus; the actual value I input was discarded.

I’m not sure what I did to work around it, but I seem to recall clicking on a different textbox in the same panel first before clicking on the actual textbox I wanted to edit.

@cannon
Interesting idea… I will give that a go. If I am not mistaken, though, I think the entire panel has only that one field and then drop down and check boxes… I think… If so I will just select something that makes more boxes appear :slight_smile: Hope this works :slight_smile: Thanks

Edit: Wait, hold on… I think I remember reading about that also… But wasn’t that OnGUI as in “in the game”? I am talking about fields on the OnGUI as in “OnEditorGUI”. I am speaking of Unity’s own import settings. Are we speaking of the same thing?

@gargerath
The shadows thing I think was a case of 'MyBad". I don’t see any shadows on the models when doing my layout but when i zoom in real close, I see them. That shadow cutoff distance in the settings + the distance of my ‘camera’ in the editor + the buildings that are now all 1000x the scale they should be = that shadows cutoff setting is obviously set waaaaay to short. :stuck_out_tongue:
I only just now remembered about that setting, but I think THAT should fix that issue… :stuck_out_tongue:

@spinaljack
Using the same object in the same level 15 times requires that I set the scale for one object 15 times. This is the very reason WHY unity has the scale feature. The only way to prevent this would be to make this a prefab after I scale it, but that was my question: Why do I need to create prefabs from my models? Why can’t I just place a prop in my scene and be done with it?

But that issue could also easily be avoided by simply duplicating the object already IN the scene so that is not too big of an issue, what IS an issue, though, is this one project I had a while back. It required me instantiating models and scale them to fit an area which is user-definable through scale. If the user chooses the scale to be 2.5 then I want to make the model’s scale 2.5 also but if the model is 1000 times too big at a scale of 1, then 2.5 is not going to work. At all. I need to know that all models are the same size when imported into the scene so I can set the scale via code and still be sure they would match up and fit the required space.

Alternatively I would have to create a prefab from the model and use the scale on the prefab but the prefab wouldn’t contain any animations, then would it? Sure, if I drop the model itself onto the prefab but then each change to the model would require that I recreate the prefab from scratch including all settings on all scripts attached to it. The better way would be to place the character inside an empty object, prefab that, then change all the multitude of scripts in my project that worked on the model to now work on a field inside a script attached to a prefab that represents the model contained inside. I would have to redo nearly 3 dozen scripts and I won’t be able to test any until I’ve done all because all of them work together to do one single job. Prefabs are not the way to go in this instance, but not being able to adjust the import scale means that all my coding is now 100% useless because it all DEPENDS on one immutable fact: “All models are the same size at scale 1.0”. My only option is to go the prefab route but after spending 2 months writing and debugging code to get it working 100% perfectly only to be told: “Sorry, scaling is no longer supported. Please redo all that work” just pisses me off and I wanted to know “why?”.

Having said all this, I am wondering if Maya isn’t to blame. I also bought another asset kit from the Asset Store on Friday. When I drag the model into my scene, perfect. No issues of any kind. When I try to scale it, sorry, no luck. When I try to import the model into Maya the import claims everything went okay, but nothing was imported. At some point Unity developed an error that resulted in lots of red messages to appear in the console. All starting with “!”. I tried closing Unity but that just caused it to hang. I had to close every single open app before it completed closing down. By this time Maya had been closed, but Unity didn’t close until after I closed the last program (which happened to be Preview but it wasn’t previewing anything at the time). The fact that Maya was one of the programs that was open causes me to point a finger at it… :wink:

In one of the other projects this happened, I was able to scale objects, no problem. I created a plugin that has been asked for MANY times on this forum for the past few years and it is still not available. I created it for (and inside) a project of mine and wanted to separate it from my main project so I can create a package that contains ONLY this. So I created a new scene and started copying in the scripts and objects etc that I need and lo and behold… the same models in the same project, in a different scene… did work, now did’nt work. Not even in my original scene, so my entire project is now null and void. Great! I believed the issue to be a script that overrides the scale so I created a new project, dropped the same object in there and tried the scale thing. This time it worked again. So I blamed myself, saying it was a script somewhere. I looked through every single line of code in every single file and couldn’t find it so in the end i gave up. I put it down to me making a mistake somewhere and me having to find out where, some time. So then, months later, I create a new project. I buy some models from Dexsoft, drag them into my project directory, wait for import, place them into my scene, setup the “diffuse” textures to what they actually SHOULD be and then notice that the scene is waaaaaay to big. I try to set the scale and nothing. No script added to this or any of the models. None of these models dragged onto any scripts. Nothing. These models are new to my project, just dragged into the scene and now I can’t scale them. Again. Just like before. Then I buy a second package from the asset store, import it into my project, drag the object into my scene, try to scale, nothing! No scripts overriding anything.

I am currently using Unity 3.3 and Maya 2011 on a Mac. Anyone else have this setup? If so, would you see if you can create a cube in Maya and then have Unity’s import change it’s scale, please?

Last night I used Autodesk’s FBX converter and converted the models to an earlier version of the FBX format. I still couldn’t scale it.
I then opened one model in Maya and saved it as both OBJ and MB and tried scaling both. Neither one would work.
I opened one in Motionbuilder and converted it to OBJ from there since my Motionbuilder is quite old so I figured it might use an old version of OBJ (if there is such a thing) but same thing…

It seems that scaling is completely broken in Unity. Am I then the only person to have noticed this out of all the 500,000 developers using Unity? That doesn’t sound very possible…

Mine was in one of Unity’s import panels, not in-game. Can’t remember what version of Unity that was; I haven’t seen it recently though I haven’t been dealing with as many complex meshes lately.