- Home /
Scaling models in Unity - Bad practice?
Up until now, my artist and I have been creating our game levels in 3DS Max and exporting each level as a giant FBX into Unity. Neither of us have any game-design training, so we thought this was the correct approach but recently I've had a couple of people tell me that if we instead export each component of the level into individual FBX exports and then piece together the level inside Unity, we gain optimization benefits. (E.g. using one tree prefab and duplicating it to make a forest will count as only one tree in memory, whereas creating a forest in 3DS Max will count as thirty trees in Unity memory.)
Before we move to doing this, I'm wondering one thing about scaling models. I've read in the past that it's bad to scale a model in Unity as it duplicates the model within memory. Is that still true? For the forest example I would probably re-scale some of the trees to be larger or smaller. But if scaling is bad practice, would it be better for my artist to scale the tree in 3DS Max and then export a few different scaled versions of the tree (e.g., tree_big, tree_small, etc.) so I can avoid any scaling in Unity. This seems kinda ridiculous to me, but is it the more optimal approach?
Answer by GameVortex · Nov 15, 2013 at 10:21 AM
As far as I know, there is no performance issue with scaling as long as you scale the model uniformly, which is when x, y, z all have the same value. The performance problem comes when you scale an object non-uniform for example: (2, 4, 2). Which has an increased cost in both memory and CPU usage. So in general one want to avoid non-uniform scaling in most cases. You can read more about that here: Transform class
Another thing to keep in mind is if you want to have dynamic batching of objects, the objects need to have the same uniform scaling. Read more about batching here: Batching
So, just to answer your question; you should not export different scaled versions of the same tree model, as long as you scale it uniformly in Unity.
Ah, scale it uniformly. Okay, that is definitely reasonable. Great info, thanks GameVortex.