Jump to content

Recommended Posts

As I've heard that some version(s? all?) of Unity 3D come with PhysX as a physics engine, I assume this is going to be used. Possibly for things like collision, cloth, spells and water, maybe leaf movement, ray casting or whatever. The point is, that this physics library is very badly coded, in some older versions at least, see here: http://www.realworldtech.com/physx87/ It's a lengthy read, but the bottom line is that nVidia used to really "de-optimize" the code to run awfully bad on CPUs, not using any features of modern CPUs in terms of instruction sets (instead relying on deprecated x87) nor making any use of multiple cores.

 

So my question is: Is this still true for the version of Unity used here, that it comes with this relic of bad software? If so, does P:E make any use of it at all? If so, would it be possible to upgrade to a more recent version of PhysX (if it has improved since), or even switch the physics engine?

Citizen of a country with a racist, hypocritical majority

Link to comment
Share on other sites

I believe they'll use some form of physics engine, if they don't, it means hand making all 3D animations, incl. flapping capes, deaths, things breaking, etc. With decent physics, a lot of it can be real time generated without looking crap.

 

I don't mind whichever way they decide to go, but to me it seems likely to include some form of physics. It means allowing dead bodies to literally go flying when you throw a fireball on it :D.

"What if a mid-life crisis is just getting halfway through the game and realising you put all your points into the wrong skill tree?"
Link to comment
Share on other sites

Every time I hear the opinion that handmade key-frame animations are crappy I like to remind people of the original Splinter Cell. No mo-cap or physics in that game, yet the animations were jaw droppingly hyperrealistic :D

 

Still, though, I agree that the Obsidian team should take advantage of physics engine in P:E.

 

/edit/

Also, about integrating PhysX with pre-rendered backgrounds - it's really quite simple I think, you only need to retain a simplified collision mesh of (polygon decimated) 3d models that you later use to render backgrounds from. The collision mesh is there just for the GPU/CPU so it's "invisible" to the player and can be added after the background art is already rendered. Basically something like the "no-walk" areas used for pathfinding... just in 3d. That's for rigid body simulation like crates, barrels, debris etc. Flowing capes (cloth simulation) are a bit different matter. But since only the backgrounds will be pre-rendered with the characters being animated 3d models that's not a problem.

Edited by Solviulnir the Soulbinder
Link to comment
Share on other sites

Has no one been reading the updates?

 

There was a picture of the background with the mesh on top of it for passable paths etc.. trees, lights and so on - My understanding would be that physics would utilise the same meshing for collisions etc.. and light sources for shadows etc..

Juneau & Alphecca Daley currently tearing up Tyria.

Link to comment
Share on other sites

This topic is actually about what physics engine they will use and why some would be a less than optimal choice - rather than about "what to use a physics engine for" ;)

Edited by samm

Citizen of a country with a racist, hypocritical majority

Link to comment
Share on other sites

Every time I hear the opinion that handmade key-frame animations are crappy I like to remind people of the original Splinter Cell. No mo-cap or physics in that game, yet the animations were jaw droppingly hyperrealistic :D

Didn't mean to imply sprite based animations are crappy.
"What if a mid-life crisis is just getting halfway through the game and realising you put all your points into the wrong skill tree?"
Link to comment
Share on other sites

This topic is actually about what physics engine they will use and why some would be a less than optimal choice - rather than about "what to use a physics engine for" ;)

I still cannot imagine a large amount of physics-enabled objects in an isometric game. Call me old-fashioned. The best they do with PhysX at its full potential at the moment is making a lot of garbage fly around very realistically. Which I wouldn't miss much even in action games, not to mention cRPGs.

Edited by Heresiarch
Link to comment
Share on other sites

All new isometric games make pretty good use of it, but as you say it's mostly to make garbage fly around. Diablo 3 & Torchlight 2 are worth a mention in this regard.

"What if a mid-life crisis is just getting halfway through the game and realising you put all your points into the wrong skill tree?"
Link to comment
Share on other sites

This topic is actually about what physics engine they will use and why some would be a less than optimal choice - rather than about "what to use a physics engine for" ;)

 

PhysX is a proprietary hardware technology of nVidia. That's the fundamental difference between PhysX and, say, Havok (the physics simulation used in games like HL2 and Bethesda's Gamebryo games. No mystery as to why it works well in HL2 and poorly in Fallout 3.) PhysX support in the engine doesn't mean PhysX can be used. You have to have a PhysX enabled nVidia GPU for it to be applicable.

 

I have an nVidia card with PhysX, so I can enable it in games that support it. In Borderlands 2, for example, what it does is add boatloads of particulate debris from explosions and bullet impacts (excessive amounts, to be honest, it doesn't slow my game down, but it looks stupid for a single little bullet decal to produce 50x its volume in rocks and concrete chunks,) and realistic physics to fabrics (almost exclusively restricted to tarps and banners and the like,) which get knocked out of the way when you pass through a doorway covered by a sheet or you'll punch a hole through a tarp suspended over an area if you jump on it instead of it being a solid object you can stand on. You can also shoot the things to shreds, or just shoot one side and the rest of it will droop off to the other side.

 

Finally, it adds fluid dynamics that look bad even on the highest and most performance intensive PhysX setting (basically it replaces a lot of static fluid particle effects and meshes with what are essentially giant droplets of water, corrosive-aftermath goo or outhouse sludge that slide around as if they were on an extremely smooth surface.) But that's about it. If that's all that one of the biggest FPS'/games of the year could think to do with PhysX it's hard to imagine any worthwhile use for it in P:E. It's a technology that has a long way to go before we have flowing rivers of individual water molecules.

 

And to reiterate: you need an nVidia card with PhysX capabilities to utilize it.

 

 

Has no one been reading the updates?

 

There was a picture of the background with the mesh on top of it for passable paths etc.. trees, lights and so on - My understanding would be that physics would utilise the same meshing for collisions etc.. and light sources for shadows etc..

 

Lighting dynamics are different from realtime particle/newtonian physics effects. Unless P:E has a day/night cycle it's unlikely to have realtime global dynamic lighting.

Edited by AGX-17
Link to comment
Share on other sites

Hm, not really informed, let me elaborate. I don't mean to sound mean or scholarly, there are just pretty incorrect statements here that only serve to confuse, so I'll try to correct some things.

PhysX is a proprietary hardware technology of nVidia.
No, it is not. PhysX is a (now nVidia owned and developed) physics middleware. Depending on its implementation, its library's functionalities can be accelerated by executing them on nVidia GPUs (Ageias cards are no longer supported afaik).

 

PhysX support in the engine doesn't mean PhysX can be used.
This statement is wrong - and pretty confusing, even if the context explains what you mean to say here ;)

 

I have an nVidia card with PhysX, so I can enable it in games that support it. In Borderlands 2, for example, what it does is add boatloads of particulate debris from explosions and bullet impacts (excessive amounts, to be honest, it doesn't slow my game down, but it looks stupid for a single little bullet decal to produce 50x its volume in rocks and concrete chunks,) and realistic physics to fabrics (almost exclusively restricted to tarps and banners and the like,) which get knocked out of the way when you pass through a doorway covered by a sheet or you'll punch a hole through a tarp suspended over an area if you jump on it instead of it being a solid object you can stand on. You can also shoot the things to shreds, or just shoot one side and the rest of it will droop off to the other side.

 

Finally, it adds fluid dynamics that look bad even on the highest and most performance intensive PhysX setting (basically it replaces a lot of static fluid particle effects and meshes with what are essentially giant droplets of water, corrosive-aftermath goo or outhouse sludge that slide around as if they were on an extremely smooth surface.) But that's about it. If that's all that one of the biggest FPS'/games of the year could think to do with PhysX it's hard to imagine any worthwhile use for it in P:E. It's a technology that has a long way to go before we have flowing rivers of individual water molecules.

 

 

And to reiterate: you need an nVidia card with PhysX capabilities to utilize it.

That's just how the Borderlands 2 devs (or possibly the nVidia dev-relations-team) have chosen to implement it. Each and every single of these effects could be calculated on the CPU as well, it would just be too computation intensive to make this a useful alternative, so they've restricted these higher settings to GPU physics. This does *not* mean that the PhysX engine is not used when it's not GPU accelerated, it just means that certain effects that you described so vividly (thanks for that, entertaining :D ) are not enabled unless there's GPU acceleration available.

 

And this again brings me to the point of this topic: If the PhysX-library included with Unity in the version used for P:E is still crippled when used executed on CPU alone - purposefully so, I dare say - in that it is heavily relying on x87 and does not use more than one core and that one core in a most ineffective manner, then: Will the devs stil go ahead and use this libary, or can and will they update it - provided it has improved since the initially posted realworldtech article - or replace it with something more flexible?

 

Unless P:E has a day/night cycle it's unlikely to have realtime global dynamic lighting.
Now this really has nothing to do whatsoever with the topic at hand ;) Edited by samm

Citizen of a country with a racist, hypocritical majority

Link to comment
Share on other sites

My bad on the lighting - It was more to say - They have meshing in place to show where walls are - So adding clutter that gets blasted around isn't much of a step up from that.

 

I'l leave this topic as it's outside my area. But I like to see stuff get blown away.

Juneau & Alphecca Daley currently tearing up Tyria.

Link to comment
Share on other sites

Unity's handling of physics looks good to me.

 

Fere libenter homines id quod volunt credunt. - Julius Caesar

 

:facepalm: #define TRUE (!FALSE)

I ran across an article where the above statement was found in a release tarball. LOL! Who does something like this? Predictably, this oddity was found when the article's author tried to build said tarball and the compiler promptly went into cardiac arrest. If you're not a developer, imagine telling someone the literal meaning of up is "not down". Such nonsense makes computers, and developers... angry.

Link to comment
Share on other sites

Unity's handling of physics looks good to me.

 

 

That just makes me hope they implement physics on big spells like fireballs and the like. It would be sweet, and almost guarantee that I make a mage lol. My one beef with many fantasy games is that my spells ignore the environment. Thanks for sharing that video.

Link to comment
Share on other sites

That just makes me hope they implement physics on big spells like fireballs and the like. It would be sweet, and almost guarantee that I make a mage lol. My one beef with many fantasy games is that my spells ignore the environment. Thanks for sharing that video.

 

Do you mean spells that effect the environment and models? Like below? Clearly, it's just someone's experiment and the particle effects are pretty basic, but it shows that it can be done.

 

http://youtu.be/aDht3p5Gr3M

Edited by Luridis

Fere libenter homines id quod volunt credunt. - Julius Caesar

 

:facepalm: #define TRUE (!FALSE)

I ran across an article where the above statement was found in a release tarball. LOL! Who does something like this? Predictably, this oddity was found when the article's author tried to build said tarball and the compiler promptly went into cardiac arrest. If you're not a developer, imagine telling someone the literal meaning of up is "not down". Such nonsense makes computers, and developers... angry.

Link to comment
Share on other sites

Physics effects that affect the environment are not likely - simply because of the nature of the pre-rendered "2.5D" environment - we just don't have 3D objects that can interact with each other.

 

Maybe we will get some "ragdoll" effects, maybe realistic cloak/cape/hair - probably some nice visual spell effects, but I really don't expect to see much that directly affects the environment as such.

Edited by Frisk
Link to comment
Share on other sites

Physics effects that affect the environment are not likely - simply because of the nature of the pre-rendered "2.5D" environment - we just don't have 3D objects that can interact with each other.

 

Maybe we will get some "ragdoll" effects, maybe realistic cloak/cape/hair - probably some nice visual spell effects, but I really don't expect to see much that directly affects the environment as such.

 

I must have misread things then. I thought some things were in 3d. I figured that some of the buildings, and perhaps crates, barrels, chests, etc could also be 3d as well and thus such effects would be possible.

 

Eh, it is wishful thinking on my part either way.

Link to comment
Share on other sites

Effects on the environment, in spite of what you see in the video, is likely to be limited to something similar to the temporary bullet holes you see in other games. The big problem with making things destructible is that someone has to make a mesh and texture that represents something having changed. Even then, you'd need one for each kind of damage that it could receive and in each spot it could receive the damage. Otherwise, you might shoot the corner of a building and then see holes in the middle of the two adjoining walls.

 

When the physics technology progresses to the point where you can give something a "material type" regarding it's structure, and an internal mesh that creates break-off points, then it can probably happen. Even then, how do you address things like burning, squeezing and liquification? Material types right now are limited to the way the object interacts with others regarding the simulated physics. Destructible things must me made as such from the ground up, including the way they splinter and shatter, etc. Think about the way boxes and pallets always shatter in one of a few animations that look the same in Half-Life 2. Even as real-time-rendering nears photographic quality, we still have a long way to go.

 

Edit: If you've seen the opening cinematic for The Witcher 2 then consider this: I'd bet a dollar to a doughnut that every piece of that shattering boat was modeled by hand.

Edited by Luridis

Fere libenter homines id quod volunt credunt. - Julius Caesar

 

:facepalm: #define TRUE (!FALSE)

I ran across an article where the above statement was found in a release tarball. LOL! Who does something like this? Predictably, this oddity was found when the article's author tried to build said tarball and the compiler promptly went into cardiac arrest. If you're not a developer, imagine telling someone the literal meaning of up is "not down". Such nonsense makes computers, and developers... angry.

Link to comment
Share on other sites

I must have misread things then. I thought some things were in 3d. I figured that some of the buildings, and perhaps crates, barrels, chests, etc could also be 3d as well and thus such effects would be possible.

 

Eh, it is wishful thinking on my part either way.

 

Oh, *some* things are in 3D, of course - characters, monsters, and (I suppose) various things that you can interact with and (possibly) destroy - crates, chests and barrels would be a very likely guess.

 

However,the problem is that the rest of the environment - including buildings are (probably) not 3D objects, so you just cannot have something like an explosion that sends a chest flying to smash into a wall - there is no 3D wall for it to smash into.

 

My guess (and it is only a guess) is that we may for example have a nice animation when somebody smashes a barrel with an axe - but it will just be a single "smashed barrel" animation, used everywhere a barrel gets destroyed in any way, and the barrel fragments will not affect the environment.

 

Same with something like a fireball - sure, I expect a nice explosion to happen, but I don't expect it to set things on fire - except maybe in a few (specially coded) circumstances.

Link to comment
Share on other sites

Edit: If you've seen the opening cinematic for The Witcher 2 then consider this: I'd bet a dollar to a doughnut that every piece of that shattering boat was modeled by hand.

 

Nope. It was a procedural destruction done in Houdini: http://www.cgsociety...her_2_cinematic

 

Hah, please don't get PE involved with crappy PhysX. If anything, you can use Bullet, which is actually open source.

 

Bullet is the worst physics engine they could possibly use. They still haven't integrated multi-threading which makes it incredibly difficult to use for good looking cloth in a decent performance range.

Edited by pseudonymous
Link to comment
Share on other sites

Bullet is the worst physics engine they could possibly use. They still haven't integrated multi-threading which makes it incredibly difficult to use for good looking cloth in a decent performance range.

* There are more possiblities out there than PhysX and Bullet

* PhysX multithreading and availability in meaningful compiled form is (was?) highly limited, read first post

* There *is* multithreading support in Bullet (at least there's a demo applications / code for it)

* You can compile Bullet yourself, optimizing it for any specs available

* Bullet provides OpenCL-support, useful on any system using a more or less recent graphics cards or integrated GPUs in AMD and Intel processors, as opposed to hardware acceleration only vor nVidia-GPUs

* Bullet is open source, so feel free to change it to fit your particular needs, instead of being a proprietary closed source crutch

 

That said, I'm not advocating to use Bullet - just not to use PhysX in the state it is described in the first post :)

  • Like 1

Citizen of a country with a racist, hypocritical majority

Link to comment
Share on other sites

* There are more possiblities out there than PhysX and Bullet

* PhysX multithreading and availability in meaningful compiled form is (was?) highly limited, read first post

* There *is* multithreading support in Bullet (at least there's a demo applications / code for it)

* You can compile Bullet yourself, optimizing it for any specs available

* Bullet provides OpenCL-support, useful on any system using a more or less recent graphics cards or integrated GPUs in AMD and Intel processors, as opposed to hardware acceleration only vor nVidia-GPUs

* Bullet is open source, so feel free to change it to fit your particular needs, instead of being a proprietary closed source crutch

 

That said, I'm not advocating to use Bullet - just not to use PhysX in the state it is described in the first post :)

 

They're looking for readily available cloth sims, which leaves Havok, PhysX, and Bullet.  

 

PhysX's cloth sim actually performs better on a CPU than Bullet's cloth sim.  Download them both and see for yourself.  This is easy for you to verify for yourself.

 

Bullet requires too much work to make it worth using.  It is currently at the state that Havok was in back in 2004, which is to say it very often looks like ass due to it's poor collision detection (see VtMB dresses riding up female characters), let alone the extremely poor performance when compared to the other two.

 

The choice is really between Havok and PhysX.  :banghead:

Link to comment
Share on other sites

Wouldn't it be easier to go to the Unity forums and ask what version of PhysX they are running?  Considering the article samm talks about in the first post is over 2 years old and just from a quick google I can see people talking about physX 2.0 during that period and expecting better optimization from 3.0 I'd think bashing PhysX based on outdated information is probably a waste of everyones time.

Link to comment
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
×
×
  • Create New...