IPhysics - Newton/Irrlicht framework

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

IPhysics - Newton/Irrlicht framework

Post by Nick_Japan »

I've just released the first version of IPhysics, which is a set of classes for using Newton and Irrlicht together. It is also the spiritual successor to the 'Newton Vehicles in Irrlicht tutorial' which I wrote, oooh, two years ago? (For Irrlicht 0.6! Back in the day...)

There have been and indeed still are a few Newton / Irrlicht things around, but here's what I'm designing for with IPhysics:

- Designed wholly for Irrlicht use - everything uses native Irrlicht classes like vector3df.
- Really easy to use - no need to wrestle with Newton callbacks.
- Seamless integration into your project - the interface design is inspired by Irrlicht's: you have one root object through which all calls are made, and you are returned pointers to abstract interface classes so you can only call the functions that you need.
- Supports all the usual functionality that everyone's always trying to implement - terrain, collision tree, vehicles...

So that's the plan, anyway. The current release supports:
- cubes
- spheres
- terrain
- static meshes (levels etc)
- (simple) vehicles

Screenshot:
Image

The download package contains the full source, documentation, some examples and example code, and a precompiled static library so you can use it in your own projects.

Clickys:
Website | Direct Download

The next big things on my to-do list are:
- character controller
- timing / update fix

To all Newton users: how do you run Newton with a correct timestep? From what I can see, passing Newton a 'correct' timestep makes it run in slow-motion, and passing it a stupidly big value just makes it decide for itself what the timestep should be (you can check with NewtonGetTimeStep() what it actually used), based on what minimum frame rate you specified with NewtonSetMinimumFrameRate().

To everyone else: the above is why I'm creating IPhysics - so we don't have to go through all that ever again!
Image Image
JPulham
Posts: 320
Joined: Sat Nov 19, 2005 12:06 pm

Post by JPulham »

COOOL :shock:
love it... thanks.
BTW... any chance of ragdolls aswell? :D :roll:
pushpork
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Your my hero for the day!

The examples are good and it runs fast and easy to use :D
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

I have everything linked properly and the DLLs are in the same folder etc. however when I try to compile example 1 in my project...

[Linker error] undefined reference to `CPhysics::CPhysics()'
[Linker error] undefined reference to `CPhysics::init()'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::addEntity(SPhysicsCube*)'
[Linker error] undefined reference to `CPhysics::~CPhysics()'
[Linker error] undefined reference to `CPhysics::~CPhysics()'

I also have all the Newton libs linked. I use Irrlicht 1.1 and Newton 1.53
Lee Zhi Eng
Posts: 34
Joined: Tue Aug 22, 2006 2:48 pm
Location: Malaysia

Post by Lee Zhi Eng »

it seems like much easier to use than the original newton engine!
zeno60
Posts: 342
Joined: Sun May 21, 2006 2:48 am
Location: NC, USA
Contact:

Post by zeno60 »

This will come in very handy for a lot of people, good work, and good luck on future updates.

As far as your timestep question, a lot of questions asked about how to update newton with a correct timestep get responces linking to http://www.gaffer.org/fix-your-timestep

No doubt you have seen it if you have scoured around the Newton forums. I've glanced over it a few times, haven't tried implementing it though. :?
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

@zeno60: Nice one - thanks for the link. Hadn't seen that one - I found lots of things on the Newton forum about time splicing, which looked a bit odd because from what I could tell you ended up calling NewtonUpdate several times per frame.

@monkeycracks: do you have the line:

Code: Select all

#pragma comment(lib, "IPhysics.lib")
in your header?
Image Image
gfxstyler
Posts: 222
Joined: Tue Apr 18, 2006 11:47 pm

Post by gfxstyler »

hi!

do you plan to support ode, too :D ? im just curious
TheGameMaker
Posts: 275
Joined: Fri May 12, 2006 6:37 pm
Location: Germany

Post by TheGameMaker »

Hey Thx.. plus source!!! Big thanks...
But you didn´t got constrains to work, did you??
Well i´ll have a look, if im able to do them...
Greetz TGM
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

@gfxstyler: No plans for ODE.

@TheGameMaker: No constraints yet - my plan is to go through and implement all the Newton basic types first, and then a character controller. The main reason for this is that a lot of this stuff is floating around already - Mercior's original tutorial, my vehicle stuff, and then people like dhenton have made some great FPS character controllers, so hopefully it should all come together quite quickly.
Image Image
nasty
Posts: 8
Joined: Thu Sep 21, 2006 8:06 am
Location: Italy

Post by nasty »

Wow Nick, really a great work.
I'm looking for a good wrapper for Irr/Newton .. until now!

Really thanks again!
----------------------------------------------

Free or Not-Free ?? Choose Wisely!!!
----------------------------------------------
'NaSTy'
----------------------------------------------
Emil_halim
Posts: 518
Joined: Tue Mar 29, 2005 9:02 pm
Location: Alex,Egypt
Contact:

Post by Emil_halim »

i did not use Newton from befor but this make me want to start that way.

Nick it is very easy , so keep up that good work.

have small question, i sow you impliment Cube Sphere and Car Objects, so could it be a bit more general , i.e. the Car Object has child Objects those built in the Library , and i want it to allow us to Make the hirarrchy system .

thanks

Bey.
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

I've just updated IPhysics to 1.1 - the only real fix is the timing issues, which now work properly. Everything now moves a little bit slowly, and at the moment I'm still working out why, but it's definitely more correct than it was ;)

Also a couple of interface tweaks: firstly, the IPhysics constructor now needs a pointer to the ITimer in your IrrlichtDevice. Secondly, update() doesn't take any arguments any more - it works out the timestep itself!

@Emil_halim: At the moment each entity is considered seperate - when I start adding the rest of the Newton primitives, of course I'll also add the ability to have compound primitives. More complex hierarchies are a little way off though!
Image Image
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

I am dnldin it rit now, but if it doesnt hav it please do add support for physics of fps cameras! Applying physics on camera has been a major problem for me, and if that is supported in ur code then itll definetly be really really useful for me! And BTW r u planning to make it opensource??
Nick_Japan
Posts: 98
Joined: Mon Dec 13, 2004 11:47 am
Location: Japan

Post by Nick_Japan »

Support for character control, as in the player in an FPS game, is not currently implemented but is the next feature I want to add. Shouldn't take too long as there are a couple of working implementations around. The source code is included, so yes, it is open source.
Image Image
Post Reply