Skip to main content
gamedev.net
🔒 Locked

Model Scaling

Started by Boruki Apr 1, 2011 at 10:07 AM 2 replies 1.5k views
Original Post
Boruki
Boruki
Hi all,

I have a, perhaps, silly question for everyone. It may well be an opinion rather than anything factual but I'm very interested to see what others think/do about this.

As with a lot of folk who try and do game dev on some level I learnt a lot using tutorials. The first type of model I ever had loaded in to a "game" was an MD2 model. One thing that always confused me was that they were always scaled down to 20% of their actual size, and this was the case across the majority of the MD2 tutorials I looked at. Now I structured my "game" around the size of the models, keeping them at 20%, and then later I added support for MD5 models. I scaled these to be of similar size to the MD2's, otherwise everything else would've been out of proportion. I'm trying to make my "game" a bit more stable and keep things easy to use/expand and that is why I'm thinking of trying to remove this constant scaling.

So my question is.. is it bad practice to have ALL the models scaled in this fashion? I can see obvious issues when you want to do any per-poly/per-vertex checks.. as the original data will all be 5x bigger. Does anyone else do this? If so, why?

Thanks for reading!
szecs
szecs
It seems totally meaningless. To be honest, that's why most tutorials are worthless or even harmful. I, for some obscure reason, avoid scaling models (in the program) at all costs. Global scaling of everything just seems stupid. The only reason I can think of is to scale to models to some SI unit: 1.8 m tall humal model = 1.8 units in the code. But why on Earth one would make models (in a model editor) that are in different units? Or why on Earth a tutorial would provide models that need to be scaled? Or if the writer ripped the models from somewhere, why can't (s)he scale it in some free editor? So that the model can be used in the game as it is.

The only place I see scaling useful is when you have multiple instances of the same model with different sizes.
Boruki
Boruki
I agree that it seems pointless and probably wasteful, which is why I was asking .

I was trying to figure out if there was some special reason.. i.e. when the model is drawn on a larger scale it can use up more computational power (large numbers?) or something silly and ridiculous like that.

Maybe it is time for me to do that re-scaling of other world aspects.

Noone else want to chime in? All opinions are appreciated on this.
Buckeye
Buckeye
szecs pretty well summed it up.

I've certainly scaled models during the testing phase, particularly if I "lifted" the model from somewhere and wanted to see how it would fit into the application, and/or wanted to determine what scale to apply. After that, it's a matter of a few lines of code in a utility app to scale and re-export the model.

I can see obvious issues when you want to do any per-poly/per-vertex checks[/quote]
Sometimes. Well-written collision or picking routines will take into account the object scale. However, as you imply, it's much simpler to avoid scaling issues altogether. And it may save an extra matrix multiplication or two here and there.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.