Page 1 of 1

Model scaling

Posted: Thu Jun 23, 2011 8:04 pm
by finale00
I am writing some scripts to scale models by some factor but don't have any ideas how the new coords are calculated, so I decided to take a couple models and scale them up and down and then analyze the results.

At first I thought it was just

new_x = x * factor
new_y = y * factor
new_z = z * factor

(since I am scaling all three axis proportionally)

But then most of the models with a lot of vertices didn't follow that, so now I am not sure if there is an easy algorithm for it.

Anyone know?

Re: Model scaling

Posted: Thu Jun 23, 2011 9:36 pm
by Szkaradek123
There are meshes and models.
Mesh has vertex .
Model has one or many meshes.
For scaling use global transformations with matrices on model.