Sign in to follow this  
mikfig

PhysX or Havok

Recommended Posts

I am planning on making a game with some friends of mine, and I want to use either PhysX or Havok. However, I'm not sure which one to use. Havok provides Havok Animation and according to my understanding of it, it will handle all the animation code for you. However, PhysX provides Cloth simulation, fluid simulation which is not free with Havok. If it is possible to combine PhysX with Havok's Havok Animation then that is way I think I would go if it wasn't bad for performance. Also I'm not sure if PhysX is better designed to run on multiple cores or if it truly runs on the GPU. Can someone help me decide which is best, I want to have physics simulation in our game but I want to focus on the graphics and gameplay code. Don't worry, I have already heard the "start small and work up" and I have also just recently read http://scientificninja.com/advice/write-games-not-engines. Thanks, Mikfig

Share this post


Link to post
Share on other sites
Havok comes with the same tools companies like Bungie or Valve use. Ageia has just some open source project. If you want to make a game I would go with Havok. The cloth is Ageia is nothing special. You can simply code it yourself. Maybe 200 lines of code to write a Jacobsen cloth solver.

HTH,
-Dirk

Share this post


Link to post
Share on other sites
Havok tools aren't that great, neither are PhysX though. The fact that PhysX tools are open source is a huge plus, nvidia still have staff working on them, so I don't see how one can rank that as a bad thing. As it currently is Havoks Maya pipeline is more robust, but PhysX is more feature rich but buggy as shit. From a programming view they both have a visual debugger, the difference here is that PhysX visual debugger is A LOT better than Havok, mainly because Havoks doesn't have an object inspector.

In terms of API, Havok is a lot better designed and overall more robust. Once again I'd say that PhysX have more features though. The largest problem with PhysX I think is that most of their engineers most likely weren't top notch programmers, even if they were kick ass at physics, but that's just a hunch :P

One can simulate cloth by using springs with some success, but PhysX cloth solver is no 200 lines of code which someone whips up in an evening. Check out http://www.matthiasmueller.info/publications/hpbd.pdf .

If I didn't need the features of PhysX I would go for Havok, it overall feels better and they have a lot better support ( nvidia provides really shit support for PhysX at least if you're not a serious developer which forks up a shitton of cash ). If I recall correctly the PhysX license is a lot cheaper and overall better for hobby developers.

Share this post


Link to post
Share on other sites

Quote:

One can simulate cloth by using springs with some success, but PhysX cloth solver is no 200 lines of code which someone whips up in an evening. Check out http://www.matthiasmueller.info/publications/hpbd.pdf .


A cloth solver is indeed implemented in an evening. You don't need a multigrid approach to get the cloth stable. There are much better and simpler ways. I even doubt that this is already implemented in the latest SDK.

Quote:

If I didn't need the features of PhysX I would go for Havok, it overall feels better and they have a lot better support ( nvidia provides really shit support for PhysX at least if you're not a serious developer which forks up a shitton of cash ). If I recall correctly the PhysX license is a lot cheaper and overall better for hobby developers.


To my knowledge both are free on the PC.



Share this post


Link to post
Share on other sites
Quote:
Original post by DonDickieD
Havok comes with the same tools companies like Bungie or Valve use. Ageia has just some open source project. If you want to make a game I would go with Havok. The cloth is Ageia is nothing special. You can simply code it yourself. Maybe 200 lines of code to write a Jacobsen cloth solver.

HTH,
-Dirk


Actually, Ageia PhysX (now nVIDIA PhysX) is not open source, and never was.

Share this post


Link to post
Share on other sites
With respect to GPU and multicore, some portions of PhysX can be GPU accelerated (e.g., I think the broad phase stage of collision detection), on some (not all) GPU's. Havok doesn't use the GPU for anything currently, though there used to be a "Havok FX" module that could run some physics-based effects on the GPU. PhysX and Havok both can split some tasks among multiple CPU cores.

Both are excellent physics engines. I personally do like the character animation+physics integration stuff that Havok provides. And the new Havok Behavior module (included as an evaluation license with the free download) makes it nicer still for games that have animated characters (though you'd ultimately have to pay for Behavior if you used that module). The cloth module also appears to be be a for-pay add-on to Havok, so you won't have that with the free download. Now, as for cloth, I kind of like the PhysX cloth, which is pretty robust and supports tearing.

Share this post


Link to post
Share on other sites
Quote:
Original post by DonDickieD

Quote:

One can simulate cloth by using springs with some success, but PhysX cloth solver is no 200 lines of code which someone whips up in an evening. Check out http://www.matthiasmueller.info/publications/hpbd.pdf .


A cloth solver is indeed implemented in an evening...


Probably true if:

1. you've written one before, or know exactly what documents to look at. If not it will likely take much longer to iron out the crinkles

2. you don't need interaction with rigid bodies.

3. you're not worried about performance

Same is true for fluids etc.

The OP is talking about writing a game, not a tech demo...

Share this post


Link to post
Share on other sites
Quote:
Original post by DonDickieD
I was not talking about the engine, but the source for the Maya plug-in which is indeed open source now. See Nima in the Bullet forums


Oh, cool. That was unclear in your original message. But, for the sake of clarity, Nima was originally a third party plug-in, developed by Feeling Software and not Ageia or nVIDIA.

Share this post


Link to post
Share on other sites
I can't speak for Havok, but PhysX isn't too complicated. The only problem is they sometimes do stuff in the samples, they tell you not to do in the doc. O_o

Havok will never be optimize for GPU, since it was bought by Intel.

Share this post


Link to post
Share on other sites
The four main reason why I want to use a 3rd-party physics engine:
1. Because I think I might lack the mathematics knowledge currently
2. Because I would have to write less code and focus more on other aspects
3. Because it would most likely be highly optimized and high quality code
4. Because reading the features list makes me drool :D

I am currently a Junior in High School and I am taking Algebra II right now. I will take Pre-Calculus after Christmas and Calculus AB/BC next year. I have finished 3D Math Primer for Graphics and Game Development and I understood everything except I mainly lack a little bit of understanding with two things:
1. Quaternions
2. Rotation Transformation about an arbitrary axis

I am also currently reading Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach and I just finished reading Chp. 10 on Lighting last night. I will also get Real-Time Rendering 3rd Ed next week. As it is, the game I want to make is pretty complicated and surprise, surprise, I want to make what I like to call a MORPG. I plan on doing all the graphics code myself, and I am the one with the most mathematical experience on my team so if I wanted to do my own Physics engine that would fall almost all on my shoulders. So I am looking for a "plug-and-play" physics engine that isn't likely to break and has good support behind it. I want it to mainly do these things:
1. Collision Detection, and also tell me where objects collided, i.e. coordinates, index to vertices, etc
2. Ragdoll Physics
3. Simulation of forces such as winds
4. Integration with Animation would be nice, like Havok Animation
5. Possibly cloth simulation

Like I have said before, I know that I am taking on a huge project. But I plan on organizing it with some UML and using Scrum for the development process while breaking up tasks so we are advancing the project with "little babysteps".

Thanks,
Mikfig

Edit: I forgot to mention that so far Havok sounds like the better choice.

Share this post


Link to post
Share on other sites
Most people don't have a deep understanding of Quaternions, so don't worry to much about that.

I could be boring here and say that you should do something simpler first, but I actually think it will be a great learning experience for you to try and reach for the stars and fail ( sorry, it's just statistics ) :P

Share this post


Link to post
Share on other sites
Quote:
Original post by grhodes_at_work
Quote:
Original post by DonDickieD
I was not talking about the engine, but the source for the Maya plug-in which is indeed open source now. See Nima in the Bullet forums


Oh, cool. That was unclear in your original message. But, for the sake of clarity, Nima was originally a third party plug-in, developed by Feeling Software and not Ageia or nVIDIA.


I read through DonDickieD's post again. Reading it now, more slowly, his original intent is more clear.

It's really important that D* immediately brought up the issue of content tools. If one really wants to produce a game, the content pipeline is tremendously important. I would venture to say it eventually, even quickly, becomes more important than knowing how to use the API.

Share this post


Link to post
Share on other sites
Thank you all for your advice. I have decided that I will use Havok. However, since this is the Math and Physics forum, I have one more question. Where is the best place/book/etc to gain a better understanding of Quaternions?

Also I have trouble understanding rotation of a vector about an arbitrary axis when it comes to rotating by an acute angle. Because the way 3D Math Primer solves it is by projecting the vector, lets call it v, onto a unit vector you are rotating about. It then uses a vector that is mutually perpendicular to the unit vector and the perpendicular portion of v that was projected. Then it uses the sin and cos on the mutually perpendicular vector and the perpendicular portion of v that was projected to solve for the image of v that would be the result of projecting the image of v onto n. Then it adds the portion of the projection of v that is parallel to the unit vector to the image of v's perpendicular portion. However, if you were using an acute angle then why would you need the mutually perpendicular vector?

Thanks,
Mikfig

[Edited by - mikfig on November 21, 2008 8:49:55 PM]

Share this post


Link to post
Share on other sites

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

Sign in to follow this