OgreNewt 3.0?


14-01-2017 16:01:09

Hello folks,

did anyone try to use Newton 3.0 with Ogre?
I looked a little bit at the Newton 3.0 source code, but its really different from 2.0. I unfortunately do not have time, to build a wrapper for newton 3.0 aka OgreNewt3.0.

Newton 3.0 has some new cool features like soft bodies.

If somebody is interested, I extented OgreNewt 2.0 with some other joint types like: Pulley, Gear, WormGear, SlidingContact, Universal, Motor-Hinge with back and forward rotation, DryRollingFriction, Kinematic Controller and PathFollow.

See my homepage for some videos:

and show case forum:



06-06-2017 09:22:43

Julio (Newton creator) provided a new Newton wrapper.

I've tried to use it myself but it seems to be lacking much of the functionality of OgreNewt (joints, materials). I will probably try to port OgreNewt myself and share it with the community.


06-06-2017 21:42:45

Yeah, that would be really great! I took a look by myself. But as you say, you need a lot of time to port to OgreNewt3.0 unfortunately I do not have the time to do that, since I'm overchallenged in porting my engine to Ogre2.1.
But If you need some assistance or have some questions or need someone to test new things. I could do that and hopefully others. So do not hesitate in posting the progress in this forum, because that will fill the forum with life again :) .



08-06-2017 19:13:34

I've managed to compile almost all of it, now trying to figure out the new player controller. Some things were removed/changed like buoyancy and collision trigger volumes so I commented those out for the time being. I'm working on it, but if you are in a hurry, tell me and I'll upload what I have.

BTW, your engine looks nice, and uses pretty much what I use :D :) What are you doing with it? Also I've made a button, you don't have that, so maybe you'll buy for 5.95$, eh? :lol:


09-06-2017 22:03:31


sounds good! I'm not in hurry at moment, as i'm fully busy porting to Ogre2.1... Give me a month or so, then I will test what you have and maybe we could discuss how to progress further.
I think Its a lot of work to do, I took a look at the examples, so the basic infrastructure is done. But the more complex thinks like collision behaviour, joints, soft body will take time...

BTW, your engine looks nice, and uses pretty much what I use :D :)
Thanks! Do you mean the OgreNewt functionalities?

What are you doing with it?
Its a hobby project, I started during my study. I always wanted to create a 2,5D Metroidvania game with shop system, physics, mechanics etc., so this is my plan for the next 5 years or longer...

Also I've made a button, you don't have that, so maybe you'll buy for 5.95$, eh?
What do you mean? :wink:



13-06-2017 20:40:57

Thanks! Do you mean the OgreNewt functionalities?
No, I mean pretty much what you use I use. Like recast, paged geometry, mygui, and whatever. I would have killed someone for an engine that works and not have to do everything myself. Although, I learned a lot of stuff by compiling the same library for the 50 times in a row. :D
Right now I'm trying to update my engine from like 6-5 years ago (Ogre 1.10 only), and one month in I finally reached my own code, most of it adapted from some other place else anyway.

So right now nothing works. I found out that OgreNewt serializer is hanging the app and fixed it, no idea with what to substitute collision triggers. The player controller probably doesn't work.
But I'm getting there slowly. :)

The button was a joke. You implemented a lot of crazy custom joints but you don't have a button!
9.95$ last offer! Great button! Worked many times! Didn't break once! Great value! :lol:


17-06-2017 21:56:15

9.95$ last offer! Great button! Worked many times! Didn't break once! Great value!
Ah yes, I could use that :D

So you are working with Ogre1.10, why not Ogre2.1? I tried with Ogre1.10 but got really stuck, so I thought try the newest version. It does cost a lot of time to port everything, but I think Its worth of it.
I'm planning to bring my source code to github.

I saw that you posted your issue with the serializer in the newton forum. I somehow have the feeling, that not much is going on in the newton forum.
It would be great, if Julio could help with OgreNewt 3.0...



19-06-2017 10:34:19

The serializer seems to be working now?!? I'm not realy sure as my project is completely f*** up right now.
I still got major problems with the update. Iterating over the bodies returns null body at some point. Character controller crashes at runtime. I will try to get the debug view working when I get the chance.

I had Ogre 1.7 integrated, 2.x seems too new to me, and the community is a shadow of it's former self. I already got involved with too much stuff at once, as most projects seem to be very poorly documented/supported lately, and I need to parse the code for every single problem. I've also took the not very smart decision to use GLSL instead of CG, and I now neck deep in shader conversion.


13-08-2017 08:19:48

I've updated OgreNewt to "somewhat" work with Ogre 1.10 and Newton 3+. You will probably have to do a bit of work yourselves to build this, as the Cmake file isn't really portable now. My build was 64 bit all the way, with ogre and newton using double floats, on windows, VS 2017. Collisions work, raycasting works, character controller works -for a single character-, serialization works. I still get some asserts from time to time.

When porting from Newton 2 take care not to store/delete any collisions in user code. When creating a body in Newton 3 the body copies the collision you supply, so keeping a pointer to the initial collision is pretty much useless, except when creating multiple bodies using the same collision. You can get the newton collision for a body, and store that in an OgreNewtCollission, just make sure to set ownsNewtonCollision = false on the constructor, to make sure you don't destroy the collision by mistake.

What still needs to be ported/implemented, at least what I would need myself to port for my project, are: buoyancy and trigger volumes.

Long story short: This is a quick and dirty port, but it should save someone who really wants to make it work a fair bit of time.

Dropbox Link


20-08-2017 09:55:30


thanks! I will test It! I must port It to Ogre2.1, since I already ported my engine to Ogre2.1.



20-08-2017 11:45:11

Did I understand It correctly, that the OgreNewt interface remains the same, so there are only changes inside OgreNewt?


21-08-2017 21:09:54


I managed to adapt my OgreNewt2_0 with your OgreNewt3_0 code. Its quite similiar to your code. But I have some extensions, like a lot of joint types etc. My code does also work with Ogre2.1.
You have done a beautiful job in preparing for newton3!

The only thing I changed is I removed m_OwnsBody, as I never own the body, or is this required?
I also removed the gravity from OgreNewt::World, as each body may have different gravity if wished.
I had to disable the OgreNewt debugger, as in Ogre2.1 the movabletext does not work anymore and I was not able to create the debug collision lines.

I managed to integrate OgreNewt3_0 into my Engine and my Level-editor and it does work really well!

Unfortunately some things do not work anymore like the PathFollowJoint, WormGearJoint, Buoyancy, ConvexModifier, ContinousCollisionMode (must read if this is not required anymore, because it was a nasty flag), setWorldSize(would be cool if its no more needed) etc.

So how can we accomplish, in working together and extend the code?
My suggestion would be:
  1. Publish somewhere a repository (Asking julio if we may)[/*:m]
  2. Merging my code with yours[/*:m]
  3. We could announce a new define OGRE_2, if its activated the code for Ogre2_x will be enabled, else the one for Ogre1.10[/*:m]
  4. Extend bit by bit with newton3 functionality (triggerVolumes, other joints, Softbodies!!!!, Ragdolls, vehicle, ...)[/*:m][/list:u]
    What do you think?



23-08-2017 21:09:29

I'm now encountering massive problems with OgreNewt3.0.
When I have static bodies that will never move and I change the position, other dynamics bodies do not accept that the collision has been moved and will collide where the static body stood before. If I test it a lot of times I can happen, that the new position will be accepted. Its really weird, as this worked really well with newton2.x.

Sometimes objects are moving faster than they should and the simulation is not deterministic. I think a lot of tests must be made with newton3 update algorithm, as there are now: NewtonUpdate, NewtonUpdateAsync andNewtonWaitForUpdateToFinish. I think newton must be calibrated correctly...

Did you encounter those issues?



23-08-2017 22:18:09

I found it out. Each time OgreNewt is stopped from being updated and updated again, a clean up must be made:

void World::cleanUp(void)
// if we are run asynchronous we need make sure no update in on flight.
// clean up all caches the engine have saved

I need that, since in my Level-Editor I can create a world and press play button to simulate physics and stop the simulation etc.


28-08-2017 07:49:27

Good news, at least my efforts helped somebody :). I'll update this thread if I manage to implement more features.

Not sure where m_OwnsBody was needed, maybe my code had something special.
I think the gravity should be included, most bodies will use the same gravity in my point of view, and the others will not use the standard callback anyway. It seem wrong to have hard coded gravity in standard callback.