IrrNewt irrlicht\newton framework >> SVN access
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
well i ques it is
Well nice project, does the Physics needs much CPU time?
cause his problem wasn't 1.3 relatedTheGameMaker wrote:1: its irrlichts fault(i use irr 1.3)
Well nice project, does the Physics needs much CPU time?
Compete or join in irrlichts monthly screenshot competition!
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
Blog/site: http://rex.4vandorp.eu
Company: http://www.islandworks.eu/, InCourse
Twitter: @strong99
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
the latest version 0.3 is compilable and work with irrlicht 1.3. i have tested it.
i haven't done performance tests, but physics require a bit much CPU time than a scene not affected by physics. however there is not a great difference on a medium CPU.Well nice project, does the Physics needs much CPU time?
Why do you use this constant? I've already pulled IPhysics up for using this.//!Convert a position from newton to irrlicht
const irr::f32 NewtonToIrr = 32.0f;
This constant was added to a specific demo for a specific Quake3 map in order to bring collision geometry into an apparently "better" range of floating-point precision. Applying it generally does not make sense. My level may already be scaled - your scaling would then destroy the very precision your trying to "enhance".
As I said to the IPhysics guy, this should be user-definable via something like setIrrToNewton(irr::f32 irrToNewton).
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
newton and irrlicht have different scale values. newton works with standardized units (meters, newtons, ext..) irrlicht not. 1 unit in irrlicht don't correspond to 1 meter. 1 unit in newton may correspond to 1 meter. the two constants convert irrlicht units into stadardized units and back.
Of course, if you set both constant to 1 (make them ineffective) newton will still work, since the distance between two vectors in the two libraries are the same, also in different scale values; but you won't get realistic results when appllying forces.
if you set both constants to 1, since the units we used are not standard (no meters, no newtons, exc..) we get incorrect result in physics calculations.
If i didn't clear, try to recompile irrnewt with both constants to 1. in ALL the examples the bodies will react lots slower to forces (when a force is apply) and not due to FPS, but due to incorrect calculation of the forces.
We can correct this to simply improve forces (of course), but since some programs already use irrnewt (and will need to be re written) and teorically set the two constants to 1 is not correct, i think leave the two constants is the best solution
Of course, if you set both constant to 1 (make them ineffective) newton will still work, since the distance between two vectors in the two libraries are the same, also in different scale values; but you won't get realistic results when appllying forces.
if you set both constants to 1, since the units we used are not standard (no meters, no newtons, exc..) we get incorrect result in physics calculations.
If i didn't clear, try to recompile irrnewt with both constants to 1. in ALL the examples the bodies will react lots slower to forces (when a force is apply) and not due to FPS, but due to incorrect calculation of the forces.
We can correct this to simply improve forces (of course), but since some programs already use irrnewt (and will need to be re written) and teorically set the two constants to 1 is not correct, i think leave the two constants is the best solution
Then how come my stuff works without hacky constants?
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
-
- Posts: 269
- Joined: Tue Oct 31, 2006 3:24 pm
- Contact:
quote from my previous post:Then how come my stuff works without hacky constants?
when "unrealistic result" doesn't mean that you apply a force in y direction and the body move on x direction but, as explained afterwards, incorrect calculation of the force (like less acceleration than in the real world)Of course, if you set both constants to 1 (make them ineffective) newton will still work, since the distance between two vectors in the two libraries are the same, also in different scale values; but you won't get realistic results when appllying forces.
The issue of Newton using 1 unit = X is not directly relevant. The issue is one of numerical precision. Floats have roughtly 6 digits of precision after the decimal (depending on things like the Floating Point Control Word). Scaling a level by 32.0f is only for one specific Quake3 level in order to help precision (this is stated in the Newton physics forum). To scale everything by 32.0f is not going to help precision in all instances and will have a deleterious effect in some maps.
If I use IrrNewt or IPhysics myself I will recompile to set this constant to 1.0f.
If I use IrrNewt or IPhysics myself I will recompile to set this constant to 1.0f.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Its not a matter of which is prettier, i think something i was reading a while ago said that physics engines operate faster on bigger numbers, i think its to do whith the parts that need high percision like comparsisions. The inherient errors in floating points calculations are less significant when working with larger numbers (the % error is smaller) so there is less need for slow operations like fabs and stuff.
These things should be user definable but the default should be the best not the prettiest. Infact he could make it 1.0 then secretly multiply by 32 inside the library lol.
These things should be user definable but the default should be the best not the prettiest. Infact he could make it 1.0 then secretly multiply by 32 inside the library lol.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p
Take a look at this (the A Matter Of Precision section):Luben wrote:Sio2, do you know when one should use the ratio then? Like, how do we know if we need it for our scene?
http://home.comcast.net/~tom_forsyth/blog.wiki.html
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Numerical precision is just one of those things that you have to take into consideration. There's classic examples such as Windows resetting the FPCW behind your back when it loads a dll and gpu shader passes that differ from FFP (Fixed Function Pipeline) passes because a different path is taken in HW.omaremad wrote:Its not a matter of which is prettier, i think something i was reading a while ago said that physics engines operate faster on bigger numbers, i think its to do whith the parts that need high percision like comparsisions. The inherient errors in floating points calculations are less significant when working with larger numbers (the % error is smaller) so there is less need for slow operations like fabs and stuff.
These things should be user definable but the default should be the best not the prettiest. Infact he could make it 1.0 then secretly multiply by 32 inside the library lol.
At work I recently had a big cpu hotspot. I got roughly a 6x speedup by recoding with SSE2 and two threads for multicore cpus (I couldn't get 8x due to SSE data alignment issues). But I had to go back and ensure that the "float" code didn't produce significantly different results on machines without SSE2 and with only one core.
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
That's interesting reading sio2, but i didn't get how we are supposed to determine if we lose precision from having to numbers which are too far appart(Which is what i understood to be the problem).
By the way, what do you work with?
By the way, what do you work with?
Last edited by Luben on Wed May 02, 2007 4:14 pm, edited 1 time in total.
If you don't have anything nice to say, don't say anything at all.