Calculations with some "noise" [SOLVED]

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Calculations with some "noise" [SOLVED]

Postby Auradrummer » Tue Apr 21, 2009 2:12 pm

Hello guys.

I'm implementing a model where a board is supported by four coils, one in each corner. The result is very good, and the board behavior is rellistic. But some coils are flickering. I'm sure that this isn't limitation of the engine. There is some instruction that I have to set to make the calculations smoother?
Last edited by Auradrummer on Wed May 06, 2009 4:06 pm, edited 1 time in total.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby JernejL » Wed Apr 22, 2009 5:19 am

Coils? you mean springs?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Calculations with some "noise"

Postby Auradrummer » Wed Apr 22, 2009 1:14 pm

Yes, yes, springs. What is the difference between 'coil' and 'spring'? Here in Brazil we understanding them the same way.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Dave Gravel » Thu Apr 23, 2009 1:31 am

Here in Canada a coil looking similar to a spring but it's really not a spring.
Here the coil is use in electronic stuff and it is static.
Only the way how it is make looking similar to a spring, but it can't move.
http://www.germes-online.com/direct/dbi ... d_Coil.jpg
http://media.digikey.com/photos/Epcos%2 ... 182A30.jpg
http://www.rocketroberts.com/techart/im ... e_coil.jpg
http://www.isplc2006.org/b2b/pics/Loadi ... eries_.jpg
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: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Calculations with some "noise"

Postby JernejL » Thu Apr 23, 2009 5:21 am

Auradrummer wrote:Yes, yes, springs. What is the difference between 'coil' and 'spring'? Here in Brazil we understanding them the same way.


Coil is like a lightbuilb coil, heating coil or an induction electronic element used in radios.
Spring is the ellastic mechanical steel part which is used in car wheels, etc..

Anyway what you need is a better spring functions, and there's quite a few, but i never made springs myself, i can lookup for some useful works when i come home.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Calculations with some "noise"

Postby Auradrummer » Fri Apr 24, 2009 8:31 am

Ah, OK. Here those coils are called "spiral". I learnt one more!
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Auradrummer » Fri Apr 24, 2009 10:24 am

I discovered one thing:

My system, as I already said, is made of four springs and one table. The processing is made in the following sequence:
spring3; spring2; spring1; spring0; table ...

As this is an recursive operation (the result of one depends directly of the result of the other), I'm accumulating error till get to the table again. I think the right way to balance the system is calculate them intercalated, like:

spring3; table; spring2; table;spring1; table;spring0; table;

There is some natural way to make Newton do this? Like some instruction, timeStep (I don't know how to use it), thread (not know too)...
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Auradrummer » Fri Apr 24, 2009 4:45 pm

I've noticed something else:

The spring that is more unstable is that have the more unstable timeStep. I think the problem could be here.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Dave Gravel » Fri Apr 24, 2009 5:37 pm

Is this only for a simulator with just some few objects ? or it's for a game with many objects ?
If it is only simulator with low object count you can try to use solver 0 and not solver 1.
Because solver 0 have more precision and it is surely more stable with this type of simulation.
Maybe a fixed timestep can help too,
About the thread count I don't think that have any special effects on the simulation in self maybe on the speed.
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: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Calculations with some "noise"

Postby Auradrummer » Fri Apr 24, 2009 5:43 pm

It is for a game, with too much objects. In the fact, I'm trying to create a car, but studying the physics since the beginning. I'm convinced that I'll never be successful using already made functions if I don't understand the basics.

I didn't set any solver. How can I do this?
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Dave Gravel » Fri Apr 24, 2009 5:49 pm

I talk about NewtonSetSolverModel.
0 egal more precision and 1 egal less but faster... you can use higher value too.

I don't remember by default if newton beta 2 use 0 or 1 I think it using 0.
The problem with a game the solver 0 can come hard to deal if you have a big object count.
The other problem if you use solver 1 it is faster but all joints lose more precision.

You need to find the best for your use.
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: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Calculations with some "noise"

Postby Auradrummer » Fri Apr 24, 2009 6:14 pm

Nope, solver made no difference (fortunately I don't need to use higher solver, the problem is in another area)

I'm plotting graphics of the flickering value and analyzing it. The amplitude and frequence of the flicker do not changes.

I'm studying the codes of Newton Demos. Your car works fine in the demos but fail if I try to implement. So, the theory that this is some setting I'm missing is getting stronger.

all the samples, as I saw, have timeStep as follows:

Code: Select all
CHiResTimer time;
timeStep = time.GetElapsedSeconds();
NewtonUpdate (nWorld, 1/60)


I printed the 'timeStep' variable, and it is 0,17 or (1/60).

I can use NewtonUpdate (nWorld, timeStep) ?

I hope I was clear (I'm very tired right now)
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Calculations with some "noise"

Postby Auradrummer » Wed May 06, 2009 4:06 pm

The mistake here is that I'm calculating the spring forces and then applying them to the table in different functions. I concentrate everything in only one function and I got a very better result.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron