Three.js – Scale model with scale.set() or increase model size?

What is the best practise for scaling 3d models in Three.js (or other 3d renderers)?

Here is an example I just faced:

I load a model in and realise the size of the model is too small. I then scale the mesh using mesh.scale.set(2,2,2); and it is perfect size.

What action should I take in this scenario, do I leave it scaled like that (programatically scaled) or do I go back to my 3d modelling software and double the size of the model?


It is not a matter of best practice but rather of optimization. If your mesh will always be scaled, it is better if you do the scaling in your modeling software. That simple statement mesh.scale.set(2,2,2); is a matrix multiplication that needs to happen on each frame rendered. Now maybe your scene does not have much geometry in it in which case you don’t care. But as I said it is a matter of optimization. What if your scene had 1000 such meshes or 1000000. That matrix multiplication would need to happen for each one of them. Optimize whenever you can.

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .
Read More:   Pass Node.js environment variable with Windows PowerShell [duplicate]

Similar Posts