RayCast vs MultiBody vehicles

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: RayCast vs MultiBody vehicles

Postby Sash » Wed Apr 07, 2010 5:31 pm

Stucuk,
Currently I'm widely using Irrlicht (C++) and GLScene (Pascal). Both are opensource. I studied their internals. There's no such entity as "distance units" there.
At least in vector geometry and basic primitives (including meshes) areas. If you had a chance working with any, can you provide a code reference with "distance units" ?

Moreover
Stucuk wrote:If Irrlicht is using 32 units = 1 meter then you will most likley have objects falling slower than they should, etc.

According to Newton Laws (and I belive to NGD too) any object is falling (we' re about classic free falling bodies with just only gravity taken in account) with the same aceleration.
It means any two objects (absolutely no matter of size, units and even mass) are falling with the same speed at the same moment. So it cannot be slower by the reason of "wrong size".

Again, please check for yourself.

Sorry, this discussion becomes an useless offtopic. According to my experience and public source code I just wanted to help Mag-got, by pointing him the problem is elswhere but not in "Irrlich numbers".
If you belive I'm wrong, please prove your words by facts. Otherwise please stop misinform people. No offence.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby Stucuk » Thu Apr 08, 2010 12:03 am

Sash wrote:According to Newton Laws (and I belive to NGD too) any object is falling (we' re about classic free falling bodies with just only gravity taken in account) with the same aceleration.
It means any two objects (absolutely no matter of size, units and even mass) are falling with the same speed at the same moment. So it cannot be slower by the reason of "wrong size".


If you have two identical worlds with the same gravity but a different distance scale then the world with the larger scale will appear to have objects falling slower. Most engines have a standard scale for there levels which isn't in any recognised units of measurement and is defined by the majority of the community (Noone disputes that you can use whatever you like as long as you make the player character have the appropriate size as well), if you use that unit of measurement with gravity of 9.8 (Like most would) and appropriate mass the object will take longer to hit the ground than it should.

Using realistic values is what matters. The standard units of measurement are Meters for Distance, Kilograms for mass and Meters per second^2 for gravity. As long as the relation between the 3 stays the same then your simulation should look fine assuming you don't run into floating point errors. For example if you had the Distance in Miles and added boxes that were say 1x1x1 centimetres then your simulation would proberly have errors in it.

Sash wrote:Otherwise please stop misinform people.


Before this post i haven't talked about gravity or mass scales because its generally assumed that people will use 9.8 for gravity and realistic(ish) values for the mass . I have only ever stated that using the Wrong distance scale can cause errors, so i fail to see how im misleading people as using the wrong scale for distance and not taking it into account with the gravity and mass you will have errors.

Sash wrote:
Mag-got wrote:irrlicht's units are 32 times bigger than newton's

In fact this is not true. Both are using the same floating-point values.
Single or double - just a matter of precision. It's up to you how to interpreat them - either be it
metric or inches/feets.


Your "It's up to you how to interpreat them" is what id call misleading, as your basically saying that people can use any old values and they will get a perfect simulation.

P.S GLScene is rearly a library rather than a Game Engine. So i doubt it has its own Level Editor or Player Character classes(Meaning its not going to have any standard distance scale like a proper Game Engine).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: RayCast vs MultiBody vehicles

Postby Sash » Thu Apr 08, 2010 3:08 am

This is at least thrice when you wrote "most engines do have units ..." while speaking particullary about Irrlicht.
I'm just asking - prove your words by reference of their code (which is public and freely available to everyone). You still didnt.

I beleve it's useless to continue this discussion until you do.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby JernejL » Thu Apr 08, 2010 4:09 am

A lot of engines do map things to 1 unit = 1 meter purely to simplify transition of real world measurments into a game (mainly character, vehicle, etc.. modelling)

Also to reprisent a ordinary interactive object from a humanoid simulated world 1:1 unit/meter mapping works very optimally to use the useful range of the 32 bit floating point math routines, (too small or too big and fpu math starts to break down) this is again just a convinience thing and not standardized in any way.

STILL, 1:1 is not a standard of any kind, and a lot of GAME engines do not use such relation (irrlicht, unreal engine, etc.. and i think even the quake based engines don't )

I suggest you both to open a discussion on this on gamedev or some other forum and see how other game engine developers respond and what they use.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: RayCast vs MultiBody vehicles

Postby Sash » Thu Apr 08, 2010 10:13 am

Personally I'm (but not Irrlicht) also using an assumption
1.0 float value for both Irrlicht and Newton = 1.0 meter.
But this is not a standard, this is just my own assumption (yes, it is convinient and very common among developers) but not hardcoded anywhere in Irrlicht.

It's just works for me, so I'm not going to participate in this discussion, well unless we'll return to "RayCast vs MultiBody vehicles" :)
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby Stucuk » Thu Apr 08, 2010 12:16 pm

Sash wrote:This is at least thrice when you wrote "most engines do have units ..."


Maybe you should look at the games on the market. You will find that most of the game on the market have level editors which are not using a 1 meter scale or anything realistic. Even if you look at general map editors you will generally find they are not in a meter scale. If you look at the major commercial engines (I.E Source, ID Tech, Unreal) they don't use realistic scales.

Sash wrote:while speaking particullary about Irrlicht.
I'm just asking - prove your words by reference of their code (which is public and freely available to everyone). You still didnt.


I havn't stated anything about what Irrlicht uses for the simple reason that i don't care. I don't use it. I have never stated (Please find a quote where i do) that Irrlicht uses any scale so i have nothing to prove with its source.

Sash wrote:I beleve it's useless to continue this discussion until you do.


Its been useless from the start. All i wanted to do was point out that using the wrong distance scale with standard gravity/mass (Which unless people state there not using its generally safe to assume) can cause errors in the simulation and you continually ignore that point stating that it doesn't matter(When it does).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: RayCast vs MultiBody vehicles

Postby Sash » Mon Apr 12, 2010 1:06 pm

Stucuk wrote:All i wanted to do was point out that using the wrong distance scale with standard gravity/mass (Which unless people state there not using its generally safe to assume) can cause errors in the simulation and you continually ignore that point stating that it doesn't matter(When it does).


Sorry I'm in again, but I never spoke about "some game engines", I just always pointed to the particular one - Irrlicht (just because it was previously mentioned here).
In fact Irrlicht isn't even a game engine, but rather a graphics engine, and I believe (according to my practical experience) it's not tied to the RW distance units, but to the (video) hardware units: you pass (to the GPU) 3 vertex coordinates, you set your viewing frustrum matrix (camera) and you see a triangle (its projection to screenplane). Vertex coordinates are raw float numbers, not meters nor feets. That's how it works.

I didnt even argue about importance of proper scale between distance and force - just because it seems very obvious: there is always some scale ratio presents: even if not explicitly defined it just equals 1.0. Everyone is free to adjust it, whether by implementing distance or force scaling according to their "feel of realism".

If we'll return to initial (pre-flame) message - it was about "Irrlicht numbers" - that's the only statement I'm disagree with. So if you really dont care about Irrlicht - just ignore it, as I am agree with the statement about importance of scale.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby Stucuk » Tue Apr 13, 2010 2:40 am

Sash wrote:Sorry I'm in again, but I never spoke about "some game engines", I just always pointed to the particular one - Irrlicht (just because it was previously mentioned here).
In fact Irrlicht isn't even a game engine, but rather a graphics engine


Since it has systems to deal with stuff like Quake 3 BSP's, Model Animation etc. As well as majority of the projects made from it being games themselfs, as well as the tutorials being game related, its a game engine.

Sash wrote:I believe (according to my practical experience) it's not tied to the RW distance units, but to the (video) hardware units


I have never stated that it or any other game engine is tied to real world distance units. All i have stated is that most engines have a default scale that is set by things like the default map format. Quake 3 BSP's (Which seems to be one of the default map formats) have there own distance units (Which are based on the height of a Quake 3 character).

Sash wrote:you pass (to the GPU) 3 vertex coordinates, you set your viewing frustrum matrix (camera) and you see a triangle (its projection to screenplane). Vertex coordinates are raw float numbers, not meters nor feets. That's how it works.


Why do you always state the obvious? Noone disputes how a Graphics Card works or the Graphics Cards Pipeline. Your going off topic. While you keep trying to "prove" that any 3d engine can physically render any distance scale, its besides the point as NOONE disputes that. Half-Life 2 could render in any distance scale you want, but its got a default scale set by its level editor, the player character, etc.

Sash wrote:I didnt even argue about importance of proper scale between distance and force - just because it seems very obvious: there is always some scale ratio presents: even if not explicitly defined it just equals 1.0. Everyone is free to adjust it, whether by implementing distance or force scaling according to their "feel of realism".


Its not obvious. Alot of people proberly don't think about the size of objects, that if your using 9.8m/s^2 for gravity and realistic mass, that you need to scale the world down. To me a object thats size 10 doesn't sound large, but given that that would actually be 10 meters it is large.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: RayCast vs MultiBody vehicles

Postby Sash » Tue Apr 13, 2010 8:42 am

Sorry, if my English is not enough clear (not my mother's language) - but I said - I'm only about Irrlicht. And only because it was mentioned here.
Whatever you'll say, authors of Irrlicht and its community supposed it is still just a graphics but not GAME engine http://irrlicht.sourceforge.net/faq.html#gameengine
And yes, I forgot, you dont care.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby Stucuk » Tue Apr 13, 2010 11:32 am

What they class it as is besides the point. If 99% of the materials, tools, and user projects for it are game related then its fair for people to compare it to game engines. Noone is disputing that you have been talking about Irrlicht all the way through this. Other engines were only mentioned because you stated that "Most game engines have there own distance scale" was wrong.

Your statement that you can use any distance scale when people mentioned that there levels were proberly using an unrealistic scale (But most likely realistic gravity+mass) was misleading and the reason i stated that the size of the world matters. It has been the ONLY point i have been trying to make, everything else is irrelevant.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: RayCast vs MultiBody vehicles

Postby Sash » Tue Apr 13, 2010 2:57 pm

I see no reason to continue with it, as I prefer practical facts (source code) over philosophy.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: RayCast vs MultiBody vehicles

Postby JernejL » Tue Apr 13, 2010 3:41 pm

I am very sorry i had to close this topic, the current debate is pointless and off-topic, if someone wants to reply to the actual topic PM me and i'll unlock it, but you are free to argue over whatever units issue over private messages.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron