Newton 2.0x Archemedia Open Beta

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton 2.0x Archemedia Open Beta

Postby Dave Gravel » Tue Sep 01, 2009 11:39 am

winstrol
I'm not sure what is the version that you use.
I have work on many version and no one is final and polished, all is only alpha tests and i'm not super experimented under c++.
In my code the torque effect don't exist it's only a fake thing to make rotate the visual only and it is not 100% right.
About the pitch angle I use my personal command and it can need some fix too.

Code: Select all
   void ApplySteering (dFloat value)
   {
      dFloat vEngineSteerAngle = GenerateTiresSteerAngle( value );
      dFloat vEngineSteerForce = GenerateTiresSteerForce( vEngineSteerAngle );
      // Set the both generate steer angle and force value's
      SetCustomTireSteerAngleForce( 0, vEngineSteerAngle, vEngineSteerForce );
      SetCustomTireSteerAngleForce( 1, vEngineSteerAngle, vEngineSteerForce );
      if (vId==1){
         SetCustomTireSteerAngleForce( 2, -vEngineSteerAngle, -(vEngineSteerForce/2) );
         SetCustomTireSteerAngleForce( 3, -vEngineSteerAngle, -(vEngineSteerForce/2) );
      }
   }


DGRaycastVehicleGenerateTiresSteerAngle
DGRaycastVehicleSetCustomTireSteerAngleForce

Your surely better to wait Julio work.
Because my version is only some personal tests and I have let's it public for let's Julio see the way that I use.
On this way Julio or other users can make a better solution and fix a lot of my error and math method.

Marc

I can't say sorry but currently I don't get this problem again like before.
I remember to have get this problem under c++ with a little personal engine, after have change some stuff on my timing method the glitch have go.
The major part of the times I have get this problem explained upper under Directx application.
Maybe this is not the same thing but the behaving explain upper seen the same.
Currently I work under c++ and under delphi pascal and I don't get the problem anymore.
I'm not 100% why it have go, but I don't have update any drivers, the only difference currently I don't use DX application at all.
Edited:
Maybe the directx application have more relation with PCI and the bug explain by microsoft.
I remember by running some directx game or application the glitch begin to happening like delfi explain upper.
Currently I use only GL application and I don't get the problem, it is in relation i'm not sure.
One thing that I remember when the problem happen, if after I run dx or gl app the problem is present on both and I need to reboot the computer.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 801
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Tue Sep 01, 2009 1:48 pm

Delfi wrote:
Marc wrote:For the performance counter issue, I've read about it from time to time and I worte a program that - as far as I understood this issue - should test if a system has that counter rewinding problem. However, I never found a system that failed that test - weather AMD or Intel.


The performance counters seem unsynced between cores, so if your process uses 2 threads and you use a single timer object, then you can get into trouble. You'd say it only appears when code on 2 different cores attempt to use QueryPerformance*() as if there was only 1 system timer.
Not sure what the drivers do; perhaps reroute the timing to a single core.

You can try to test things by using Task Manager and use 'Set Affinity' for an .exe to only 1 core.

I've never seen Windows do any hopping over cores for running processes (older SGI's used to, I think, but that was on IRIX), so if you're just running on 1 core, everything should be ok.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Tue Sep 01, 2009 2:34 pm

Just in case, it a good thig I removed the per thread conter in the engine.
so the counter in teh engione now are called from the engine main thread, It was to complex before.

So if some one uses the windows performance counters as the callback for the engine profiler countersm, it is safe because they are all called from the engine main thread.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby Marc » Tue Sep 01, 2009 10:18 pm

rvangaal wrote:The performance counters seem unsynced between cores, so if your process uses 2 threads and you use a single timer object, then you can get into trouble. You'd say it only appears when code on 2 different cores attempt to use QueryPerformance*() as if there was only 1 system time.

Ic. The QueryPerformanceCounter msdn entry says something similar. Is this the same issue like http://support.microsoft.com/kb/274323/en-us ? Because that one doesn't mention anything related to multicore systems. Is the code provided there sufficient to also detect the multi core issue - if they are different issues at all?

Maybe someone who experienced time rewinds before could run that code and see if it signals it?
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Newton 2.0x Archemedia Open Beta

Postby Dave Gravel » Wed Sep 02, 2009 12:05 am

You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 801
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Newton 2.0x Archemedia Open Beta

Postby Marc » Wed Sep 02, 2009 7:11 am

Ok I ran this on 3 pcs of mine, for about 1 minute on each (how long are we supposed to wait?) and non displayed an error message. The cpus were:

Intel Core 2 Duo 6600
AMD Athlon 64 X2 Dual Core 3800+ 2Ghz
AMD Athlon XP 2000+

So does this mean these systems have no counter rewinding issue whatsoever or doesn't this code test all possibilites for counter rewinding?
Millenium Project Enterprises - Hobbyist Gamedev Group http://www.mpe-online.org
Walkover is now on Steam => http://store.steampowered.com/app/348700/
User avatar
Marc
 
Posts: 281
Joined: Sun Mar 14, 2004 4:07 pm
Location: Germany

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Wed Sep 02, 2009 7:22 am

Julio Jerez wrote:Basically the idea it to generate faces with thickness in a procedural way. It is a two two passes process and You can use a collision tree as a computation geometry tool helper. For each flat face copy the face to the collision tree with a inverted winding, for example if a face has indices 1, 3, 4 you add it 4, 3, 1
...in this secund part what you do is a normal extruction of the silhouette on each of this face alone the face normal
....
I hope this is not too intrusive and if you did not understand ask me I can post some pseudo code.


Thanks for the extrusion idea. However, it seems the 3D modeler must be involved anyway. One track I have had just 1 side, and adding its flipped version (inverted winding) worked ok there. However, another track has a wall (of zero thickness) but modeled using 2 polygons (explicitly defining the inverted winding polygons). Currently I don't see a way to detect nicely the 2 sets of polygons are related, and extrude them. I guess I need to convince modelers to not make infinitely small walls/fences like that; just that they always need to create thicknesses. All understandable from a collision point of view.
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Wed Sep 02, 2009 7:30 am

Marc wrote:
rvangaal wrote:The performance counters seem unsynced between cores, so if your process uses 2 threads and you use a single timer object, then you can get into trouble. You'd say it only appears when code on 2 different cores attempt to use QueryPerformance*() as if there was only 1 system time.

Ic. The QueryPerformanceCounter msdn entry says something similar. Is this the same issue like http://support.microsoft.com/kb/274323/en-us ? Because that one doesn't mention anything related to multicore systems. Is the code provided there sufficient to also detect the multi core issue - if they are different issues at all?


It seems that one relates to PCI interrupts blocking the system or such, at which point Windows needs to leap the performance counter. No idea why that would need to be the case, sounds like a design flaw. ;)
But I think each core has its own counter, so the code from the MS link won't detect that. It's more that if you have multiple threads calling QueryPerf*() that they won't get the same values if the threads are running on their own core. So Julio's remark about the functions being called only from one thread sounds like it could gotten rid of some hard-to-track problems (mostly you rely on correct timing).
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

Re: Newton 2.0x Archemedia Open Beta

Postby JernejL » Wed Sep 02, 2009 8:13 am

Each core always has its own performance counter, but the whole QPC depends on windows which counter it'll return - it may use a chipset counter.. or a cpu one, and each has its own flaws.

I made my game to be able to function on gettickcount, that counter is as reliable as you can get, and i have wrapper functions, which can use QPC and return proper result, i wish however that i could access the precise hardware timers used in sound cards, i don't understand how nobody uses that, those timings are always precise, stable and have no real issues..
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0x Archemedia Open Beta

Postby winstrol » Wed Sep 02, 2009 8:30 am

Dave Gravel, Julio Jerez
Ok thank you guys, now I understand what is going on - just library is not finished. So I'm waiting.
Julio, can you forecast when can it be done?
User avatar
winstrol
 
Posts: 30
Joined: Fri Jul 24, 2009 9:57 pm

Re: Newton 2.0x Archemedia Open Beta

Postby armokal » Wed Sep 02, 2009 9:02 am

Julio Jerez wrote:
armokal wrote:I have a Core2 Duo, 1.66GHz. I have never tested on Phenom and other AMD CPUs.
Julio
Here is a link to download the project http://67.204.55.28
It will work as long as you have a GL 2.0 capable driver.
All other DLLs are included, including Newton 2.00 and 2.08


Ok I loaded the map and I see a bolder, few sheres and a box.
I can move around the bolder wit the keys, and I can kick the other objects.
when I hit the Box it goes up into the air, when I hit the other balls they just move.

what is the problem? and how I can reproduce it.


Reproducing it should not be too difficult. Just try to kick one of the smaller balls towards the largest ball.
Also, it seems to be related to buyancy. I got rid of buoyancy with 2.00 and things work fine.
For 2.08, even without buoyancy, object fall through the ground.
armokal
 
Posts: 22
Joined: Fri Oct 27, 2006 10:03 pm
Location: Canada

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Wed Sep 02, 2009 11:20 am

I dio no see it happening.
I push several ball to one of the pit, and they are all at the bottom.

I see you have some very wacked values for mass and inertia because some time when I touch a body it jump unrealiscally all over the place.
can you make the vidio that shows exactly the problem happening?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby armokal » Wed Sep 02, 2009 12:28 pm

This one shows it best, but it is with Newton 2.00
http://www.youtube.com/watch?v=SvYsLHujh9Q
armokal
 
Posts: 22
Joined: Fri Oct 27, 2006 10:03 pm
Location: Canada

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Wed Sep 02, 2009 1:41 pm

In the vidio I do not see what is wrong, I see that you you touch the ball the go up, whet is the collison problem you are seeing?
Plus you need to do it using 2.08

Are you pulling my legs here?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby winstrol » Thu Sep 03, 2009 9:07 am

Julio, can you forecast when will this functions:
DGRaycastVehicleGenerateTiresSteerAngle
DGRaycastVehicleSetCustomTireSteerAngleForce
be add to the library ?
User avatar
winstrol
 
Posts: 30
Joined: Fri Jul 24, 2009 9:57 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron