Newton 2.0x Archemedia Open Beta

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Newton 2.0x Archemedia Open Beta

Postby JernejL » Mon Nov 30, 2009 7:45 am

Marc wrote:Those links in the first post to Newton 2.11 link to files called Newton 2.08. Is that by accident or intentional? Anyways, there is this file http://www.newtondynamics.com/downloads/NewtonWin-2.11.rar


Seems to be a error, 2.11.rar is right.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Nov 30, 2009 8:43 am

upps my mistake,
I copy teh path form teh older link and edi thme, but I forget to change the link version name. :oops:
It is fixed now you can try again.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby JCayman » Sat Dec 05, 2009 5:30 am

To Julio Jerez:
Do you want use some features in your engine, like: Soft Body, Fluids, Deformable Body (For Example: Metal, Plastic), Cloth?
JCayman
 
Posts: 3
Joined: Sat Dec 05, 2009 5:25 am

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Sat Dec 05, 2009 10:06 am

JCayman wrote:To Julio Jerez:
Do you want use some features in your engine, like: Soft Body, Fluids, Deformable Body (For Example: Metal, Plastic), Cloth?

what do you mean?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby JCayman » Sat Dec 05, 2009 10:29 am

Julio Jerez wrote:what do you mean?

Excuse, probably my English is really bad. I wished to ask, whether you will add these features in the subsequent versions of the engine?
JCayman
 
Posts: 3
Joined: Sat Dec 05, 2009 5:25 am

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Sat Dec 05, 2009 1:48 pm

yes they will be added.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby JCayman » Sat Dec 05, 2009 4:12 pm

Excellently :).
JCayman
 
Posts: 3
Joined: Sat Dec 05, 2009 5:25 am

Re: Newton 2.0x Archemedia Open Beta

Postby kallaspriit » Sun Dec 06, 2009 3:46 pm

Destruction demo is pretty great, will this approach enable the structure to break under it's own weight? For example when I have broken all the pillars except the last, it should crumble by itself (probably already before the last). And when I break the last pillar (last connection of any structure to the ground), everything above just disappears. Great work :)
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Sun Dec 06, 2009 4:17 pm

yes that was teh last thing I was trying to work on,
but for some reason personal events not related to Newton have prevented me from working in the engine on weeks.

But yes that is teh secudn part of the destrutions, pieces sodul beacuse into large pieces themself
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby FlemMonk » Mon Dec 07, 2009 10:19 pm

Hey, I'm back after a long time. This time I'm using Newton for a serious project with 5 other uni students. I've again re-written a module for BlitzMax language however, I have encountered a problem. I wont post any extra code but just the program flow that I'm using with Newton. For some reason the body isn't updating its position and moving anywhere. I was much more successful with Newton 2.0 back a few versions but I never saved any of my code.

Code: Select all
Local nWorld:Byte Ptr = NewtonCreate(Null, Null)
NewtonSetWorldSize(nWorld, [-50.0,-50.0,-50.0], [50.0, 50.0, 50.0])

Local collision:Byte Ptr = NewtonCreateBox(nWorld, 1, 1, 1, 0, Null)
Local body:Byte Ptr = NewtonCreateBody(nWorld, collision)

Local inertia:Float[3]
NewtonConvexCollisionCalculateInertialMatrix (collision, inertia, [0.0, 0.0, 0.0])
NewtonBodySetMassMatrix(body, 10.0, 10.0 * inertia[0], 10.0 * inertia[1], 10.0 * inertia[2])
NewtonBodySetCentreOfMass(body, [0.0, 0.0, 0.0])

Local box:TMesh = CreateCube()
PositionEntity box, 0, 5, 0
NewtonBodySetMatrix(body, box.mat.grid)
NewtonBodySetForce(body, [0.0, -10.0 * 9.8, 0.0])
NewtonReleaseCollision(nWorld, collision)



Then in my main loop I'm doing just a simple:
Code: Select all
   NewtonUpdate(nWorld, 0.1)   
   NewtonBodyGetMatrix(body, mat.grid)

But when I print out the matrix, no positions are been updated. Anyone have any idea what I'm missing? If the flow of Newton commands is correct then It might be an issue with BlitzMax or something else not Newton related. Any help is appreciated.
FlemMonk
 
Posts: 14
Joined: Tue May 26, 2009 5:18 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Mon Dec 07, 2009 10:58 pm

NewtonBodySetForce(body, [0.0, -10.0 * 9.8, 0.0])
setting the force just once is no enought not do it.
you need to set a force callback so that the body gets force applied in edge time step.

liek you set it the force will be zero, and the velocity is also zero, so the body is at rest and the matrix does not change.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby FlemMonk » Mon Dec 07, 2009 11:04 pm

Ah thats right, I remember using callbacks and having a constant force applied. Thanks so much Julio for the quick reply. However I changed my code so that I'm adding force in the main loop, however the box still doesn't move. If I apply a velocity it does infact move. Is the correct way to use force or velocity for gravity?
FlemMonk
 
Posts: 14
Joined: Tue May 26, 2009 5:18 pm

Re: Newton 2.0x Archemedia Open Beta

Postby Julio Jerez » Tue Dec 08, 2009 12:29 am

you have to add it in a force and torque callback
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0x Archemedia Open Beta

Postby FlemMonk » Tue Dec 08, 2009 1:33 am

Sorry Julio, even in the 1.53 documentation it states "This function is only effective when called from NewtonApplyForceAndTorque callback". After making a force/torque callback 'AddForce' works as expected. Thanks again for your help. I am keen to see the improvements on the PlayerController from last time.
FlemMonk
 
Posts: 14
Joined: Tue May 26, 2009 5:18 pm

Re: Newton 2.0x Archemedia Open Beta

Postby rvangaal » Wed Dec 09, 2009 10:18 am

@Julio: perhaps a flag (careful when multithreading) can be used to detect this:

In Newton:
bool inCB;

inCB=true;
callBackForceTorque(...);
inCB=false;

void NewtonBodySetForce(...)
{
if(!inCB)error("NewtonBodySetForce() called from outside callback - no effect");
...
}

-----
Another note, with 2.10 linking I get (in both Debug & Release) a bunch of these linker errors:

newton.lib(dgTypes.obj) : warning LNK4204: 'd:\source\trunk\dev_racer\src\Debug\vc90.pdb' is missing debugging information for referencing module; linking object as if no debug info
newton.lib(dgThreads.obj) : warning LNK4204: 'd:\source\trunk\dev_racer\src\Debug\vc90.pdb' is missing debugging information for referencing module; linking object as if no debug info

It seems that some referencing is off, needing a clean rebuild of newton.lib (I'm using static linking, VC9.0/VC2008). Any idea whether this is fixed in 2.11? (trying to avoid switching too often; if it works for me...).

Thanks,
Ruud
rvangaal
 
Posts: 61
Joined: Mon Jun 08, 2009 1:11 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests