Monday, May 20, 2024
Homepage · 3d
 Popular · Latest · Hot · Upcoming
181
rated 0 times [  185] [ 4]  / answers: 1 / hits: 84648  / 10 Years ago, sun, july 13, 2014, 12:00:00

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?



Thanks


More From » 3d

 Answers
10

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.


[#70220] Thursday, July 10, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
devonw

Total Points: 311
Total Questions: 116
Total Answers: 111

Location: Senegal
Member since Fri, Aug 21, 2020
4 Years ago
;