• The Garry's Mod VPhysics Replacement Project
    757 replies, posted
[QUOTE=Grayman;43765973]Alrighty, well if you have any problems be sure to detail them here, because I'm sure others may want to know how to fix any problems with linux builds.[/QUOTE] I did get it built. Not tried it out in GMod yet, still fixing some crashes it's deciding to do even without the replacement VPhysics. Had to edit the Makefile a bit to get it to build though. What I did was: * Change SRCDS_BIN_DIR obviously. We're meant to do that. * Change SOURCE_SDK to the submodule. No big deal but why isn't this the default path? I imagine you have it at a different path on your install. * Change the tier1 and mathlib dynamic libs locations. The submodule links to 2013 Source SDK and the paths are incorrect for that SDK. I changed them to $(SOURCE_SDK)/lib/public/linux32/tier1.a and $(SOURCE_SDK)/lib/public/linux32/mathlib.a * Add -DPOSIX and -DGNUC to the DEFINES. Valve don't seem to use __GNUC__ (in the 2013 SDK at least) More of a note for everyone else, but if anyone is having any other troubles, you need gcc-multilib and g++-multilib. You can get them through apt-get or some other alternative. Think I covered everything.
[QUOTE=Bo98;43799903]I did get it built. Not tried it out in GMod yet, still fixing some crashes it's deciding to do even without the replacement VPhysics. Had to edit the Makefile a bit to get it to build though. What I did was: * Change SRCDS_BIN_DIR obviously. We're meant to do that. * Change SOURCE_SDK to the submodule. No big deal but why isn't this the default path? I imagine you have it at a different path on your install. * Change the tier1 and mathlib dynamic libs locations. The submodule links to 2013 Source SDK and the paths are incorrect for that SDK. I changed them to $(SOURCE_SDK)/lib/public/linux32/tier1.a and $(SOURCE_SDK)/lib/public/linux32/mathlib.a * Add -DPOSIX and -DGNUC to the DEFINES. Valve don't seem to use __GNUC__ (in the 2013 SDK at least) More of a note for everyone else, but if anyone is having any other troubles, you need gcc-multilib and g++-multilib. You can get them through apt-get or some other alternative. Think I covered everything.[/QUOTE] Whoops! I forgot to update the paths. I'll also apply some of these fixes. Thanks!
I don't know if this has already been answered, but I haven't seen it before. It seems like, in valve's physics, that ropes are able to be 100% solid when pulled/pushed on. But, not so for welds. Could we use a combination of welds and ropes to create even more solid constraints? Regardless, the Bullet welds look 9000 times better than Havok's. About the tank tracks, I was indeed referring to contraptions. I was wondering how collisions have been behaving (I haven't had a chance to try it out myself yet, though I think I will tomorrow) because the biggest issue I've had with tracks is the "catching" issue props have when they are pressed together with a lot of force. They seem to have infinite friction, and get kind of 'stuck'. What other types of physics things would count as "features"?
[QUOTE=Skyfire12;43805433]I don't know if this has already been answered, but I haven't seen it before. It seems like, in valve's physics, that ropes are able to be 100% solid when pulled/pushed on. But, not so for welds. Could we use a combination of welds and ropes to create even more solid constraints? Regardless, the Bullet welds look 9000 times better than Havok's.[/QUOTE] You're going to have to rephrase this. I'm not sure what you mean. Are you talking about in valve's vphysics? Because if so, it has been way too long since I've last played with it, I wouldn't be able to answer that. [QUOTE=Skyfire12;43805433]About the tank tracks, I was indeed referring to contraptions. I was wondering how collisions have been behaving (I haven't had a chance to try it out myself yet, though I think I will tomorrow) because the biggest issue I've had with tracks is the "catching" issue props have when they are pressed together with a lot of force. They seem to have infinite friction, and get kind of 'stuck'.[/QUOTE] I think this is a source engine performance limitation kicking in. You can probably disable this with physenv.SetPerformanceSettings in lua. [QUOTE=Skyfire12;43805433]What other types of physics things would count as "features"?[/QUOTE] Physics related stuff that valve's vphysics can't already do. Soft bodies, for example (which are going to be implemented eventually).
I really want to see how zero-gravity would be or could be re-done/affected by this.
[QUOTE=Grayman;43805695] Physics related stuff that valve's vphysics can't already do. [B]Soft bodies[/B], for example (which are going to be implemented eventually).[/QUOTE] We are talking about rather solid bodied objects being deformable and not only things like ragdolls correct? Example:(Single prop) Steel frame vaguely shaped as a car hitting a wall at high speed causes the frame to deform.
[QUOTE=TheMrFailz;43808780]We are talking about rather solid bodied objects being deformable and not only things like ragdolls correct? Example:(Single prop) Steel frame vaguely shaped as a car hitting a wall at high speed causes the frame to deform.[/QUOTE] Yes, cloth and object deformation. Ragdolls aren't soft bodies, they're just a bunch of constrained rigid bodies. [QUOTE=pilot;43805872]I really want to see how zero-gravity would be or could be re-done/affected by this.[/QUOTE] You can already set the gravity of objects independent of the environment's gravity, if that's what you mean.
[QUOTE=Grayman;43809079]Yes, cloth and [B]object deformation[/B]. Ragdolls aren't soft bodies, they're just a bunch of constrained rigid bodies. You can already set the gravity of objects independent of the environment's gravity, if that's what you mean.[/QUOTE] Good to hear. Building more realistic vehicles HO!
[QUOTE=Grayman;43809079]Yes, cloth and object deformation. Ragdolls aren't soft bodies, they're just a bunch of constrained rigid bodies. You can already set the gravity of objects independent of the environment's gravity, if that's what you mean.[/QUOTE] You got my interest! Which kind of Lua bindings do you think we'll have access to?
[QUOTE=CrashLemon;43809578]You got my interest! Which kind of Lua bindings do you think we'll have access to?[/QUOTE] Considering lua will probably be the only way I'll be able to test soft bodies and render them, that API should be pretty thorough. I'll try to make the other bindings cover stuff that Garry's bindings don't. And some stuff has already been binded to lua, check out GMVPhy source code on the repository. Above the functions are comments detailing how you can call them from lua. [editline]6th February 2014[/editline] Here's a new build since it has been a while: [url=https://dl.dropboxusercontent.com/u/5619434/Development/muyphysics.zip]Download[/url] | [url=https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3UA358MF6QLZE]Donate[/url]
[QUOTE=Grayman;43809079]You can already set the gravity of objects independent of the environment's gravity, if that's what you mean.[/QUOTE] Yeah, but if you were to play with the gravity system now. (Talking about playermodels) the best you can get is your player going upwards, or to slowly drift without control. What I'm hoping is to better this system to maybe add, 360 degree control. (Maybe not necessarily all done with VPhysics Replacement) but to make it like the swimming in water.
Another question popped into my head. Would the new physics engine make props loose inside other props less black-holey? (ie. physgunning a shipping container full of barrels or a box filled with cans)
If you're in a position to add new kinds of constraint (or if we will be when you're done), a version of 'advanced ballsocket' which locks the rotation of two entities but allows a modifiable per-axis rotation ratio between them would be a great thing for the build community. Intended behaviour being if I turn entity 1 30 degrees and there's a ratio of 0.5, entity 2 turns 15 degs. Could lead to interesting things but would have a primary use in stable, low-lag vehicle gearing. Great work regardless, the more-solid constraints look really useful.
[QUOTE=pilot;43817060]Yeah, but if you were to play with the gravity system now. (Talking about playermodels) the best you can get is your player going upwards, or to slowly drift without control. What I'm hoping is to better this system to maybe add, 360 degree control. (Maybe not necessarily all done with VPhysics Replacement) but to make it like the swimming in water.[/QUOTE] Rotating players has nothing to do with vphysics. It's already possible with source. [QUOTE=winsanity;43821444]Another question popped into my head. Would the new physics engine make props loose inside other props less black-holey? (ie. physgunning a shipping container full of barrels or a box filled with cans)[/QUOTE] Nope! The physgun as of now directly sets the velocity of the objects (we do it, but this was the behavior with IVP). It can probably be "fixed" by making the movement more smooth, such as increasing the seconds to arrival to something bigger. [QUOTE=Splambob;43821992]If you're in a position to add new kinds of constraint (or if we will be when you're done), a version of 'advanced ballsocket' which locks the rotation of two entities but allows a modifiable per-axis rotation ratio between them would be a great thing for the build community. Intended behaviour being if I turn entity 1 30 degrees and there's a ratio of 0.5, entity 2 turns 15 degs. Could lead to interesting things but would have a primary use in stable, low-lag vehicle gearing. Great work regardless, the more-solid constraints look really useful.[/QUOTE] Not too sure what you mean (may need a picture), but I'm going to add in a user constraint type soon, and I'll also bind it to lua.
VPhysics builds are back up [url=http://peniscorp.com/vphysics/]here[/url]!
[QUOTE=Grayman;43822151] Not too sure what you mean (may need a picture), but I'm going to add in a user constraint type soon, and I'll also bind it to lua.[/QUOTE] A gear constraint, so when you rotate one object, the other object will rotate by a ratio of the first object, like a gear
[QUOTE=viperfan7;43836838]A gear constraint, so when you rotate one object, the other object will rotate by a ratio of the first object, like a gear[/QUOTE] Ah. Already implemented in bullet in BulletDynamics/ConstraintSolver/btGearConstraint.cpp but it'll have to be exposed in the interface.
Wow, that looks great. Also looking forward to the user constraint type you mentioned, it'll make GMod a lot more interesting.
Woo! Colossal amount of changes up at [URL="https://github.com/DrChat/Gmod-vphysics/commits/master"]github[/URL], check it out! If anyone wants to do some cool benchmarking, I rewrote my bullet thread pool implementation to allow runtime resizing of threads. Just change the vphysics_numthreads convar, the thread pool resizes instantly. [url=http://peniscorp.com/vphysics/]Download[/url] And a side note: Please send me some more [URL="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3UA358MF6QLZE"]donations[/URL]! Haven't had anything for a week.
Will be donating! Because awesome. Just started the semester, so life's wonderful again. (not) Really happy to hear about the gear constraint. I almost can't believe soft body props would be possible. So, for example, the dumpster lid could be shot with a cannon ball and dented inward? Or even penetrated??? [editline]10th February 2014[/editline] [QUOTE=pilot;43817060]Yeah, but if you were to play with the gravity system now. (Talking about playermodels) the best you can get is your player going upwards, or to slowly drift without control. What I'm hoping is to better this system to maybe add, 360 degree control. (Maybe not necessarily all done with VPhysics Replacement) but to make it like the swimming in water.[/QUOTE] Are you referring to the fact that you cannot go upside down? Like, your playermodel is locked vertically (like keep upright), even though you can look around. There was a tool that allowed you to apply gravitation to a prop and turn it into a surface to walk on basically. It was really cool, and if you stood on a plate, applied zero gravity to it, and then let it float, you would just float around on it going upside down etc. If i can find video later I'll post it. But, like Grayman said, this would be completely unrelated to vPhysics, (if you didn't know that).
[QUOTE=Skyfire12;43865885]Will be donating! Because awesome. Just started the semester, so life's wonderful again. (not) Really happy to hear about the gear constraint. I almost can't believe soft body props would be possible. So, for example, the dumpster lid could be shot with a cannon ball and dented inward? Or even penetrated???[/QUOTE] Yep, soft bodies cover deformation of objects and cloth. Tearing of soft bodies might require a little bit of work on my part though. However, I'm not too sure about how rigging models for soft bodies will be setup yet.
[QUOTE=Skyfire12;43865885]Will be donating! Because awesome. Just started the semester, so life's wonderful again. (not) Really happy to hear about the gear constraint. I almost can't believe soft body props would be possible. So, for example, the dumpster lid could be shot with a cannon ball and dented inward? Or even penetrated??? [editline]10th February 2014[/editline] Are you referring to the fact that you cannot go upside down? Like, your playermodel is locked vertically (like keep upright), even though you can look around. There was a tool that allowed you to apply gravitation to a prop and turn it into a surface to walk on basically. It was really cool, and if you stood on a plate, applied zero gravity to it, and then let it float, you would just float around on it going upside down etc. If i can find video later I'll post it. But, like Grayman said, this would be completely unrelated to vPhysics, (if you didn't know that).[/QUOTE] You're thinking of the Gravity Hull Designator. Sadly, there's been no updates for a year now.
been having trouble with the advanced ballsocket tool and axis in the new vphysics where they have been crashing
[QUOTE=tonymul;43904577]been having trouble with the advanced ballsocket tool and axis in the new vphysics where they have been crashing[/QUOTE] What objects are you constraining together?
Gorgeous, simply gorgeous. Words cannot describe the excitement I have whilst thinking about this project. Please look forward to some substantial donations. After overcoming the initial wave of adrenaline I was left with two very important questions. The first being, will your drop-in replacement for vphysics require any modification client-side? The reasoning for this question is more of a concern that requiring modification on the client would substantially decrease the random player base a server using this module would encounter unless it is such a work of art that Garry himself adopts the project into his game. It would only make sense that clients would require the module as well due to the fact that the result of physics calculations would leave clients out-of-sync with the server. I don't know enough about the innards of source but I would assume that clients periodically receive positioning and rotational updates from the server to keep them in sync, that being said having objects randomly snap to their correct placements would not be that big of an issue when you consider the performance gains from this module. Which leads me into my second question, Bullet is soon to release Bullet 3.0 which includes a very cutting edge feature, offloading physics calculations onto GPU's will this be a feature you adopt? Servers with GPU's would see substantial performance gains and that there speaks for itself. Thank you for taking the time to read my post and for your time developing this module. /endwhateverthisisrantmaybe ;)
IIRC physics is all done serverside and clients lerp the positions.
I am going to support this module as much as I possibly can, I have installed the module into my public test server and plan to keep it there in hopes of reporting as many bugs as I can, if anyone wants the IP address to see how multiplayer works for themselves feel free to add me, I will not post the address here due to the fact that I am not trying to advertise. :) <3
GPU support would be cool, but I'm pretty sure it's not worth the effort. Most server boxes don't have dedicated gpus, and the ones that do are pretty expensive( $570/month for an amazon g2 instance...ouch ) Edit: For comparison a comparable instance(8 logical core xeon, 15gb ram) without a gpu is $174 on nfoservers.com
Clientside vphysics isn't required, because as Ott said, the client just lerps positions received from the server. The only things the client physics is used for are ragdolls (from players dying, not synchronized) and gibs. Also, it's fine to post your IP here, as long as it's vphysics related. About GPU support: I'm just not seeing the reasons to move to bullet 3 for that. Server providers just don't have GPUs installed in their farms, and I doubt I can change that. Also, bullet 3 removed the soft body library and the multithreaded library for reasons of having a rewrite or something.
Physics on GPU is certainly a nice feature if you play singleplayer or with a listen server, but exchanging it for multithreading feels like a pretty dumb thing. Better to wait for stable versions of both.
Sorry, you need to Log In to post a reply to this thread.