• Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Newton it is!

Sign in to follow this  


I decided to go with Newton physics lib. From what I can tell it's powerful and people seem to like it. The only complaint I have with all of these physics libs is NO one has written a book, so I can buy one to learn from. HINT HINT people! With the many physics libs out there seems like a good time to have some books around.

Anyway I have a basic demo working with a 1000 boxes that fall down onto a flat plane, and fall all over the place. Looks neat! Now the next thing I need to do is figure out how to get my terrain mesh to work with newton, so the newton world knows what to do. I think I need to use NewtonCreateUserMeshCollision() but not sure. Plus I really don't want to code a bunch of callback functions when this issue seems like a common scenario in coding physics that there should be a way to upload a terrain mesh and say here run with it...

Back at it...
Sign in to follow this  


Recommended Comments

Well progress in less than 2days!!! Nice. I have my terrain mesh now able to have boxes drop onto it and move around after they hit each other. Not to shabby for never using the lib before. I don't know if many people are using Newton or not, but seems like not much help is available for it when you ask people for help. I had to figure out most of this on my own even after asking for help, due to no one was answering. This has its benefits, but still sucks if you are going in the wrong direction. I have a few bugs to fix with newton and the mesh like objects that are small enough to where they pass through the mesh since the meshes vertex to vertex distance is larger than the box, but I still want to keep the boxes accurate, vs. padding the collision box around the boxes.

Holy crap from what I can tell these physics calculations eat up CPU cycles. I have 1000 boxes dropping and I can tell the CPU is going nuts. What about using the second CPU/Core for this? I have a CD2 CPU, and without any knowledge of how to do this, I think I need a second thread to run the newton lib on? and then when that is done use a fence to wait till the main thread is done and ready for data? with its own fence? Like I said I have no idea on multicore programming, but after seeing this I can see why you would want it!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement