View Full Version : resizing loaded models

05-22-2004, 03:37 AM

ive written a program that loads 3ds files using lib3ds. What im unsure about is becasue the geomtery in any 3ds file can be can be any size, how do i cater for this.

should i use a boundry extenets comparitive value to scale the model smaller or larger, or should i move the camera further away, or this there some genric enviromental scale setting ive missed. This is for use in a simple 3d model viewer program, that should cater for any 3ds file

any thoughts suggestions appreciated

05-23-2004, 11:48 AM
you can scale the model with glScalef at rendering time, or when you load the model, you can just multiply all of its vertices by the scalar you want.

05-23-2004, 04:13 PM
What I find useful is to scale every model to a default size (for example, a height of 1.0 = 1 meter), and then you can specify a size in the units of your 3d world for every model easily (glScalef).