Elementary Physics: Engine vs Engine

Posted By: indiGLOW

Elementary Physics: Engine vs Engine - 01/27/04 00:47

Ok so I am now thinking about phsics, and after dipping my metephorical tow into the shallow end of the pool, I am already baffled & confused. So I have a few questions that I hope some of you can help me with.

Havok, GS PE, Newton....

From what I can tell Havok is a phsics engine for the high-end developer. With multi-platform support and extream power and flexability. As such to use Havok would require high-cost as well as proving your game to them, to even get a demo. Used in some big titles such as MaxPayne2 (as I am informed). As such it is not available to most of us, but if it was, would it integrate with GS?

As for the other two, PE I know little about, I read here most advice pointed to Newton, so that is what I have looked at (demo level from their site), which is buggy but does showcase some of the phsics needed, including limited Rag-Doll. The demo show (IMHO) that Newton is not really complete but is getting close to it. I have not seen anything using GS PE (If thats its title).

So presuming that Havok is unavailable, and/or does not work with GS, what is the best route to go, when trying to achieve the following:

Rag-Doll for all bi-ped models, including the player and enemies(though this may not be player in the usual GS terms). Material/Fabric that moves accuratly, i.e hanging drapes that move as models pass through it. (Presume this uses bones/key physics points to animate).

Moving water surface, as with the fabric above, but with ripple control, i,e as objects more through the model, waves are created. (I am not talking about graphics that create the illusion, but actually moving the water surface (as seen in the title Prince of Persia for PS2), according to interaction.

Also standard things like object-object collision, weight/mass/velocity modifiers as well other elementary physics are a must. So what route to take? Which Physics engine to use if any of the above?

I would appreciate your comments, thoughts and advice.




Posted By: Rhuarc

Re: Elementary Physics: Engine vs Engine - 01/27/04 01:12

Havok is by far the most superior physics engine there is to date. However I very much doubt how it would implement with 3dgs. Might be possible, but I doubt it. Your next best option would be Newton, which is much better than 3DGS PE because it is easier to use and also available for all editions.

-Rhuarc
Posted By: myrlyn68

Re: Elementary Physics: Engine vs Engine - 01/27/04 04:08

Quote:

Havok is by far the most superior physics engine there is to date.




Superior is a bad word - popular yes, but not really superior. There are a lot of 3rd party physics engines which are more accurate than Havok (which is mostly built to just make people laugh at the way the bodies fall over).

Quote:

However I very much doubt how it would implement with 3dgs. Might be possible, but I doubt it.




If you have the money for Havok (or one of the other high dollar engines) integration is not a problem. Not only will their customer support people work with you to ensure their product performs well in your game (otherwise it looks bad on them) but you also should be able to put a body on the task of integration. It should be no harder than the task which Newton did integrating his engine with 3DGS - and he pulled that off in record speed.

Quote:

Rag-Doll for all bi-ped models, including the player and enemies(though this may not be player in the usual GS terms).




For this I either Newton of the GS PE should work equally well. You will need to develop a method of affecting the model with hinge constraints though. You should be able to script it to work on bones - though you could also use a segmented model as opposed to single mesh.

Quote:

Material/Fabric that moves accuratly, i.e hanging drapes that move as models pass through it. (Presume this uses bones/key physics points to animate).




Create your own. This is hard to do with a physics engine, and is generally better off handle by a custom deformer which acts as though it were real physics. If you wanted to get crazy though - you could create a latice using vertices and collision bodies which react to player movement. However for things like hair/clothing - there is no air to react with - so you will need to be a bit more creative here.

Quote:

Moving water surface, as with the fabric above, but with ripple control, i,e as objects more through the model, waves are created. (I am not talking about graphics that create the illusion, but actually moving the water surface (as seen in the title Prince of Persia for PS2), according to interaction.




I remember reading a white paper on RT fluid dynamics. They are really still in their infancy. While I have not looked at Prince of Persia - my guess would be that it is just really good illusions (shaders and a mesh deformation routine). This is something that has not been (to my knowledge) ever done in any published title.

Quote:

Also standard things like object-object collision, weight/mass/velocity modifiers as well other elementary physics are a must. So what route to take? Which Physics engine to use if any of the above?




All of the above. Havok could be integrated assuming you could get it. Newton and GS PE can work both at the same time - so try both and go with the one which handles the task best.
Posted By: fastlane69

Re: Elementary Physics: Engine vs Engine - 01/27/04 04:43

For basic physics (collisions and dynamical behaivior) ANY physics engine you mention will do that.

The difference is in the details. What exactly do you want the physics engine for? Havok is OVERKILL if you are doing anything but highly intensive and high object count projects. Their demo at GDC 2003 had hundreds of ragdoll biped models falling down (as if dumped into a mass grave) to demonstrate it's power; Newton and 3DGS can acheieve the SAME effect, just not with hundreds of models.

Newton is more stable but 3DGS has more support. Newton is an independent project by less than 5 people (?) and thus it's future is as strong as the comitment of said team. 3DGS obviously has a stronger development base and I don't suspect they will drop PE development in the near future. (in theory anyways)

So, here's my advice. Forget Havok. Too expensive and too powerful for what you want to do most likely.

I use the 3DGS engine and while it's buggy still, I have used it with great success and it looks great when it works.

Use the newton engine if you want (for the moment at least) a more seamless experience. I don't use it, but the buzz has it that it is more stable than 3DGS PE.
Posted By: William

Re: Elementary Physics: Engine vs Engine - 01/27/04 09:57

I believe it matters on your game. Any of the physics engine's are fine if you want basic physics such as mass/gravity and so on... Currently I am using 3dgs PE in my game, the only major problem I have as of now is that the wheels bend when I reach high altitude, and turn... Marco said he will fix that eventually though. I noticed that you want rag-doll physics, I am unsure if Newtons physics engine can handle this... but it would be quite hard in 3dgs PE. I guess it all comes down to what you can afford, Havok...mega bucks, 3dgs PE... pro version, Newton...Free, also compatability is an issue too.
Posted By: ventilator

havok ode newton - 01/27/04 19:11

havok isn't the most superior physics engine out there! i talked to a few people who used or evaluated havok and they stated that it has very similar problems to ODE (which gets used in a6).

what i don't like about ODE is that its algorithm relies on relaxation parameters. this makes it very difficult to get (complex) simulations stable and really rigid joints aren't possible.

another free (but without source code) physics engine to look at is http://www.tokamakphysics.com/ .

...
but for a6 i would recommend newton game dynamics or the built in physics engine. just try out both! ...newton is faster, it doesn't need relaxation parameters, it supports rigid joints and it is totally state of the art! (but the first version of the newton 3dgs integration had some bugs.)
Posted By: ventilator

Re: havok ode newton - 01/27/04 19:49

Quote:

Material/Fabric that moves accuratly, i.e hanging drapes that move as models pass through it. (Presume this uses bones/key physics points to animate).

Moving water surface, as with the fabric above, but with ripple control, i,e as objects more through the model, waves are created. (I am not talking about graphics that create the illusion, but actually moving the water surface (as seen in the title Prince of Persia for PS2), according to interaction.




these things are soft-body simulations usually done with mass spring systems and not supported by the newton engine or the built in a6 physics engine yet.

but probably some free source code examples for mass spring systems are available for download somewhere and could get used to create an a6 plugin...
Posted By: Nardulus

Re: Elementary Physics: Engine vs Engine - 01/27/04 22:38

Hi IndiGLOW

We are blessed with two good solutions. GS PE works pretty good and it is getting better. I have an open thread about Rag Doll ideas, which can be accomplished with some work. I was just hoping somebody thought about using GS PE for ragdolls before I had to.

Newton is a great addition and it is getting better also. Newton has a Rag Doll sample that is effective. For most in game effects Newton's idea for Rag Doll will work.

I bought a book called Physic for Game Developers and wrote some C Script for my Bass Fishing game. I got some simple but effective physics.

Havoc is bundled with Director 3D. You can play with it using there 30 day trial gig.

There are some fees associated with Havoc that would prevent me from using it, or writting a DLL that links it to GS.

Finally Physic's needs a good collision system. Until the collision system in GS is finished you will have a great physic's engine that is getting impact data from a primative collision system.

My two cents for what its worth.

Ken
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 01/28/04 18:11

Well I have just finished reading all the posts here so far, and would like to thank everyone for their comments.

As far as I can tell, Havok is one of the industries main physics engines, but as such it is priced out of most devellopers budgets, especially when developing for another platform such as X-Box. Considering A6 does not support (Yet!) multi-platform so the havok's platform fee is not such an issue now.

Without any examples of GS - Havok integration it is difficult to gauge, and may well be overkill for our game anyway.

On the other hand both Newton and PE seem to fall a little short of the mark, when benchmarked against engines such as Havok and so the first dilema. From what I can tell the logical path is to go with GS's engine, simply on a support basis. As a Pro owner, and considering the difference in cost Havok vs GSPro, GS is the clear winner despite its current teething problems (what ever they are )

However I want to throw something into the mix, how does this effect multiplay??? Presuming Rag-Doll could be applied to the player (multi-part-model) and you put the player in a multiplay environment, would the phsics rag doll be calculated on one machine and shared (via the server) or would each machine calculate their own? Technically all should get the same result, but not likely, lag alone could mess this up. Is this why I have not seen rag-doll in a multiplay game?

I have more questions but I must dash now......thanks again everyone

P.S Nardulus I will catch up with you in the near future.
Posted By: fastlane69

Re: Elementary Physics: Engine vs Engine - 01/28/04 23:50

THe way 3DGS does it ( and I can't speak for newton or havok, though I suspect you can set up the same) is that Physics "lives" on the server. The client receives current position visual info and the client can send physics request to the server, but thats it. There is no physics on the Client. This keeps everything tied into the server and all clients in line.

I currently have a physics enabled client/server test levels in User Contribution if interested.
Posted By: myrlyn68

Re: Elementary Physics: Engine vs Engine - 01/29/04 01:12

Quote:

THe way 3DGS does it ( and I can't speak for newton or havok, though I suspect you can set up the same) is that Physics "lives" on the server. The client receives current position visual info and the client can send physics request to the server, but thats it. There is no physics on the Client. This keeps everything tied into the server and all clients in line.




Even so - for an action/adventure style game, you should look into exceptions to the rule. Physics are processor heavy and in a large game with a lot of players you could very well crash the system if a lot of players died at once and the server had to calculate the ragdoll drops for everyone at the same time.

Anywho - that is one of the reasons why they generally leave ragdoll physics out of MMOGs - if you run it on server, it will kill your server. If you run it locally it can easily be expolited just due to the nature of simulated physics.
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 01/29/04 01:37

Yes I must admit, considering the use of ragdoll would not be limited to death's, normal hits etc will have effects too. Really I am looking at areas where physics mught cause problems, namely in a multiplayer environment, and if that is the case then I would only use phsics in key areas, like post death animation, and other things. Also in a 64player map with say 100 standard physics items, how accurate is the system? what sort of variences if any can be seen? How does the engine determine priority, i.e we both shoot the same box in different directions at the same time, will it grant one over the other? Will both forces go into the calculation pot, and if so what if 3+ etc. As far as I understand phsyics there is not a true calculation yet that can accurately realise the bounce from 3 or more balls hitting together. This is a maths issue, not just a physics engine one.

So I am wondering really how reliable are any of the engines, is this something better avoided?

Anyway a new computer has just turned up so I have to oversee its delivery, lets hope their is a nice new shiny video card in there for me.....

Thanks for all your comments.


Posted By: fastlane69

Re: Elementary Physics: Engine vs Engine - 01/29/04 03:35

The three body problem you describe has to do with Gravitational attraction and the exact solution to it's equations of motion. There is no exact mathematical solution to this problem, though it can be numerically integrated with not problem.
Three balls colliding off each other has no math difficulties and from my experience with 3DGS PE, it's not a problem within the game.
All the other issues you mention are classic issues of MMOG design, not just focused around the physics engine. Do some research on MMOGs and Multiplayer Optimization and it might answer alot of these questions.

Posted By: bupaje

Re: Elementary Physics: Engine vs Engine - 01/29/04 05:10

A dumb question but .... you mention how processor heavy the physics is. I was just wondering if it might not be possible to create a hybrid or blended use of physics. For example the player is struck and has the initial ragdoll effect which segues or blends into a standard death animation. In other words I have a standard animation for dying and so when player is hit he has a brief ragdoll effect which morphs to the start point for the regular animation -the physics is set up so the player rotation etc end matches the beginning of a standard animation.

Like I said may be dumb idea but what I mean is if you could have some of the realism of physics but reduce the overhead required by say reducing the actual physics calculations by half. Hope this was clear.
Posted By: Marco_Grubert

Re: Elementary Physics: Engine vs Engine - 01/29/04 05:27

@bupaje: Yes that could be done, but it would be tough and you will probably see some popping from changing between a hinged ragdoll (separate models for arms, legs, etc) and a boned model.
I still think that Unreal Tournament 2003 has done it very well: they use animated or boned models and when critically hit convert it to a ragdoll and after a while disable physics on that ragdoll until respawn.

Realtime fluid dynamics in 2D is possible but wasteful since you can get good-looking results just by having a mass-spring grid and pretty textures. Coming back to UT2003, it seems that whenever something hits a water surface the closest vertex gets displaced and then the grid wiggles around until it reaches equilibrium.
Water grids and cloth and jelly could all be done in C-Script. Here's an excellent intro:
http://www.intel.com/cd/ids/developer/asmo-na/eng/segments/games/resources/physics/20413.htm
Posted By: bupaje

Re: Elementary Physics: Engine vs Engine - 01/29/04 05:40

Quote:

...that could be done, but it would be tough and you will probably see some popping from changing between a hinged ragdoll (separate models for arms, legs, etc) and a boned model....




That's interesting -and cool. On the popping comment maybe models using IK (someone mentioned IK in another thread) would be a better match for an approach like this as it sounds 'similar' to me.
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 01/29/04 19:11

Going through this thread again, it is obvious to me now, that many of the questions I posted here, do not require a physics engine at all. The water and cloth (curtains, drapes, etc) can all be handled in a variety of ways, including bones, mesh-morphing and good old fashioned vertex-by-vertex mathematics. For example to create water that rises and falls as bodies break the water surface and move about within it: A simple spring maths system that returns all vertexs within the water mesh to a relative 0 z axis, bouncing between - & + z values, that adds to the z axis of the vertexs relative to the model that is influencing them, and the vertexs around them. (obviously the mathematics is a little more complicated than this). Combined with reflective shaders, bump mapping, and possibly a sqewed view mapped onto the water model, to create the natural light bending water illusion.

In short, many of my questions can be resolved without a physics engine, as Marco points out. Some of my questions are still valid though so I will push on.

Rag-Doll does not need to be used for normal movement/game play, it could only be used when a model is dead, in which case any variations of model position, would not effect the game play, and would not be exploitable. However we would like explosions and other forces like weapons fire, to be able to move phsyics objects, and for players to be effected in the same way. So models caught in an explosion, that survive, should be able to get back up, after the physics finished with the player, i.e player comes to a complete stop. So control would be past back to the player after this point.

So technically could we swap from mdl part/bones animation to rag-doll and then back again? And are there any issues with this, and which physics engine is best suited? Considering that we intend to build a 64 player multiplay option, so possibly 8-12 models getting effected by explosions, and other objects (hit by a car for example, I say this as we expect to have drivable-vehicles in our game)

Thanks again everyone


Posted By: ventilator

Re: Elementary Physics: Engine vs Engine - 02/09/04 06:43

check out the new newton tech demo. it's very cool! -> www.physicsengine.com
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 02/09/04 21:14

I have already done that Ventilator, and as Newton is a good example of the current state or the...affordable......physics engines, my inclination to look to Havok, is more so. I appreciate that the Newton engine, can (almost) handle a lot of todays game physics, its techdemo is very buggy, and falls over easily. I tested the demo to breaking point and beyond, and found that although the basic engine worked ok, when you combined different complex physics Newton got confused and either had strange results, or just completely stopped working. I found that the swinging lights would disapear through the ceiling, the rag-doll bear on the fan, quickly got in a mess, and often once one part stopped, it all did.

Thats not to say that Newton is not impressive, far from it! Newton is very cool, its just not at a commercial level yet [IMHO], I still have not seen anything of the GS physics, but in truth that is becuase I am busy working on the games shader materials, (your wiki is very useful), and trying to understand this 9800 reflection bug, more on that in another thread!, so I have yet to spend enough time looking at physics engines.

So again I come to the question, Will Havok & GS work together?

Thanks for the interest Vent....
Posted By: Newton

Re: Elementary Physics: Engine vs Engine - 02/10/04 02:40

We are very sorry that Newton did not meet the high expectations of IndiGLOW. He has such very high standards that he should not use Newton, instead He should use something better (GS professional or Havok maybe).

Newton is for those that do not have the budget (more than hundred thousand dollars for the Havok case), the programming expertise, and a household brand for company name.

There are other alternative to Newton, but let me make this analogy. A physics engine is like a formula one car. They can run very fast but they are very temperamental and unstable, You need to be a really good pilot to drive them. This applies to any physics engine you try. But I think that IndiGLOW new that already. Let me tell you that I have evaluated many physics engines commercials and freeware. You can blame Newton for lacking some features (something that will be corrected soon), but when it comes to stability Newton come on top.

I am dying to see IndiGLOW Havok demos with Game Studio.
IndiGLOW we are sorry we lose you as a user. But we will still welcome you should you decide to come back.

Newton
Posted By: fastlane69

Re: Elementary Physics: Engine vs Engine - 02/10/04 04:42

In answer to your question, Havok provides c++ SDK I believe and thus is perfectly integratable with 3DGS WMPs and WDLs through the SDK.

Now then, what about the 3DGS PE? You sweep aside Newton PE, but what about 3DGS PE? Where does it fall short?

As to your choice,, I guess it comes down to how important certain key features are to you. If ragdolls and the full spectrum of PE support is what you need, Havok is the only professional solution. If not, then you can find a professional solution in either Newton or 3DGS. All I've seen of havok are their demos at the GDC and few things it can do that you can do with 3DGS PE or "fake" physics.

Also, wouldn't your monies be better spent in other areas of your Game Development rather than putting down $70k for non royalty based liscence alone??? Are you using a another liscense?
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 02/10/04 20:31

@fastlane69:

I stated above, I have not seen "anything" from GS PE, and was simply using Newton as a benchmark, that I presumed that GS-PE was of an equal standard and thus may suffer from the same problems as Newton. In all fairness until I see PE first hand, I will not be able to draw any solid conclusions as to its potential.

As we develop our title we are aware that the industry standards in many ways shape the expectations of the buyer. So to commercially compete for these buyers we must be able to deliver what they expect from a game. Titles like Max Payne 2, only touch the surface of the Havok PE's potential, and new titles like the eagerly anticipated Doom3 undoubtably will push the buyers PR expectations further than before, (I am not saying Doom will use Havok or that it will feature physics, just a hypothetical example ).

So from our point of view, it is not the price tag of the PE that matters, it is the capabilities, reliability, support and ease of integration that is the deciding factor. Not forgetting the public awareness of said PE. We are already expecting costs of $100K-150K to fully realise our title, including the $10K royalty-payoff for A6 to conitec. So IF we signed up with Havok, royalty free or otherwise, it would not be a financial question. That said we are not going to give $70k for a PE if what we need is already possible in GS-PE or for that matter Newton.

Finally to even talk to Havok they need to see your development on your title first, before they will talk PE and costs, and if Havok was the only viable PE for us, but it could not integrate with GS, this entire 'you-show-me-I'll-show-you" would be irrelevant, and thankfully the first sentance of your reply answers this question, so thank you for that.

Interestingly today I showed a colleague the Newton PE demo, and they were reasonably impressed, though it stopped working after 10mins, and a few other niggles, but generally ok. If you have anything similiar developed in GS-PE, we would love to look at it as this would greatly help our forward planning.

Thanks for all your comments and questions.
Posted By: fastlane69

Re: Elementary Physics: Engine vs Engine - 02/11/04 03:22

I see. Yeah, exposure for both engines is inadequate atm really. There are few projects that use the 3DGS PE successful: one is the crane demo, another is the fx ball demo, and I think there is a game based off the fx demo. I think all of these are in teh download section.

You're doing the right thing then sniffing around as you are. Another way to look at this debate is from teh angle of development and deployment time. Both the 3DGS and Newton engine have been out for less than a year. Havok has been out for ages (at least 3 years??) and thus it's not unreasonable to pay more for the guarantee of a stable usable product.

GL bro. Keep us posted on your decisions. Even if you go for Havok, your reasoning and decision making that would be really useful posted on the forums.
Posted By: Cauchy

Re: Elementary Physics: Engine vs Engine - 02/13/04 17:09

@indiGLOW:

Quote:


Interestingly today I showed a colleague the Newton PE demo, and they were reasonably impressed, though it stopped working after 10mins, and a few other niggles, but generally ok.





I see that you are still running Newton's old demos. Those were put together in a day or so right after the integration of Newton with 3DGS to show the capabilities of the engine. Newton has improved significantly since those demos were released. You should download the "Newton stress test 1" from Newton Game Dynamics

I have seen several videos showing off the features of the "big" engines, but I have not seen many playable demos. With the videos you don't see the bugs.

It is a good thing you are shopping around before spending a lot of money and resources on your project. You will need plenty of time and effort if you are planning to integrate your game with a new physics engine. Me, I take the easy route: Newton has done the work for me

Good luck!
Robert
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 02/13/04 23:48

Yes I will download the latest Newton demo, very soon. As I say earlier in this thread, I am simply researching the current market, looking for what the buying public expect from a new title, and ultimatley how to achieve this.

The more I 'chew-the-fat' on this issue, the more i realise that there is much more time to be invested before I settle on a workable solution. It is of course possible that we may stump to NOT choose a PE and to simply code the maths for the specific action we require (explosion physics etc).

As I understand it, PE can be implemented much later in a project due to the plug-in method, i.e models rag-doll can be left until later, and so I do not expect to resolve this question until later in our project, (maybe later this year, or early next.), and that I am simply getting feedback from those who are already there.

I envision 'Shopping-Around' for some time yet!
Posted By: indiGLOW

Re: Elementary Physics: Engine vs Engine - 02/17/04 00:43

@Cauchy: Yes I downloaded the latest tech demo of Newton, and after playing with it, (with a big on my face), I can see that Newton is a serious contender for a PE. I will explore it more..... thanks for the heads-up!
© 2024 lite-C Forums