Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Newton Physics SDK running in DBPro!

Author
Message
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 20th Apr 2004 04:17 Edited at: 2nd Sep 2004 16:21
Newton Wrapper FORUM created!
http://walaber.proboards23.com/

New Version Released!! Current version: 1.23d

SCREENSHOTS[/b]


Bigger images:
http://walaber.com/ndb/demo01.jpg
http://walaber.com/ndb/demo02.jpg
http://walaber.com/ndb/demo03.jpg
http://walaber.com/ndb/demo04.jpg
http://walaber.com/ndb/demo05.jpg
http://walaber.com/ndb/demo06.jpg


The Newton Physics SDK running in DBPro! Link to the Newton SDK homepage
http://www.physicsengine.com

DOWNLOAD
the latest version can always be found on my website.
http://walaber.com

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Cpt Caveman
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 20th Apr 2004 09:23
Sweet, I tried it and got 52-121 fps, I like the Buoyancy feature.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 20th Apr 2004 22:49
Glad to see your getting it working Walaber. I'll try the demo out later.

EZrotate!
Tokamak Physics Wrapper!
ZomBfied
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 21st Apr 2004 01:48
I can't find the tutorial...
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 03:14 Edited at: 30th Apr 2004 06:46
[edit] post no longer relevant [/edit]

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
The Big Babou
21
Years of Service
User Offline
Joined: 10th Feb 2003
Location: Cyberspace
Posted: 21st Apr 2004 03:47
is it already possible to say which one will be faster/ more accurate for which type of game?

... they call it a royale with cheese ...
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 07:18 Edited at: 21st Apr 2004 07:27
that's a tough call. You'd have to make some kind of test program and see which ran faster.

Although I don't know alot about the inner workings of Tokamak (feel free to as Wolf about it though), I think they use a very different basic system for calculating physics. I know that with Tokamak, if your timestep is large, you should tell it to re-iterate a few times (to get an accurate simulation). Newton seems to be based on a different solver, because it doesn't require this.

also, Tokamak gives you an index to each body in the simulation (like a DBPro object number), and you have to loop through and update your DBPro objects (visual objects) each loop... in pseudo code:



..or something like that. But with Newton, you tell Newton ahead of time (in the setup part of your program), how to position and rotate the objects for you. In C++ you do this by making a function that updates the position/rotation of the DBPro object, and then you tell Newton to call this function every time a body needs to be moved/rotated.

this is really cool, because you don't need the above loop! Newton will automatically update the objects for you. What's more, it will automatically ignore any objects that aren't moving or rotating (are in a state of equilibrium).

You can also set different basic "materials" for objects, and then set specific settings for when certain materials collide. for example, you could define a "metal" material, and when 2 metal materials collide, you could trigger a clang sound, etc.

or you could make a "trigger" material for hot-spots, and turn off physics collisions for that material, but set a trigger to let the program know when an object is inside the zone, etc.

I still haven't even scratched the surface of this SDK yet, but I'm really excited about the possibilitles.


in short, I think Newton is a little easier from the user's perspective... but I have no idea if it's faster or slower than Tokamak. both seem fast enough to handle (most) game applications, which in my estimation use somewhere from 1 to 100 simulated bodies...

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
EvilKnuckles 666
20
Years of Service
User Offline
Joined: 23rd Jun 2003
Location:
Posted: 21st Apr 2004 08:31
what is a rar file? how do i get the files from there..?
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 08:46
RAR is like ZIP, it's a way to compress data. you can download a .rar extractor from about 5,000,000 different websites on the internet.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 21st Apr 2004 10:44
Cant find newton.dll on http://www.physicsengine.com, where it is there exactly?
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 12:20 Edited at: 22nd Apr 2004 16:41
I looked at the license, and realized I can just include the newton.dll file myself.

so it's in the file now, just unzip/unrar and run the .exe, it should work fine!

this should make it easier for people to try, so please give me some feedback!!

[edit] new version available, removed old links [/edit]

[edit] I did a little thinking about making a wrapper today, and I think I have an idea how to make a pretty nice little system! If I get a chance tonight I'll build a wrapper of just the commands used in the demo above, and post it for everyone to try out... right now all of the setup is in the C++ code, but after I get the wrapper going, all of the setup will be possible from within DBP. [/edit]

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 21st Apr 2004 14:45
Variety is the spice of life! It sounds like this physics engine is a little more straightforward than the tokamak one. I think this variety is good for DBP. For killer physics and customisation, use tokamak, for a more simple simulation, use newton.

I like.

Make sure you let everyone know when it's done!

stop();
hammertime();
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 18:49 Edited at: 30th Apr 2004 06:48
I wrote a simple wrapper today!!!

Here is a new version of the demo, with all of the main code in DBPro!!!

(check the source for proof)

[edit]no longer available, newer version at bottom of post [/edit]

FULL SOURCE INCLUDED, including a copy of the preliminary wrapper and the DBPro source, so you can try messing around with the system yourself!

unfortunately it's REALLY late and I don't have time to comment the code, or create and docs on what commands are in the wrapper. but there a quite a few more than I'm using in the demo...

I'll try to make a few more demos, and some documentation when I get a chance.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Apr 2004 18:57 Edited at: 30th Apr 2004 06:48
here`s the source for those too lazy to download.

[edit] [b]PLEASE IGNORE THIS NOW. these commands have changed in the newest version [/edit]

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 21st Apr 2004 22:43
I've made a simplified version of your demo, trying to figure out what each command does and why it's required. The way you've done this does seem much more different than your conventional DLLs - like you said, you set up all the objects first, then let the DLL store/handle them. That greatly simplified the process - possibly at the cost of control, but I don't care about that right now ...

I looked in your DLL (using notepad) and I couldn't seem to find a command to rotate a body ... is it possible? I have a few questions about certain commands (I don't know what NDB_NewtonBodySetMatrix does for example) but I suppose I can just wait for a commented example...

once again - well done!

stop();
hammertime();
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 22nd Apr 2004 01:05 Edited at: 22nd Apr 2004 01:07
I havent really taken a look at this engine yet, but can it use wore than one mesh? With Tokamak, you could only setup one static mesh. In this you can make many meshes, and move them right? And how about animated objects? Is it polygon perfect?

Ive been thinking about a game I want to make, and needs physics with many meshes.

Sorry if these questions have already been answered.

Thanks

"All programmers are playwrites and all computers are lousy actors" -Anon
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 22nd Apr 2004 16:33 Edited at: 22nd Apr 2004 16:37
adr Sorry I promised my girlfriend I wouldn't do anymore programming until next week
but basically, the wrapper has a few internal things that aren't yet explained. for example, the wrapper has an internal matrix and vector for temporar use. the NDB_NewtonBodySetMatrix is a command that sets the original position/rotation of a body in the system. If you notice, I do the following set of commands (in this order):

The wrapper works like this in a lot of places right now. for example, there are some commands that return a vector (3 floats). In this case, you would call the command that returns a vector (usually a velocity or something), and the wrapper fills the internal temp vector with the result. then you can call the NDB_GetVector_X(), NDB_GetVector_Y(), NDB_GetVector_Z(), NDB_GetVector_W(), commands to get the individual components of the vector!

by the way there is a list of all the current commands in the wrapper in the source button!


andrew11 as far as I can tell (haven't tried it myself yet), Newton supports an unlimited number of meshes. however, objects made from meshes are static (like Tokamak), so they are usefull for backgrounds, etc. You still have to use the built-in primitives for your active objects. but I think the answer is yes, you can have multiple mesh-objects. I plan to make a feature in the wrapper where you just give it the DBPro object number, and it will automatically make it into a mesh object for you. should be pretty easy.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 22nd Apr 2004 17:33
Quote: "adr Sorry I promised my girlfriend I wouldn't do anymore programming until next week"


I understand - I think my girlfriend has considered such a ban a coupla times in the past

So, am I right in thinking that I would set the rotation of the object by using
NDB_SetVector tempx#, tempy#, tempz#, 1.0
followed by NDB_SetMatrixTop/Mid/BotRow() ?....

stop();
hammertime();
Mussi
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 23rd Apr 2004 00:00
Quote: "Although I don't know alot about the inner workings of Tokamak (feel free to as Wolf about it though), I think they use a very different basic system for calculating physics. I know that with Tokamak, if your timestep is large, you should tell it to re-iterate a few times (to get an accurate simulation). Newton seems to be based on a different solver, because it doesn't require this."


as I'm coding my own collision system I can tell from the quote that the newton system is faster than tokamak's system for some object speed and greater than that. but I could be wrong tho.



Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 23rd Apr 2004 02:17
adr - yeah, that's the basic idea. Actually there is a function in Newton called NewtonSetEulerAngles, and you supply it with 3 angles, and it makes the appropriate matrix. then you can add a position offset, and you are all set.

unfortunately I haven't stuck that in yet. will be put in first thing on Monday (when I get back to work on the system)

meanwhile I've got some ideas going to improve the system a bit.

the next release should have a LOT more commands in it!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 23rd Apr 2004 12:30
Well, seems cool but I couldn't quite get rotation to work as expected. Setting the Top row of the matrix with a Y value made it rotate on it's x axis ... or something crazy.

I am curious to know how you get the DLL to rotate the objects for you. It's cool - makes it very easy to use...

The SetEulerAngles function - how does it behave? Will it behave like the free flight commands?

(As you can see I'm quite keen on this little project. Nothing against wolf's efforts, I just find his a little bit confusing)

stop();
hammertime();
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 23rd Apr 2004 18:24 Edited at: 23rd Apr 2004 18:24
adr - thanks for the interest.

you can't just stick angles into a matrix and get the object to rotate... matrix rotation is different than Euler rotation (like DBP uses). unfortunately, until I put the NDB_SetEulerAngles function into the wrapper, you can't set an initial rotation for your objects. sorry about that. it will be the FIRST thing I put in when I get back to work on the wrapper.

Newton positions and rotates the objects for you in a really interesting way. in C++, you make your own custom function which accepts a translation matrix from Newton, and updates your visual object based on that information. then you tell Newton to call this function anytime it need to move or rotate and object, and it takes care of it for you. I used the wonderful C++ interface by IanM to use DBPro commands inside C++ to move and rotate the objects.

Then you just sit back and watch Newton do its thing.

for those wanting more control, the complete version of the wrapper will have more options about how and when Newton takes control of your objects.

I have some good ideas for this thing, It should be a really usefull system when I am done.

p.s. Newton has it's own built-in support for many kinds of joints, including a complete rag-doll set. when I get that included in the wrapper, I'll try to make a demo like Wolf's.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 26th Apr 2004 18:12 Edited at: 30th Apr 2004 06:50
quick new demo. I added a function to initially rotate objects.

[edit] download link removed. new version available below [/edit]

there are still some bugs, and the wrapper is very much still in the ALPHA phase. however the next update will be substantial!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Neil19533
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 29th Apr 2004 19:05
so would it be possible to make 3d models in some other program, for a level, then it to be able so set up collision for it auto matically or would i have set up loads of newton boxes

Any spelling mistakes are totally In tensional.
Ron Erickson
Moderator
21
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 29th Apr 2004 21:47
It can set it up automatically.

EZrotate!
Tokamak Physics Wrapper!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 30th Apr 2004 06:39 Edited at: 2nd May 2004 05:58
yeah, like Tokamak, you can use existing 3D models for level collision. also like Tokamak, levels made from models are not "active", in that they act like they have a mass of infinity, and therefore don't react to being hit by objects. however, other objects react to hitting it.

so it works great for background objects like terrains, buildings, walls, etc- things that will never move.

I will be adding this functionality to the wrapper soon, it should actually be REALLY easy to implement, and even easier for the user. the command will be something like: NDB_NewtonCreateTreeCollision DBPro_ObjNum where DBPro_ObjNum is an object you have in your scene. the wrapper will automatically build the collision geometry based on the model, and input it into Newton.


WRAPPER UPDATE
I made a lot of changes to the wrapper today before work. unfortunately I didn't have time to upload it, so I'll do that when I get home tonight.

the wrapper is now much more functional, and the internals of it much cleaner. I have the basic rigid body interface about 90% wrapped now. after I complete the rigid body interface, I'll do the following (probably in this order)

1) Add all supported Joints (Ball/Socket, Hinge, Slider)
2) Add more collision geometry options (mesh-based collision + primitive array collision)
3) Add the Rag Dolls interface!

The wrapper is shaping up nicely, with the next update it will be quite functional. The new demo shows how you can move objects around. One of the balls is moved by directly setting its velocity (it consequently starts rolling due to friction with the ground). The other ball is moved by spinning it (it consequently starts moving because of friction with the ground). I'll add the DL link when I get it properly updated.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 30th Apr 2004 07:57
Just thought I'd post this little quote from the Newton Game Dynamics forum:

Quote: "Wait until this weekend we will release a new patch that will include some more joints, a level geometry tutorial, a material tutorial, a character controller tutorial using the New up vector joint. It will also some bugs in the two previous tutorials, a well a significant increases in speed on the engine especially when handling large piles of stacked bodies.
"


If they keep updating this fast, I may never catch up

those that weren't particularly impressed with the framerate of that first demo I released (with the stacked boxes) should be pleased.

when the new version comes out, I'll update the wrapper, and hopefully make a few demos to show it off.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 30th Apr 2004 16:14
Make sure when you update the physics engine in the DBP code, you pass in the timestep. You didn't do that in any of your demos and it could explain the odd behaviour.

stop();
hammertime();
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 30th Apr 2004 18:40
actually I have that all taken care of.

if you don't pass anything to the NDB_NewtonUpdate function, it automatically gets the time elapsed in seconds, and updates with that value. if you supply a value, it uses that instead (for special effects things like slow motion, etc).

New vesion coming soon with JOINTS!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 1st May 2004 14:37
ran into a little snag with the joint system...

if a body is linked to a static position/body, the joint works great, but linking 2 live bodies seems to cause trouble.

I've posted a question about it on the Newton forum, I'm sure it's just me not being completely familiar with the joint system. if I get it fixed, expect a major release by Monday, complete with a few demos!

tomorrow I'm also planning on implementing a mesh-collision system, for background collision, etc!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 2nd May 2004 05:57 Edited at: 6th May 2004 06:47
[edit] post removed because new version has been released. scroll down [/edit]

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 2nd May 2004 13:17 Edited at: 2nd May 2004 13:17
When running sources in DBPro I get always "Command in DLL command-table duplicated (NDB.dll:NDB_setMatrixIdentityMatrix)"

Exes run correct except after quitting I get always "NDB_Dem001" causes page error in module NEWTON.DLL...."
Cpt Caveman
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 2nd May 2004 13:25
I had the same problem until I removed the old dll, so there was only the new one in the plugins-user folder
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 2nd May 2004 14:35
yeah, forgot to mention that... the dll filename has changed, so please remove the old one!

from now on, all releases will use the same filename, to avoid this problem! also if you have an old version sitting in the directory with the source, DBPro likes to use that one instead

any comments on the system? I've got it working great now... the next release will come with a few more demos too, including a few better demos of the joint system.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 2nd May 2004 22:33
Thanks,
sources run now OK in DBPro but after quitting I still always get "NDB_Dem001" causes page error in module NEWTON.DLL..."
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd May 2004 03:02
for every demo? or just demo 01?

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 3rd May 2004 11:45
Walaber:
Same happens in every demo source, and if I run source with F6 it stops immediatelly with that error. Only running demos with F5 they run fine, but after quitting also they all give that same error.

I wrote you two months ago about your Snowball fight, then there was problems with compress media, but now this is different?

I have Radeon 9700.
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd May 2004 12:45
no, there's no included media in the examples (which should be obvious from the source code).

anyone else having trouble?

anyone even trying this out?

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
hmm
20
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 3rd May 2004 20:53
I've been trying to adapt demo3 to put into kevil's memblock matrices, then chucking the balls around there. I've copied and pasted a whole lot of code at the start;



And the updater line in the loop, and the make_ball() function as it is in your code.
When I try to run it the screen goes black for a bit then returns to the DarkbasicPro editor.

I'm probably trying too much too soon, but can you spot any obvious mistakes? Has it anything to do with the memblocks?

coincidence? how about pure cosmic convergence!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 4th May 2004 03:06
Quote: "col = NDB_NewtonCreateTreeCollision( Floor )"

in this line, "Floor" must be an object, not a memblock or mesh.
use the make mesh from memblock, and make object from mesh commands to make it into a DBPro object, and then try calling the command with the object number. it *should* work, although I've only tested it with pre-loaded objects. if you send me the whole source, I'll see if I can get it working!

note- once you call the "NDB_NewtonCreateTreeCollision" function, you can delete the object if you want. it uses the object to get the polygon data.

Quote: "NDB_NewtonCreateBody Floor, col "

then you use this line to make a rigid body in the system. the first parameter is the DBPro object that represents the rigid body. in most cases, this will be the same object you used above to make the collision data. but in some cases you might want to use a more detailed model for the visuals, with a simpler model for the collision. in this case you would load the collision model, call NDB_NewtonCreateTreeCollision to make the collision data, then DELETE that model. then load your visual model, and call NDB_NewtonCreateBody with the new model as the first parameter, and the collision data ("col") as the second parameter.


let me know if you make any progress!

please post any demos you get working with the system!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 4th May 2004 03:10 Edited at: 5th Jun 2004 05:16
the next update to the wrapper will have several new features! it's almost ready, but I want to get the documentation ready before I release it. here's a few screenshots:

[edit] screenshots removed - no longer relevant [/edit]

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
hmm
20
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 4th May 2004 22:26
Here's the problem code. I've made to newton physics bits standout so you can see if there's anything wrong with that code. I don't think there's any need to check the rest. Oh, and you need a "grass2.jpg" file (in black and white".



And don't worry, the dlls are all in the right folders.

coincidence? how about pure cosmic convergence!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 5th May 2004 06:29
hmm - that's the first time I've actually looked at the memblock matrix code. from a quick scan of the code, I don't see anything terribly wrong.

when I get home (to a machine with DBPro), I'll see if I can get it working.

I should tell you that, when you call the NDB_NewtonCreateTreeCollision( Floor ) function, it sets the collision data to the object's mesh at that point. if you change the object later, the collision data will not automatically update.

anyway I'll give it a deeper look when I get home!

p.s. thanks for trying out the system! you're thr first person to really give it a try


Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
adr
20
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 5th May 2004 17:44
Walaber > I found that setting the massmatrix to a value > 1 doesn't really have an effect. The body seems to hit terminal velocity (or whatever) very quickly. Is there any way around this?

nutshell > I want the body to fall quicker/harder than it currently can do

stop();
hammertime();
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 5th May 2004 19:11
it's actually gaining velocity, but it's just too small to be very noticable. You need to change the overall gravity affecting the world.

There is a command in the next release called "NDB_SetStandardGravity", which lets you set the gravity for the world to anything you desire.

the new release will be available in the next two days, and will feature COMPLETE documentation for every command, as well as several new features/improvements.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 5th May 2004 19:38 Edited at: 5th May 2004 19:49
hmm - I got your source working!!

I don't know why, but the program didn't like me defining variables a globals! if I removed that part, everything worked fine.

here's the fixed source!




NOTE - I made the spheres bigger. also, you were missing the all important NDB_NewtonUpdate command in there as well


here's a screenshot:


Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
hmm
20
Years of Service
User Offline
Joined: 11th Oct 2003
Location:
Posted: 5th May 2004 20:49
Thanks for sorting it out. I'm keen to start playing around with physical demos. Maybe I'll do a car physics one once you release the linked limbs update.

coincidence? how about pure cosmic convergence!
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 5th May 2004 21:00
it's pretty amazing just watching the balls roll around your cool terrain!

by the way, in the next release of the Newton SDK, there will be a vehicle system, which will make making wheeled vehicles very simple!

I'm looking forward to seeing it.

let me know if you get anything else going with the wrapper!

Wrapper Update tomorrow!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Cpt Caveman
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 5th May 2004 22:44
That memblock matrix code looks cool, now if the balls floated in the water in the valleys it would be great, only jokingAwesome example for the wrapper, good work.
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 6th May 2004 03:40
actually, Newton itself supports bouyancy forces, so that's entirely possible.

it's not in the wrapper yet, though

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2024-05-04 20:54:31
Your offset time is: 2024-05-04 20:54:31