Measurement system
Measurement system
Hi, currently in my proyect i need to implement a system to measure distance between 2 points, i already know how im goin to do this, i just need to know what unit does irrlicht uses when i call:
getDistanceFrom(vector3df);
inches ? cm? ft ? pixels @_@?
i made a test in order to probe this.... i made a 1x1x1 cube in MAX and got the distances between vertex.... but i just cant remember how to change MAX's distance units =P
either answer is welcome xD
Thanks in advance
getDistanceFrom(vector3df);
inches ? cm? ft ? pixels @_@?
i made a test in order to probe this.... i made a 1x1x1 cube in MAX and got the distances between vertex.... but i just cant remember how to change MAX's distance units =P
either answer is welcome xD
Thanks in advance
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: Measurement system
Irrlicht works in Quatloos. If you're not comfortable working in Quatloos, convert to Firkins. There are 12.723 Qualtoos to the Firkin, except in leap years (which this is). Then the Firkin is replaced by the Spoogepuk, which is always expressed in an irrational base, using the Calvinball Conversion Paradigm.radiant wrote:Hi, currently in my proyect i need to implement a system to measure distance between 2 points, i already know how im goin to do this, i just need to know what unit does irrlicht uses when i call:
getDistanceFrom(vector3df);
inches ? cm? ft ? pixels @_@?
Clear enough?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Quatloos! I HAVE SPOKEN!arras wrote:Actually Irrlicht uses ....just UNITS ...you decide what 1unit is.i just need to know what unit does irrlicht uses
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
LMFAO........
OK.... i made a 1m cube in max..... loaded it in irrlicht.... got the bounding box.... and extracted all vectors in it.... and the distances from each other...
got the following result:
d(v0 - v1)= 1
d(v0 - v2)= 1
d(v0 - v3)= 1.4142
d(v0 - v4)= 1
d(v0 - v5)= 1.4142
d(v0 - v6)= 1.4142
d(v0 - v7)= 1.73205
Test 2..... the same bgut this time a 2m cube....
d(v0 - v1)= 2
d(v0 - v2)= 2
d(v0 - v3)= 2.8284
d(v0 - v4)= 2
d(v0 - v5)= 1.8284
d(v0 - v6)= 1.8284
d(v0 - v7)= 3.4641
test 3..... 1.5 m
d(v0 - v1)= 1.5
d(v0 - v2)= 1.5
d(v0 - v3)= 2.1213
d(v0 - v4)= 1.5
d(v0 - v5)= 2.1213
d(v0 - v6)= 2.1213
d(v0 - v7)= 2.5980
test 4: 15m
d(v0 - v1)= 15
d(v0 - v2)= 15
d(v0 - v3)= 21.2132
d(v0 - v4)= 15
d(v0 - v5)= 21.2132
d(v0 - v6)= 21.2132
d(v0 - v7)= 25.9808
well so far.... checks.... seems like irlicht uses meters...
but... not so fast... i changed units in max and used a 10 inch cube...
i wont bore u with details(might be too late already)... it matched te previus results... got .254 meters distance on each edge...
unless something very strange has happened in my tests.... irrlicht uses meters as units
OK.... i made a 1m cube in max..... loaded it in irrlicht.... got the bounding box.... and extracted all vectors in it.... and the distances from each other...
got the following result:
d(v0 - v1)= 1
d(v0 - v2)= 1
d(v0 - v3)= 1.4142
d(v0 - v4)= 1
d(v0 - v5)= 1.4142
d(v0 - v6)= 1.4142
d(v0 - v7)= 1.73205
Test 2..... the same bgut this time a 2m cube....
d(v0 - v1)= 2
d(v0 - v2)= 2
d(v0 - v3)= 2.8284
d(v0 - v4)= 2
d(v0 - v5)= 1.8284
d(v0 - v6)= 1.8284
d(v0 - v7)= 3.4641
test 3..... 1.5 m
d(v0 - v1)= 1.5
d(v0 - v2)= 1.5
d(v0 - v3)= 2.1213
d(v0 - v4)= 1.5
d(v0 - v5)= 2.1213
d(v0 - v6)= 2.1213
d(v0 - v7)= 2.5980
test 4: 15m
d(v0 - v1)= 15
d(v0 - v2)= 15
d(v0 - v3)= 21.2132
d(v0 - v4)= 15
d(v0 - v5)= 21.2132
d(v0 - v6)= 21.2132
d(v0 - v7)= 25.9808
well so far.... checks.... seems like irlicht uses meters...
but... not so fast... i changed units in max and used a 10 inch cube...
i wont bore u with details(might be too late already)... it matched te previus results... got .254 meters distance on each edge...
unless something very strange has happened in my tests.... irrlicht uses meters as units
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
Yeah it really does just use arbitrary units and you can decide what they mean.
What format are you exporting from MAX? That may affect the way irrlicht interprets the units, you could look at the model loader for that format in irrlicht and see if it does anything with a units value read from the file and whether it then uses that to convert anything, or maybe it's just the MAX exporter changing things when it exports.
What format are you exporting from MAX? That may affect the way irrlicht interprets the units, you could look at the model loader for that format in irrlicht and see if it does anything with a units value read from the file and whether it then uses that to convert anything, or maybe it's just the MAX exporter changing things when it exports.
Re: Measurement system
If you speak Chinese. XD, wtf did you wrote there!! LOL!!rogerborg wrote:Irrlicht works in Quatloos. If you're not comfortable working in Quatloos, convert to Firkins. There are 12.723 Qualtoos to the Firkin, except in leap years (which this is). Then the Firkin is replaced by the Spoogepuk, which is always expressed in an irrational base, using the Calvinball Conversion Paradigm.
Clear enough?
P.S
FTW..
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
To be serious for a second, and to echo what others have said:radiant wrote:unless something very strange has happened in my tests.... irrlicht uses meters as units
What this demonstrates is that MAX uses meters as units, not that Irrlicht does so.
Specifically, Irrlicht doesn't care what the modelling tool calls those units. If MAX described a 15-unit cube as being 15 Quatloos in size, then it wouldn't mean that Irrlicht uses Quatloos.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Well.... they are just units... anyway... a 3d model is a bunch of points that makes lines that makes faces that makes solids....right? how does irrlicht knows where to put every point ? irrlicht uses vectors... 3Dvectors has 3 components... x,y,z in some units... if u start at 0,0,0 how far is 0,0,1 ?
this might be world size dependant... if u start at the origin.... how far can u go in irrlicht? this is very confusing..... damh Albert Einstein... so anyway....
if there are no units in irrlicht... if i put a cube from MAX wich is 1m per edge(max measures) and then i add another one made in say..... blender wich doesnt use a metric system.... how does irrlicht knows how big they are?
if there is no answer to this... anyone has any idea about how to implement a measurement system?
btw im using .3ds files from max
this might be world size dependant... if u start at the origin.... how far can u go in irrlicht? this is very confusing..... damh Albert Einstein... so anyway....
if there are no units in irrlicht... if i put a cube from MAX wich is 1m per edge(max measures) and then i add another one made in say..... blender wich doesnt use a metric system.... how does irrlicht knows how big they are?
if there is no answer to this... anyone has any idea about how to implement a measurement system?
btw im using .3ds files from max
You must understand that you do not work here in real world space. Computer modeling, graphic and pretty much anything else is just dealing with abstract data. All consist of just 1 and 0. Is that 1 meter? That depend on you ...how you interpret that. Can be meter, man, your ant or Quatloon.
You did model your cube in Max as 1 meter large ...but that is just Max author who decided that 1 unit in Max is 1 meter ..or you by setting that somewhere in Max setup. If you decide that not 1 unit but 10 units are 1 meter and set it up somewhere in Max you will got 10 units large cube in Irrlicht no mater what Max says.
What you did discover is not that Irrlicht use meters but that Max interpret 1 unit as 1 meter to you. Try different modeling ap or change settings in Max and you might be surprised.
Units are totally abstract, you can use them as meters if you want, or cm or something else. You should just make sure once you make your choice to stick with that for rest of your project.
You did model your cube in Max as 1 meter large ...but that is just Max author who decided that 1 unit in Max is 1 meter ..or you by setting that somewhere in Max setup. If you decide that not 1 unit but 10 units are 1 meter and set it up somewhere in Max you will got 10 units large cube in Irrlicht no mater what Max says.
What you did discover is not that Irrlicht use meters but that Max interpret 1 unit as 1 meter to you. Try different modeling ap or change settings in Max and you might be surprised.
Units are totally abstract, you can use them as meters if you want, or cm or something else. You should just make sure once you make your choice to stick with that for rest of your project.