Hit Detection?

13»

Comments

  • MkilbrideMkilbride Join Date: 2010-01-07 Member: 69952Members
    Yeah, but the game STILL uses PhysX for something, because my NVIDIA card has the little Logo that shows when PhysX is being used. So hopefully they remove it. I love PhySX myself, but it hurts performance massively, and plus, ATi, well, they'll have a hard time with that, since they refuse to support PhysX(NVIDIA offered it to them completely free of charge, but ATi wants to focus on Bullet Physics)

    Yeah, Havok is a aging titan, but still a good one. Not as good effects, but massively better performance without a dedicated PhysX GPU.
  • MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
    OT: Havok is a monster and PhysX is tiny ant in comparison. Havok has more platforms supported and uberoptimized code than any other physics "engine". I'm talking about collision detection and rigid body simulation.

    Cloth simulation looks nice but isn't core element of any game. NS2 probably doesn't use anything that would be close to cloth simulation or physics on GPU.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1821444:date=Jan 4 2011, 08:40 AM:name=Price)--><div class='quotetop'>QUOTE (Price @ Jan 4 2011, 08:40 AM) <a href="index.php?act=findpost&pid=1821444"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In some news they said they use havok instead of physx.<!--QuoteEnd--></div><!--QuoteEEnd-->
    We use Havok and PhysX (Havok for collision detection and PhysX for physical simulation). I'm currently in the process of rewriting our physics integration for improved performance.
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    :D i love hearing about what you do :) as a programmer i love all kinds of technical details :D
  • MkilbrideMkilbride Join Date: 2010-01-07 Member: 69952Members
    <!--quoteo(post=1821480:date=Jan 4 2011, 08:43 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Jan 4 2011, 08:43 PM) <a href="index.php?act=findpost&pid=1821480"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->We use Havok and PhysX (Havok for collision detection and PhysX for physical simulation). I'm currently in the process of rewriting our physics integration for improved performance.<!--QuoteEnd--></div><!--QuoteEEnd-->


    So, PhysX is going to stay? You do realize you're hurting performance for ATi users, right? And even NVIDIA users who don't have a dedicated GPU. It's been proven that NVIDIA used an old code for PhysX Calculations on the CPU so that it'd run much worse than with a PhysX GPU. Not to say anything bad about NVIDIA, but it's true, and I'm a member of Team Green. :P
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    he didn't say that. He said how it is currently, and then he said that he was rewritting the physics stuff, so he left it totaly open what physics engine will be used, it could even be bullet.
  • MOOtantMOOtant Join Date: 2010-06-25 Member: 72158Members
    PhysX is the name of PCI card made by some weird company whose only plan was to be bought by Nvidia. They made C++ library that supports rigid body simulation on CPU and soft body/particle/cloth/fluid simulation on their custom hardware. Then Nvidia bought them and fancy simulations work on Nvidia graphics cards using CUDA. But rigid body part is still there and it is still computed on CPU.

    In other words if you have Ati and see PhysX installer or PhysX name mentioned somewhere don't get scared. This game doesn't use cloth/fluids and you don't lose anything. <b>PhysX is just cheaper Havok</b> (though Havok licensing changed recently). It does not care about your graphics card.

    Someone mentioned rigid body sim on hardware but as far as I heard (from people who tested it) it's obsolete option for Ageia PhysX custom hardware, if you do that with Nvidia GPU then it'll be run on CPU.

    To sum up: your graphics card does not matter.

    I'm curious how did the UWE organize rigid body/collision code that it is that slow.
  • LazerLazer Join Date: 2003-03-11 Member: 14406Members, Contributor, Constellation, NS2 Playtester
    <!--quoteo(post=1821497:date=Jan 4 2011, 03:30 PM:name=MOOtant)--><div class='quotetop'>QUOTE (MOOtant @ Jan 4 2011, 03:30 PM) <a href="index.php?act=findpost&pid=1821497"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In other words if you have Ati and see PhysX installer or PhysX name mentioned somewhere don't get scared. This game doesn't use cloth/fluids and you don't lose anything. <b>PhysX is just cheaper Havok</b> (though Havok licensing changed recently). It does not care about your graphics card.<!--QuoteEnd--></div><!--QuoteEEnd-->
    This is good. Mirror's Edge used PhysX with cloth, glass, etc and on an ATI card (and older rig) if I had PhysX enabled after the first level the game would go to a crawl from the CPU load. Since I now have a new laptop with win7 x64 i7 and a Radeon 5650 HD I've been concerned about compatibility with PhysX but have not had any issues yet (at least no comparable slowdowns to what happened with ME). Actually the game runs real smooth (disregarding server rates when online and the random offline hitches people are getting).
  • weezlweezl Join Date: 2008-07-04 Member: 64557Members, Reinforced - Shadow
    (the old Ageia PhysX can be forgotten altogether, it is about as relevant today as an ISA-port expansion card)
    there's two types of nVidia PhysX - software and hardware

    the latter one is very rare in games and can do LOTS of physx on a CUDA GPU, and is also VERY CLEARLY advertised.
    the software one is like any other physics simulator running on the CPU.
  • SehzadeSehzade Join Date: 2010-12-29 Member: 76024Members
    <!--quoteo(post=1821074:date=Jan 3 2011, 06:37 AM:name=zex)--><div class='quotetop'>QUOTE (zex @ Jan 3 2011, 06:37 AM) <a href="index.php?act=findpost&pid=1821074"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->No. See this video.

    <a href="http://www.youtube.com/watch?v=DZxy6fnjwe0" target="_blank">http://www.youtube.com/watch?v=DZxy6fnjwe0</a>

    @1:40, 1 rifle clip and 1 pistol clip. The skulk is running in a straight line and hardly dodging at all for half of the encounter.

    @3:30 1 shotgun clip, the skulk isn't even moving for the first few shots from point blank range.

    Can someone tell me whats going on in those two scenarios? NS2HD claims it's a combination of his ping and bad aim, but it really seems like there is something going on "under the hood" which makes it almost impossible for weapons to register hits.<!--QuoteEnd--></div><!--QuoteEEnd-->

    he was aiming horribly. he didn't hit..
    and @ 1:40 there was a 2nd skulk. 1 clip @ the skulk with the LMG and one clip with the pistol @ another skulk.
    NS2HD even says so...don't blame the game for your lack of skill :P
  • HarimauHarimau Join Date: 2007-12-24 Member: 63250Members
    <!--quoteo(post=1821537:date=Jan 5 2011, 06:54 AM:name=Sehzade)--><div class='quotetop'>QUOTE (Sehzade @ Jan 5 2011, 06:54 AM) <a href="index.php?act=findpost&pid=1821537"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->he was aiming horribly. he didn't hit..
    and @ 1:40 there was a 2nd skulk. 1 clip @ the skulk with the LMG and one clip with the pistol @ another skulk.
    NS2HD even says so...don't blame the game for your lack of skill :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    Now that's all well and good, except that Max confirmed there's a problem.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    edited January 2011
    <!--quoteo(post=1821537:date=Jan 4 2011, 10:54 PM:name=Sehzade)--><div class='quotetop'>QUOTE (Sehzade @ Jan 4 2011, 10:54 PM) <a href="index.php?act=findpost&pid=1821537"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->he was aiming horribly. he didn't hit..
    and @ 1:40 there was a 2nd skulk. 1 clip @ the skulk with the LMG and one clip with the pistol @ another skulk.
    NS2HD even says so...don't blame the game for your lack of skill :P<!--QuoteEnd--></div><!--QuoteEEnd-->

    so ignore that example (even though its perfectly valid, 2+ clips and no kill) and attend to the other example where you can see skulk blood. nothing to do with skill whatsoever. but don't take my word for it, like the guy sayd it was confirmed.
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1821488:date=Jan 4 2011, 12:03 PM:name=Mkilbride)--><div class='quotetop'>QUOTE (Mkilbride @ Jan 4 2011, 12:03 PM) <a href="index.php?act=findpost&pid=1821488"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->So, PhysX is going to stay? You do realize you're hurting performance for ATi users, right? And even NVIDIA users who don't have a dedicated GPU. It's been proven that NVIDIA used an old code for PhysX Calculations on the CPU so that it'd run much worse than with a PhysX GPU. Not to say anything bad about NVIDIA, but it's true, and I'm a member of Team Green. :P<!--QuoteEnd--></div><!--QuoteEEnd-->
    Natural Selection 2 is configured to use PhysX in software mode regardless of what type of hardware you have. I'm not married to PhysX, though for the amount of simulation we're currently doing it's really not going to make a difference what physics engine we use.

    <!--quoteo(post=1821483:date=Jan 4 2011, 11:55 AM:name=Asraniel)--><div class='quotetop'>QUOTE (Asraniel @ Jan 4 2011, 11:55 AM) <a href="index.php?act=findpost&pid=1821483"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->:D i love hearing about what you do :) as a programmer i love all kinds of technical details :D<!--QuoteEnd--></div><!--QuoteEEnd-->
    I'm probably going to write up a description of the new system on my <a href="http://www.m4x0r.com/blog" target="_blank">blog</a> once I'm done (hopefully this week!)
  • MkilbrideMkilbride Join Date: 2010-01-07 Member: 69952Members
    Yes, but about the Software mode, you do know about this, right?:

    <a href="http://www.tomshardware.com/news/phyx-ageia-x87-sse-physics,10826.html" target="_blank">http://www.tomshardware.com/news/phyx-agei...sics,10826.html</a>
    <a href="http://www.tomshardware.com/news/nvidia-physx-amd-gpu-multicore,9481.html" target="_blank">http://www.tomshardware.com/news/nvidia-ph...icore,9481.html</a>

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->An excellent investigation by David Kanter at Real World Technologies found that Nvidia's PhysX software implementation for use by CPUs still uses x87 code, which has been deprecated by Intel in 2005 and now has been fully replaced by SSE. Intel supported SSE since 2000, and AMD implemented it in 2003.

    The x87 code is slow, ugly, and remains supported on today's modern CPU solely for legacy reasons. In short, there is no technical reason for Nvidia to continue running PhysX on CPUs using such terrible software when moving to SSE would speed things considerably – unless that would make the GeForce GPGPU look less mighty compared to the CPU.

    "The other thing is that all these CPU cores we have are underutilised and I'm going to take another pop at Nvidia here. When they bought Ageia, they had a fairly respectable multicore implementation of PhysX. If you look at it now it basically runs predominantly on one, or at most, two cores," said Huddy. "It's the same thing as Intel's old compiler tricks that it used to do; Nvidia simply takes out all the multicore optimisations in PhysX. In fact, if coded well, the CPU can tackle most of the physics situations presented to it."<!--QuoteEnd--></div><!--QuoteEEnd-->

    PhysX performance is purposely slow so that CUDA PhysX will always run massively better. I love PhysX man, and am a member of Team Green, but regardless, these are some serious issues.

    But you probably did already know of this, I mean, it's part of your job, I'm just reposting so others can see.

    They've also shown PhysX Performance to be purposely crippled on AMD Systems.
  • JerunkJerunk Join Date: 2002-11-22 Member: 9659Members
    Max what kind of performance increase do you expect after you rewrite your physics integration? What type of frame rate would you be happy with when it's all said and done? 40,50,60...100?
  • MaxMax Technical Director, Unknown Worlds Entertainment Join Date: 2002-03-15 Member: 318Super Administrators, Retired Developer, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, Subnautica Developer, Pistachionauts, Future Perfect Developer
    <!--quoteo(post=1824436:date=Jan 14 2011, 02:52 PM:name=Jerunk)--><div class='quotetop'>QUOTE (Jerunk @ Jan 14 2011, 02:52 PM) <a href="index.php?act=findpost&pid=1824436"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Max what kind of performance increase do you expect after you rewrite your physics integration? What type of frame rate would you be happy with when it's all said and done? 40,50,60...100?<!--QuoteEnd--></div><!--QuoteEEnd-->
    I'm not sure what the overall performance difference will be; physics is just one thing on my list to optimize.
  • JAmazonJAmazon Join Date: 2009-02-21 Member: 66503Members
    edited January 2011
    <!--quoteo(post=1824475:date=Jan 15 2011, 02:26 AM:name=Max)--><div class='quotetop'>QUOTE (Max @ Jan 15 2011, 02:26 AM) <a href="index.php?act=findpost&pid=1824475"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm not sure what the overall performance difference will be; physics is just one thing on my list to optimize.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Have you tried Fourier transforms? They seem to solve all of my problems, O(NlogN) ftw :P
  • JerunkJerunk Join Date: 2002-11-22 Member: 9659Members
    edited January 2011
    <!--quoteo(post=1824475:date=Jan 14 2011, 08:26 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Jan 14 2011, 08:26 PM) <a href="index.php?act=findpost&pid=1824475"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I'm not sure what the overall performance difference will be; physics is just one thing on my list to optimize.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Have you guys found out why it's so cpu dependent right now? Is that related to the physics implementation?
  • FocusedWolfFocusedWolf Join Date: 2005-01-09 Member: 34258Members
    edited January 2011
    <!--quoteo(post=1821768:date=Jan 5 2011, 03:51 PM:name=Max)--><div class='quotetop'>QUOTE (Max @ Jan 5 2011, 03:51 PM) <a href="index.php?act=findpost&pid=1821768"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Natural Selection 2 is configured to use PhysX in <b>software mode</b> regardless of what type of hardware you have. I'm not married to PhysX, though for the amount of simulation we're currently doing it's really not going to make a difference what physics engine we use.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I would like hardware accelerated PhysX, regardless of how trivial the simulation demand is :)

    This has already been mentioned, but repeated because it's too important to ignore: <a href="http://hothardware.com/Reviews/NVIDIA-Sheds-Light-On-Lack-Of-PhysX-CPU-Optimizations/" target="_blank">http://hothardware.com/Reviews/NVIDIA-Shed...-Optimizations/</a>

    Perhaps it may be necessary to roll a custom physics implementation from scratch (and turn on hardware acceleration in the mean time xD).
Sign In or Register to comment.