Blender to Ogre Scale
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
Blender to Ogre Scale
ogre has a different scale compared with modellers doesnt it?
if i wanted a model that was 1 meter tall in ogre, how big would i have to make it in blender?
if i wanted a model that was 1 meter tall in ogre, how big would i have to make it in blender?
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
Re: Blender to Ogre Scale
This depends on your camera settings. But you can turn it the other way round: just use 1 blender unit and export your model unscaled. Assuming that people usually use 1024x768 pixels for games and it is common to have a monitor with 96 dpi at that resolution, you have that 768 vertical pixels correspond to (768 dots)/(96 dots/inch) = 8 inch = 8*2.54 cm. Hence, if your model should be 1 m tall, just make sure your camera and viewport settings display 1 vertical Ogre unit as 100/(8*2.54)*768 pixels.Chris Jones wrote:if i wanted a model that was 1 meter tall in ogre, how big would i have to make it in blender?
Last edited by reimpell on Fri May 20, 2005 4:10 pm, edited 1 time in total.
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
The above calculation wasn't too serious. Its intend was to demonstrate that there is no intrinsic unit for distance measures within a rendering engine. This is even more true as Ogre does not come with an included physics engine. What you are probably interested in is a relative size to existing content. As we don't know what content you are referring to, we can't answer your question. BTW you can query your mointor's display size using dcc. This way you can display your meshes with a given ratio to real meters.Chris Jones wrote:so, i have to program my camera and viewport to have different values related to what resolution they have? what if they have a different dpi for the monitor?
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
- Chris Jones
- Lich
- Posts: 1742
- Joined: Tue Apr 05, 2005 1:11 pm
- Location: Gosport, South England
- x 1
ohh, im stupidly confused now
if i make a model in blender, it will be a different size in ogre, so i keep the same sizes, which means 1 unit isnt 1 meter, relative to a model, which means if an object is moving 1meter per second, i cant move it 1 unit, cos relative to its size, 1 meter might b bigger or smaller
can some1 please clarify how im going to do this, also, dont physics engines rely on units etc?
if i make a model in blender, it will be a different size in ogre, so i keep the same sizes, which means 1 unit isnt 1 meter, relative to a model, which means if an object is moving 1meter per second, i cant move it 1 unit, cos relative to its size, 1 meter might b bigger or smaller
can some1 please clarify how im going to do this, also, dont physics engines rely on units etc?
- DWORD
- OGRE Retired Moderator

- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
Err... what do you mean by this?Chris Jones wrote:if i make a model in blender, it will be a different size in ogre(...)
If for instance you choose that 1 unit in the engine equals 1 metre in the real world, then to create a 1 metre tall crate, you just create a crate in blender that is 1 unit tall.
Then if you want to move that crate by 1 m/s (in real world units), you just move the box 1 unit/s in the engine. It's that simple.
BTW, physics engines don't know about units either, they just operate on the relations between different physical sizes. E.g. you don't have to use metres for distance, kilograms for mass, or even seconds for time; all that matters are the actual values.
Last edited by DWORD on Fri May 20, 2005 6:33 pm, edited 1 time in total.
- DarkSeraph
- Halfling
- Posts: 85
- Joined: Thu Apr 28, 2005 5:42 pm
-
reimpell
- OGRE Contributor

- Posts: 570
- Joined: Mon Mar 01, 2004 10:35 am
- Location: Hamburg, Germany
Try to avoid error amplification, e.g. avoid multiplying very small numbers with very large numbers. Also, simplify your math expressions before you implement them and use stable algorithms. Otherwise you get problems like sqrt(2.0)*sqrt(2.0). Python example:DarkSeraph wrote:Is it smarter to use a larger scale, so you can have more detail easily placed in an object/model?
Code: Select all
$ python
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.sqrt(2.0)*math.sqrt(2.0)
2.0000000000000004
>>> - Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
So can I scale models differently in a project I am working on using Ogre? Or do I have to do it in the modeler and then export them as 2 seperate models, even though they are the same thing? That would be a huge hassle.
What I mean is, can't I just have one model and tell Ogre to scale it differently in different instances?
What I mean is, can't I just have one model and tell Ogre to scale it differently in different instances?
-
Drew_Benton
- Halfling
- Posts: 95
- Joined: Sun Apr 03, 2005 6:58 pm
Yes. When you attach the model to a node, you can scale that node how you choose. If you look at the models included with Ogre, they are quite huge when scaled <1,1,1>, so what I do is just scale using <.05,.05,.05> and viola, perfetly sized characters for me. You can do the same for how you need it to beJerky wrote:So can I scale models differently in a project I am working What I mean is, can't I just have one model and tell Ogre to scale it differently in different instances?
- neocryptek
- Gnome
- Posts: 335
- Joined: Sat Mar 01, 2003 11:21 pm
- Location: Idaho, USA
- Contact:
Though note that this screws over the normals, so lighting will look funky. Unless of course you tell Ogre to recalculate them, but that useless work that could have been done in the preprocess stage. (Entity::setNormaliseNormals(true) or something IIRC)Drew_Benton wrote:Yes. When you attach the model to a node, you can scale that node how you choose. If you look at the models included with Ogre, they are quite huge when scaled <1,1,1>, so what I do is just scale using <.05,.05,.05> and viola, perfetly sized characters for me. You can do the same for how you need it to beJerky wrote:So can I scale models differently in a project I am working What I mean is, can't I just have one model and tell Ogre to scale it differently in different instances?
Though id definitly use that for getting the scales to all look right first, then re-export scaled versions to match with your modeler.
