Is newton really scalable?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Is newton really scalable?

Postby PJani » Sat Sep 18, 2010 2:52 pm

In which mode are you building(Debug/Release) your application because ogre is very slow in debug mode. I can say that. First disable any compositors shadows everything that can slow down. and compile in release mode then you should test your code.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 3:32 pm

to PJani: release of course, disabling everything doesnt help, with only shaded material, all other effects off fps is 300-200 but with multiple contact still drop horribly

to Julio: i think kallaspriit has it, ill let him know
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Mon Sep 20, 2010 9:20 am

Ok I update OgreNewt to SDK_2.25
http://www.newtondynamics.com/downloads/UpdateToNewton25_VS9.patch

you need to download 2.25 from this download, before you apply the patch
http://www.newtondynamics.com/downloads/NewtonWin-2.25.rar
SDK 2.25 is not in the download yet because there a bunch of demo that at no ported to use the new file format yet.

Basically you apply the patch and the you can call a new function in OgreNewt
Code: Select all
class World {
   …   
            void SaveAlchemediaPhysics (Ogre::String name);
}

Later I will add more funtionalyty, bu this si sufficient to exports and simple scenes made out of rigid bodies and simple collision shapes.
This will be the new way the Newton will be debugged, by modeling scene in a data drive way.
To see if you scene look right there is also a Blender Plug-in you can try loading the scene in blended before you posted.
Then we can find out what is wrong if there is anything wrong that is.
SaveAlchemediaPhysics does no export the visual mesh, just the physics and use collision shape as visual proxies,
There will be a function to save the complete scene, Graphics and Physics.
The idea is the people can import, scene into the Newton Editor, and model the Physics and graphics world like a Level editor.
The editor is in early stage still, but the basic functionality is there.
This week I am adding the LUA integrations as all of the functionality of the editor will be Script driven.
It will also support C++ or other languages but I believe the interpreted scrip is a better way to extend it.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Tue Sep 21, 2010 1:28 pm

Hi, finally got to try it :)
here is my exported world after scene+player creation
http://hotfile.com/dl/70865947/e3573e8/myWorld.html
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Tue Sep 21, 2010 2:49 pm

Ha awesome, I download it and I was able to load it in teh editor, and als in the newtondemo.exe

The scene doe not do anything at all, tehr codul be a couple of reason for tha now.
-the coul be bug in eth fiel format, tehi sis teh first time I used outside of my oyej simple tests.
-I cannot determina nwo what is going on because I am not in fron on my PC at home, and can only run the Binary.
-I will check it out tonight. Bu tshi make me feel happy, we only have to figure out teh Bug and tshi will be teh way of teh futeure for newton
-Thank for integrating it.


I have few obsevations.
one thong I notice is that the scene is no a stack of 6 x 6 x 4 blocks, instead is a 6 x 6 x 18, that's a very different ball game.

those objects are not just simple blocks in wich each piece touch two or four neighborg pieces.
here each block touce at least 6 other blocks on top and 6 other blocks on he bottom, making extreme coupled configuration of contacts.
also each conta have a huigh degree of mutiplicity, and teh make teh solve work really hard for a stable solution.
That kind of stack will run slow because of teh hiogh degree of complexity in contacts.
How is that scene working for you?

Also do you know if this was integrated into OgreNet download already?
I will chekc tshi out tonight
Thank you for the test.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby Julio Jerez » Tue Sep 21, 2010 2:54 pm

what I am going to do next is tah I will add a new OgreNewt demo that will load Alchemdia Scene.

This demo can be use for debuging porpuse amond OgreNewt Users.
But for that It would be noce if the path was integrated first.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Tue Sep 21, 2010 5:31 pm

ogrenewt was not updated yet, I told kallaspriit but he was not online for 2 days. That scene is giving me very bad performance under 10fps while falling, I got to using more blocks when I was testing some different updating of world. The performance for the original scene is still as on the first sceenshots. I tried to use different scene now, 130 block initially not touching each other, in longer row, falls from 300 to 30fps, touching the pile afterwards is also killing fps. Maybe it has something to do with my way of updating though? Its obvious that the speed of physics in demos etc is slower than what is in real life, but is simply increasing the amount of time sent to world->update bad way to speed it? Maybe that could be bad, and there way better way to have physics moving faster?

I also tested the scene with 250 boxes created by function touching each other with no gaps, going min 250fps at ogrenewt example, doing it in my program results in near 100fps at min, totally all graphics off so to be comparable, physics in my app slowed to be like at example.
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Tue Sep 21, 2010 6:26 pm

Well I will test the same scene in my version of Ogre New and see why,
I do not beleive that a scene with 130 bodies will drop form 300 fps to 30.

My guess is that something is very wrong, or you are running the exact solver mode.
I have teh test scene we will find out soon.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby JernejL » Tue Sep 21, 2010 6:48 pm

What hardware are you running this on? can you run it wihout all the eye candy?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Is newton really scalable?

Postby Julio Jerez » Tue Sep 21, 2010 7:07 pm

One thing missing in the file format is engine settings.
I will add that, that way we will be absolutly certain that the scene is running with the same setting.
Still do not account for platform, but it will count for the engine setings.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby Julio Jerez » Wed Sep 22, 2010 8:42 am

Wow, I just load that scene in teh demosSDK and you are correct is slow down immeselly, hwo mush I do no know yet, but it seems in teh 10 of fps or lower.
I will investigate what is going on.

I will add teh performance timers, and the fps to the demo to see what is wrong.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby Julio Jerez » Wed Sep 22, 2010 9:51 am

Ha ok I foudn why is slwo in my machone, I was running teh exact solve mode.
when I set thsi option in teh solver

Code: Select all
// set the default parameters for the newton world
// set the simplified solver mode (faster but less accurate)
NewtonSetSolverModel (m_world, 1);


It run very fast. here is a profiler output of the scene

letting run an go to sleep
    "ntoskrnl.exe","NewtonDemos.exe","3,467","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\SystemRoot\system32\"
    "Newton.dll","NewtonDemos.exe","2,492","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Newton_200\NewtonSDK\samples\bin\X32\"
    "wow64cpu.dll","NewtonDemos.exe","1,655","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\System32\"
    "nvoglv32.dll","NewtonDemos.exe","973","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\SysWOW64\"
    "wow64.dll","NewtonDemos.exe","874","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\System32\"
    "ntdll.dll","NewtonDemos.exe","839","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\SystemRoot\SysWOW64\"
    "KernelBase.dll","NewtonDemos.exe","354","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\SysWOW64\"
    "ntdll.dll","NewtonDemos.exe","244","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\System32\"
    "NewtonDemos.exe","NewtonDemos.exe","50","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\"
    "msvcr90.dll","NewtonDemos.exe","31","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\"
    "kernel32.dll","NewtonDemos.exe","27","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\SysWOW64\"
    "glu32.dll","NewtonDemos.exe","17","41","0.415","0.15%","0.41%","49,861,000","120,253,000","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4712","\Windows\SysWOW64\"


with auto sleep off

    "Newton.dll","NewtonDemos.exe","2,432",""\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Newton_200\NewtonSDK\samples\bin\X32\"
    "ntoskrnl.exe","NewtonDemos.exe","1,196","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\SystemRoot\system32\"
    "wow64cpu.dll","NewtonDemos.exe","539","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\System32\"
    "nvoglv32.dll","NewtonDemos.exe","363","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\SysWOW64\"
    "wow64.dll","NewtonDemos.exe","297","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\System32\"
    "ntdll.dll","NewtonDemos.exe","291","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\SystemRoot\SysWOW64\"
    "KernelBase.dll","NewtonDemos.exe","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\SysWOW64\"
    "ntdll.dll","NewtonDemos.exe","73","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\System32\"
    "NewtonDemos.exe","NewtonDemos.exe","42","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\"
    "msvcr90.dll","NewtonDemos.exe","29","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\"
    "glu32.dll","NewtonDemos.exe","14","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","4832","\Windows\SysWOW64\"

as you can see teh preforma of Netwon is comparable to that of many of teh system window is running in the back ground.
besically is equal to the time window spend in WOW emulation 32 bit mode in my machine, and in the tnoskernel.
This should be twice as fast in a native 32 bit OS and in natove 64 bit mode, sine ther is no WOW, WOW64,


here is using teh SSE mode and no sleep
    "ntoskrnl.exe","NewtonDemos.exe","1,981",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\SystemRoot\system32\"
    "Newton.dll","NewtonDemos.exe","946",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Newton_200\NewtonSDK\samples\bin\X32\"
    "wow64cpu.dll","NewtonDemos.exe","932",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\System32\"
    "nvoglv32.dll","NewtonDemos.exe","558",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\SysWOW64\"
    "ntdll.dll","NewtonDemos.exe","487",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\SystemRoot\SysWOW64\"
    "wow64.dll","NewtonDemos.exe","469",,"\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\System32\"
    "KernelBase.dll","NewtonDemos.exe","219","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\SysWOW64\"
    "ntdll.dll","NewtonDemos.exe","141","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\System32\"
    "NewtonDemos.exe","NewtonDemos.exe","35","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\"
    "msvcr90.dll","NewtonDemos.exe","29","\Device\HarddiskVolume1\Newton_200\NewtonSDK\samples\bin\X32\","5328","\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4926_none_508ed732bcbc0e5a\"

as you can see Netwon is more tna twice as fast as teh time window spend in the ntosKernel, abopu teh same speed that window spend in WOW64 emulation 32 bit mode in vista 7
and about the same speed window spene in the nvidia driver nvoglv32, ntdll and KernelBase.

Overal in that scene when set to the best prformance mode, with the bodies set active all the time, the application is about 5 times faster than the time window is taking in the operating system resourses.
on a side note:
I think this is what explain why In Linux and Mac Newton is for tree to 4 time faster than it is in wondows, and I coudl never figured out why was that.

anyway I will add the visual performace counters to the SDK demo, and the FPS display.
Then I will add thsi to OgreNewton to see if I get the same result.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby Julio Jerez » Wed Sep 22, 2010 11:18 am

Ok I adde dteh fps display to my sdk demo.

with not SSE the sacne runs at aroun 1700 fps when it start and after is goes to sleep
while the stack is active and the solver is working the FPS drops to 87 minimum. I have a coun the print the min SPS so thsi wa teh absulte minumun
went SSE is on the scen runs a litle faster at around 1900 fps, but when the stack all fall and are active the min fps of 120 fos.

I not case I saw the 30 fps you are seeing. what speed is you CPU?
this is just the overall fps, I still have to add the performance counters to see what sub system system is doing the most work.

more:
I added the perfromance counters and I can see teh physics takes pick at 6 to 7 milisecund whan eh stack in piling up.
Ok My time is up for today, have to go to work.

Tomorrow I will now add the same functionality to OgreNewt. ans see if the results are the same.

Can you make a post in the Ogre Forum a asking the maintainer of OgreNewt to update the Patch, I would hate to work in a Patch of the Patch.
Maybe there Kellas is busy but there are other Maintainers that can integrate the Patch.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Wed Sep 22, 2010 2:09 pm

i have core2duo P8400 2.1ghz, but as I asked, how fast did you update your world? I found very slow world updating to get better performance, but considering I have etc box which have 1kg with -9.8 gravity force, speeding things to act swiftly enough is reasonable right?
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Wed Sep 22, 2010 2:14 pm

the update is 60 fps, Gravity 10.0
My machine is an icore7 2.4 ghz, but since it is running on thread the we sodul ge simular performance.
let us see what I fidn when I made teh Ogernet chnages.
also I have a intel hypertreaded 2.4 I will run it on tha system and see what I get.

One chnage I will add to OgreNewto si teh option to run teh Netwonupdate in a cuncurrent thread.
for people with muticores tah meantah teh physiocs can use the entire time of one frame without affecting the Rendering thread.

running the Graphics and the physics in the same thread serializes everything and the system can no use any ot ethe oether cores to distribute the load.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 45 guests