Handling scale problems

Problems building or running the engine, queries about how to use features etc.

How to fix model scale problems

Scale the model in the 3d tool
7
100%
Scale the model in-game, using some per-object-type data structure
0
No votes
Other
0
No votes
 
Total votes: 7

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Handling scale problems

Post by :wumpus: »

Let's say you had a game with animals, but, it turns out for some reason your mouse model is much bigger than you elephant model :D What's the best way to fix this?

And, ugm, both my methods require quite some tweaking.. isn't there a way to do it automatically? :)
User avatar
KeaponLaffin
Kobold
Posts: 28
Joined: Sat Jan 17, 2004 7:45 pm

Post by KeaponLaffin »

Scaling each model in your code would be a pain. Doing it at run time in the game seems like too much of a dirty fix. I suggest you change it in the modeler.
User avatar
kjackson
Gnoblar
Posts: 1
Joined: Sat Jan 24, 2004 8:00 am
Location: Tempe, AZ

Always

Post by kjackson »

Always, always, always do the absolute most work you can in your modeler. The less your engine has to do, the better. This is a no-brainer.

Keith
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Re: Handling scale problems

Post by reimpell »

:wumpus: wrote:Let's say you had a game with animals, but, it turns out for some reason your mouse model is much bigger than you elephant model :D What's the best way to fix this?

And, ugm, both my methods require quite some tweaking.. isn't there a way to do it automatically? :)
The blender exporter has a scale button for this type of work ;), but it should also be possible to assign a bone to the model and scale the bone.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

Scaling is done in hardware so actually it's no real overhead for Ogre to do it for you in realtime. However, if you use dynamic lighting, scaling affects the normals too, which can make lighting look overly bright or overly dark. You can fix this by telling the entity to normalise it's normals automatically, but this does have an extra overhead, therefore the best way to resolve this for lit meshes is to rescale in the modeller.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Okay, thanks!

I thought uniform scaling didn't affect normals, but since that is the case there is a very good point in not doing so.

I guess I should just set 1 unit = 1 meter or something and keep that in mind when modelling.