GLBasic forum

Main forum => GLBasic - en => Topic started by: JohnnyB on 2019-Jul-20

Title: Scaling 3D models to relative size
Post by: JohnnyB on 2019-Jul-20
Is there a way to scale models to a size of let's say 1x1. X_SCALING apparently only scales from the original size, it seems?
Title: Re: Scaling 3D models to relative size
Post by: SnooPI on 2019-Jul-21
Yes, it's from the original size.

You must scan all the vertices, take the highest value, and use it as the scaling value.

For example, your highest value (x, y, or z) is 250:
Your scaling value = 1/250 = 0.004

X_SCALING 0.004, 0.004, 0.004 
Title: Re: Scaling 3D models to relative size
Post by: JohnnyB on 2019-Jul-22
Thx, great.
Title: Re: Scaling 3D models to relative size
Post by: bigsofty on 2019-Jul-22
As long as you don't have tonnes of models, it's usually easier to load the models into your model editor and scale it there.