Which version of Newton to use?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
PredaNoob
Posts: 12
Joined: Mon Sep 12, 2011 2:59 pm

Which version of Newton to use?

Post by PredaNoob »

I downloaded version 2.33 however all tutorials I'm seeing that use Irrlicht (on this site or Newton's) use version 1.5.3.
Is there any reason for that? Should I use it too or do I use 2.33?

Edit: The reason I'm asking this is I'm having trouble with some functions like this:

Code: Select all

body = NewtonCreateBody(nWorld, collision);
It says that it doesn't take 2 arguments when I try and compile. I checked out the Newton wiki, they say it should take 3 arguments, but in all the tutorials I found (here and on Newton) they only give it 2 arguments.

Their wiki http://www.newtondynamics.com/wiki/inde ... CreateBody says:

Code: Select all

NewtonBody* NewtonCreateBody( const NewtonWorld* newtonWorld, const NewtonCollision* collisionPtr, const dFloat* const matrix)
The matrix being the initial transformation matrix for the position and rotation. But they don't give examples how to obtain it :(
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Which version of Newton to use?

Post by serengeor »

PredaNoob wrote:I downloaded version 2.33 however all tutorials I'm seeing that use Irrlicht (on this site or Newton's) use version 1.5.3.
Is there any reason for that? Should I use it too or do I use 2.33?
There is no reason to use 1.5.3 right now, since more up to date I think is always better. It's just that those tutorials are outdated so you'll have to make it work with 2.X yourself.
Working on game: Marrbles (Currently stopped).
PredaNoob
Posts: 12
Joined: Mon Sep 12, 2011 2:59 pm

Re: Which version of Newton to use?

Post by PredaNoob »

I see. It's like that everywhere I guess. UDK, source, all tutorials outdated as well >.<
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Which version of Newton to use?

Post by randomMesh »

I'd recommend to use Bullet or ODE since they are most supported by the Irrlicht community. There are wrappers, up-to-date examples, etc.
"Whoops..."
_Neo
Posts: 30
Joined: Thu May 24, 2012 7:47 pm
Location: SiChuan, China

Re: Which version of Newton to use?

Post by _Neo »

well, i've recently registered here.
plus i met same problem with u..
Luckily newton dynamics' forum seems have come out a new tutorial, and i found the solution in that new example:
1st, u have to assign to value:

Code: Select all

const f32 NewtonToIrr = 32.0f;
const f32 IrrToNewton = (1.0f / NewtonToIrr);
for converting units(it seems the units in newton is different from irr)
2nd,add these codes:

Code: Select all

matrix4 matrix=(your IrrScene Node)->getRelativeTransformation();
        vector3df origin =matrix.getTranslation()*IrrToNewton;
        matrix.setTranslation(origin);
3rd,then you have the matrix(without using dmatrix that provided in the newton :P)
create the newtonBody:

Code: Select all

mapMesh=NewtonCreateBody(nWorld,(your Newton collision),&matrix[0]);
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Which version of Newton to use?

Post by Mel »

Newton uses metters as the space unit and kilograms as the mass unit. The lack of scale settings i think is definately a miss. So, if in Irrlicht something is 1 unit big, in Newton is the same. Also, Newton and Irrlicht matrices are compatible, which is useful to pass the information from Newton to Irrlicht and viceversa, you may scale the sizes in this step to achieve the scaling of the simulation. As for the version, use the latest, it is suposed to be the most reliable. The only real lack of Newton is that it doesn't support soft bodies, and hardware acceleration. Bullet has some support for Open CL to calculate physics on the video card for instance. But other than that, both are more or less similar.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
_Neo
Posts: 30
Joined: Thu May 24, 2012 7:47 pm
Location: SiChuan, China

Re: Which version of Newton to use?

Post by _Neo »

Mel wrote:Newton uses metters as the space unit and kilograms as the mass unit. The lack of scale settings i think is definately a miss. So, if in Irrlicht something is 1 unit big, in Newton is the same. Also, Newton and Irrlicht matrices are compatible, which is useful to pass the information from Newton to Irrlicht and viceversa, you may scale the sizes in this step to achieve the scaling of the simulation. As for the version, use the latest, it is suposed to be the most reliable. The only real lack of Newton is that it doesn't support soft bodies, and hardware acceleration. Bullet has some support for Open CL to calculate physics on the video card for instance. But other than that, both are more or less similar.
you mean, it's possible to use matrix directliy without scaling, and the newtonbody would be in the same size as the scene node model?
Post Reply