Is newton really scalable?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Is newton really scalable?

Postby razi » Sat Sep 18, 2010 4:23 am

Hi, as first I should note that im using newton through ogrenewt. So and the problem is that in my application I have average of 60 fps and created a small 6 levels tower stack. As soon as my player touches it with his physical body the fps drops to like 5 fps until all stops moving. This is nothing like the large tower stacks in newton samples. I even set the solver to 8 to no avail. Everytime there is multiple collisions the fps drop dramatically, like as I shouldnt let more than 5 bodies touch each other at a time. Should I consider this natural behaviour? I clearly remember that even old HL2 let you stack big pile of boxes without big slowdown.

Thank you.
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 8:14 am

I wonder when the Ogre people will stop with periodic HitJob on here and in the Ogre forum.
This is just another Hitjob to provoque another thread for the web browser.

you are saying that the Netwon engine slow down with as litle as five bodies?
Is you are expiencing that, I am not going to say anything at all, other that switch phyicos engine, because I nothing I say will make you change your mind.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 8:47 am

Wait, what?
No, Im fan of this library and some time ago when I started to build my game framework I chose Newton for physics because of great samples it had and good job Walaber did to provide it for Ogre easily. Now I actually have the whole framework, scene loading, custom character movement/interaction, (something like mirrors edge) based on Newton and, you see, Im just worried about this behaviour as having more objects stacked is on my plan. Rebuilding framework to other lib would take much time and some reworking and Id like to avoid it if possible.

normal
Image
after touching
Image

no offence was ever intended here :(
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 9:24 am

are you using the 1.53?
or are you using newton 2.0 with teh exact solver mode?

I know that the number of bodies you shwo in teh scene is no enough to drop 50 frames per secunds
I had seen other people using OgreNewt with scne with stack of as high as 600 objects, and wodl just fine.

I just went to youtube and found this one, I cna no find OgreNewt, by I am postive this uses Newton.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 9:30 am

newton 2.24, solver model 8, I update the world 30 times per frame with frametime*2.5 for swift physics speed

Ill try to set similiar scene to some basic ogrenewt example, maybe its simply its fault, though I sure hope not.

edit: you edited your post :) , so its not ogrenewt fault
also as I stated my world update speed is faster than in video to achieve real life speed, thats not the problem right?
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 9:35 am

Ther are some stack demo in teh OgreNewt download, do those slow down by 50 fps like the one your scenes?
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 » Sat Sep 18, 2010 9:42 am

razi wrote:newton 2.24, solver model 8, I update the world 30 times per frame with frametime*2.5 for swift physics speed

what does that means.
are you updating 30 time each frame, that mean that a 60 fps you are doing 30 * 60 = 1800 updates per secund?


razi wrote:edit: you edited your post :) , so its not ogrenewt fault

I edit the post because I did not see the ogre OreNewt in the description, I want to make sure I was showing a demo that in fact uses Newton and Ogre.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 9:46 am

there are just 9 examples, none with stacking, I have work now but later Ill make there some similiar scene and tell you

about update:
Code: Select all
 NewtonListener(OgreNewt::World* W)
       
    {
      m_World=W;
      m_update = 1.0/30.0;
   m_elapsed = 0.0f;
    }

    bool frameStarted(const FrameEvent& evt)
    {
      
      m_elapsed+=evt.timeSinceLastFrame*2.5;
   
         if ((m_elapsed>m_update)&&(m_elapsed<(1.0)))
         {
             while(m_elapsed>m_update)
              {m_World->update(m_update);
              m_elapsed-=m_update;}
         } else
         {
         if(m_elapsed<m_update)
         {}
            else
             {m_World->update(m_elapsed);
             m_elapsed=0.0f;}}
       
   

   return continue;
    }
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 10:18 am

why done you just run a a fix 100 fps.


Ok Here is my idea.
I can today download OgreNewt.

I am working on a file format for Newton, and I wnat to integrated to OgreNet.
I already hav eteh forst demo bu getiing teh SDK to a usable stage will take longer.

On teh oteh hand OgretNewt frame work is already working and s a more finish engine, so I can quicklly update OgreNewt and integrate the file format library.
This way you can dwonload it and tehn save teh Scene and I can see what is going on.
This is exactly one of the Purpose fo eth Fiel Format Library, debuging of Scenes with problems.

I will download the latert OgerNewt and Ogre now.
what do you think of that?

is this still the later URL for the download?
https://svn.ogre3d.org/svnroot/ogreaddons/branches/ogrenewt/newton20

or is this and old link
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 11:23 am

Hi Im back, yes thats right link and I think it would be great If you did what you propose, what exactly will contain this format, information about the whole scene or it would be per model?
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 11:45 am

Basically I will add a couple of funtion to OgreNewt world liek

void SaveScene(); // save comple scene graphics and phsyics and wheece else teh application wnat
void SavePhysicScene(); // save teh physic part and make only, for peopel who do no want send art assets away.
void LoadScene();

that way you can save the scene and post it he and anyone can load it some and see what it is.

I am still build Ogre. let us see what happens.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 12:30 pm

Just to mention, I now tried to rebuild everything but performance is the same, but OgreNewt sample is good, did there some 250 boxes test and worked with average of 200fps, though in real scenario Id make the physics maybe 1.5-2 times faster.
Damn, is it possibly due to my way of updating newton world? I dont know what else.
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 1:46 pm

More tests came to my mind, first I disabled my updater of newton that I posted and used basic update class found in ogrenewt, with update rate set to 100, this performed better in above scene fps fell from 80 to 50, dont know if its good like this..., physics are updating a bit slower though so that might be why its faster.

Then I tried the same scene but with stack goind twice as high (about 100 boxes), still nothing compared to 250 and fps goes again from about 70 to under 20... well Im out of ideas :(
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Re: Is newton really scalable?

Postby Julio Jerez » Sat Sep 18, 2010 2:27 pm

It shoud have 200 or 300 hundre and still run way over 100 fps.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Is newton really scalable?

Postby razi » Sat Sep 18, 2010 2:33 pm

Dont mind that not too high fps, fps is around 80-70 because I have shadows+hdr+godrays on, right now its rather gpu dependent application, the problem is just that big dropdown in fps.
User avatar
razi
 
Posts: 21
Joined: Wed Sep 01, 2010 7:13 am

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 370 guests