Hello, I'm new with newton.

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Hello, I'm new with newton.

Postby Ivan Mandić » Sun Jun 28, 2009 2:59 pm

I have a few questions.

1.If my FPS isn't static is there a way to calculate how many times do I need to call NewtonUpdate,and with what TimeStep? (I know my fps every time I do NewtonUpdate)
2.What are the beast setting for realtime physic(ingame)? Any tips? I have set NewtonSolverModel to Linear mode,NewtonPlatformArchitecture mode to 2,and I'm using multiple threads.
3.Can I use Newton2 in any project,for free?

Thanks.
User avatar
Ivan Mandić
 
Posts: 15
Joined: Sun Jun 28, 2009 1:42 pm
Location: Croatia, Slavonski Brod, Slobodnica

Re: Hello, I'm new with newton.

Postby JernejL » Sun Jun 28, 2009 4:01 pm

Ivan Mandić wrote:I have a few questions.

1.If my FPS isn't static is there a way to calculate how many times do I need to call NewtonUpdate,and with what TimeStep? (I know my fps every time I do NewtonUpdate)
2.What are the beast setting for realtime physic(ingame)? Any tips? I have set NewtonSolverModel to Linear mode,NewtonPlatformArchitecture mode to 2,and I'm using multiple threads.
3.Can I use Newton2 in any project,for free?

Thanks.


1. You usually call newtonupdate just once, with a different timestep parameter, time-slicing (calling update several times) is used when specific problems are encountered and is usually employed for professional simulations, not games.
2. it really depends on what kind of simulation you want, if you want precision or speed, you obviously prefer speed with those settings.
3. yes, see license.

about timestep.. a usual approach is, to use time passed since last frame.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Hello, I'm new with newton.

Postby Ivan Mandić » Sun Jun 28, 2009 7:25 pm

I lock fps to 60, and I use NewtonUpdate like this:"NewtonUpdate (nworld, (1.0f/60.f));" But it's just too slow.
p.s.
I think that maybe problem is in size of my cubes, I'm testing with boxes in size of 20x20x20..It look's ok if I multiple mass*gravity with 10.
User avatar
Ivan Mandić
 
Posts: 15
Joined: Sun Jun 28, 2009 1:42 pm
Location: Croatia, Slavonski Brod, Slobodnica

Re: Hello, I'm new with newton.

Postby JernejL » Mon Jun 29, 2009 3:16 am

Do your bodies have set appropriate intertia matrix? also you may be using excessive linear damping?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Hello, I'm new with newton.

Postby Ivan Mandić » Mon Jun 29, 2009 6:24 pm

Problem is that object size 20x20x20 looks small in my level. (If I'm right that is size of 20m in newton)
So if gravity is only 9.81m/s it's looks like the object acceleration is 9.81 cm/s and not 9.81 m/s.
And if I make small object in size of 2x2x2 ,and zoom camera to it, speed is ok but that object is too tiny.. I need to make newton think that object 20x20x20 is small and not big.
User avatar
Ivan Mandić
 
Posts: 15
Joined: Sun Jun 28, 2009 1:42 pm
Location: Croatia, Slavonski Brod, Slobodnica

Re: Hello, I'm new with newton.

Postby Julio Jerez » Mon Jun 29, 2009 6:28 pm

if you object is 20 x 20 x 20 it will be 20 mter in newton,
a gravity of 9.8 wiol be too small

you can operate in a two scale factor in newton you body to 0.2 x 0.2 x 0.2
or make your gravity 9.8 * 100 = 980 but tah may bring soem problems with the engine (you coudl try)

I recomend making the body .2 x.2 x .2, by using a Scale factor for every thing.
basially you mutiply everything by 0.01 in when you pass a parameter to the engine and you multiply by 100 when you read a value foprm the engine.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hello, I'm new with newton.

Postby Ivan Mandić » Mon Jun 29, 2009 7:48 pm

I did that with scale at he first place but i didn't know is it right solution for that problem.
I did try to set gravity to 981.0m/s but object behaved strangely.
Thanks for help guys.
User avatar
Ivan Mandić
 
Posts: 15
Joined: Sun Jun 28, 2009 1:42 pm
Location: Croatia, Slavonski Brod, Slobodnica


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 2 guests

cron