size in irrlicht[solved]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

size in irrlicht[solved]

Post by omar shaaban »

I am sorry for all these questions but really it is a problem how do i know my size of the mesh in irrlicht example: my mesh is 30cmx30cmx30cm so what unit does irrlicht use cm or meter or inch !!?
Last edited by omar shaaban on Sun Apr 08, 2007 12:55 pm, edited 1 time in total.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

ahh it is a big problem any body have a clue!?
cowsarenotevil
Posts: 19
Joined: Fri Nov 18, 2005 4:14 pm

Post by cowsarenotevil »

I think it just uses nonspecific units. It doesn't really matter as long as you keep whatever camera settings you have relative to the units. Just treat them like centimeters if you want and you should be fine.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

no i want to know the unit bec i am using a tile based system!?
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

there is no unit. You define the unit. If you want the unit to be 1mile it is one mile if you want the unit to be 1 nanometer it is 1 nanometer.
It simply doesnt matter
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

no it matters in postioning the tiles so how they are far from each other i tried some numbers but they got in each other !!
cowsarenotevil
Posts: 19
Joined: Fri Nov 18, 2005 4:14 pm

Post by cowsarenotevil »

What you're really asking is "how many units in Irrlicht correspond to one centimeter in my modeling tool," but unfortunately this is difficult to answer, because not only do we not know what tool we're using, but we don't know what file format you're using, nor exactly how the file is exported, nor how Irrlicht imports that file format. Your best bet is probably trial and error. I would be surprised if factors of ten didn't work, however.
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Post by kburkhart84 »

cowsarenotevil wrote:What you're really asking is "how many units in Irrlicht correspond to one centimeter in my modeling tool," but unfortunately this is difficult to answer, because not only do we not know what tool we're using, but we don't know what file format you're using, nor exactly how the file is exported, nor how Irrlicht imports that file format. Your best bet is probably trial and error. I would be surprised if factors of ten didn't work, however.
I agree here. A unit is just that, a unit. In max/blender/whatever you use, if your model is 10 units tall, then in Irrlicht, it should be ten units tall, unless either the exporter or loader scales it, or YOU scale it yourself. Now, depending on the camera, you might barely see the object or it make take up the whole screen, though it is the same object. Try it in meshviewer and you'll see what I mean. For example, .md2 meshes that came with quake2 were hugh, like 80-100 units tall. But I don't know if Quake2's engine scaled them down. But if I were to use the model in my code, I would have to because that is like one third of the world. So it depends on you. Try different scales and see what works, then use it.
Robert Y.
Posts: 212
Joined: Sun Jan 28, 2007 11:23 pm

Post by Robert Y. »

If you have tiling problems, you could use the bounding box to get the dimensions and compare it to a standardized model and rescale if necessary.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

Well i am using 3d studio max 9 and exported in .x or 3ds the same size!!
ok i will try to get it by luck :roll:
belfegor
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Post by belfegor »

You can test it easely:

make box in MAX width = 50 cm; lenght = 50 cm; height = 50 cm;

and then in irrlicht:

adCubeSceneNode(50), put them close together and compare differences.

I dont use "cm" as units in MAX.Looks like default ones in MAX match irrlicht units.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

yup i found it irrlicht uses metrics!! :lol:
Robert Y.
Posts: 212
Joined: Sun Jan 28, 2007 11:23 pm

Post by Robert Y. »

No, it doesn't. But you do apparently. :lol:
GuerillaSoftworks
Posts: 83
Joined: Wed May 23, 2007 6:11 pm

Post by GuerillaSoftworks »

lol, after reading through this i fell as if my head is going to explode. What exactly don't you get about there just being units? Not centimeters. Not feet. Not miles. Just units. Irrlicht certainly doesn't "apartently use metrics", it uses units. How 3D packages and irrlicht represents those units though, is the problem. If you model something 10 units long, stick that into ur app, create a cube node or something in irrlicht that is 10 units and then compare their lengths. Fiddle around untill you get them exactly the same size. From the sizes of boths nodes then, you can find a ratio that you can use straight away whenever, but ull need to do the tedious fiddling now though.

Good luck.
Guerilla Softworks

New Guerilla Softworks website under construction - http://guerillasoftworks.awardspace.com
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Fun reading.
Post Reply