Speeding up simulation

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Speeding up simulation

Postby Cyrus » Mon Jul 19, 2010 11:10 am

Hi,
Is there a way speed up the simulation?
My objects do not have any forces except gravity acting on them. But the objects fall slowly.

I have tried calling World.Update with a value from 0.01 to 50000 . But it does not improve the simulation speed at all.
I also tried calling the World.Update after every 50 ms. Still no improvements.
Or, am I missing something?

Thank you very much in advance.
Cyrus
 
Posts: 49
Joined: Mon May 17, 2010 1:04 am

Re: Speeding up simulation

Postby kallaspriit » Mon Jul 19, 2010 4:29 pm

Are you using realistic object sizes? If you're applying gravity of -9.8, then every object in your world should have realistic sizes in meters. For example, if your 1m tall barrel is 100 units tall in your game, it will seem to fall very slowly.
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Speeding up simulation

Postby Cyrus » Tue Jul 20, 2010 10:07 am

Thanks for the reply.
I did try to increase the mass to 500000, but it still did not improve.
Can you provide a method to debug this issue or will any other info be useful?

Thanks again.
Cyrus
 
Posts: 49
Joined: Mon May 17, 2010 1:04 am

Re: Speeding up simulation

Postby JernejL » Tue Jul 20, 2010 10:35 am

Have you tried increasing the forces you apply on the objects?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Speeding up simulation

Postby Julio Jerez » Tue Jul 20, 2010 10:40 am

mass 500000?
what are you doing?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Speeding up simulation

Postby Cyrus » Tue Jul 20, 2010 11:57 am

Julio Jerez wrote:mass 500000?
what are you doing?

I have enabled gravity only. In my simulation, all objects always fall in "slow motion"(similar to what happens in action replays in TV). To increase the speed at which an object falls down I tried setting the mass to huge value.

Delfi wrote:Have you tried increasing the forces you apply on the objects?

I have not tried increasing the speed. I will try it later.
But normally, shouldn't the objects fall with the above conditions or am I missing something?

Thanks.
Cyrus
 
Posts: 49
Joined: Mon May 17, 2010 1:04 am

Re: Speeding up simulation

Postby JernejL » Tue Jul 20, 2010 12:56 pm

Do you realize, that mass has nothing to do with this? more mass does not mean things fall faster.. This has been proven CENTURIES ago.. It is your gravity FORCES which are of insufficient power...

http://en.wikipedia.org/wiki/Aristotle
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Speeding up simulation

Postby Julio Jerez » Tue Jul 20, 2010 1:46 pm

there is a perception of scale, of you have object with too small units liek cm then tehy will llok liek mivin in slow motion.

you can chevk i fthe simulation is right by testino how much a body fall in freefall under gravity

just ste teh velicity to zero, and afet one time step
mesuge teh velocity

v = g * t
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Speeding up simulation

Postby Stucuk » Tue Jul 20, 2010 2:33 pm

Are your objects a realistic size? If you have an object thats say 100x100x100 and you apply gravity of -9.8 then you proberly will find it falls slowly because 100x100x100 is a very large object. With a gravity of 9.8 a size of 1 should equal about 1 meter. (As in 100x100x100 would be 100 meters by 100 meters by 100 meters).
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron