Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Downgrading Unity 5.0 PhysX

Discussion in 'Unity 5 Pre-order Beta' started by RedRiverStudio, Feb 10, 2015.

  1. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    Im not sure if this is in the right forum, so mods, feel free to move.

    I am building a physics based racing game and have converted to 5.0. Because of the updated PhysX, the gameplay is broken. Is it possible to downgrade 5.0 PhysX 3.3 to PhysX 2.8(I think this is the prior version) while retaining the rest of 5.0s features?

    Thanks very much.

    edit: adverbage
     
    Last edited: Feb 11, 2015
  2. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    I don't think so. What are the issues you're having?
     
  3. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    Joints breaking on a fly's fart, weight balance of ships are off, weird thrust spurts. All sorts of odd things. The game runs entirely at the mercy of PhysX, so its not worth the effort to fix all these little issues at the games current state. It would be a load easier if I could just keep 2.8.
     
  4. davem250

    davem250

    Joined:
    May 28, 2013
    Posts:
    186
    At what state is your game currently in??? is it nearly finished or have you barely begun programming???

    If it is so much easier why did you upgrade??? you have to have known that you would need to upgrade your project when upgrading Unity... Unity Technologies have stated several times on these forums that the new PhysX version would require Little to big changes in convertion... i for one hope NOT that Unity reverts the PhysX engine since it is wayyyyy more optimized now than it was within Unity 4! Have you thought that maybe you have done something wrong with your code... or maybe your objects' joints??? this is purely speculation but still, it really isn't Unity's fault.
     
  5. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
    Lets not get all wild eyed here. I am in no way blaming Unity for an upgrade, and I am definitely not asking them to downgrade the whole engine to 2.8. I know 3.3 is better, it just breaks my game. I am simply asking if there is a way to downgrade that specific module. I want to upgrade to 5 because im still interested in the Lighting, Materials, etc, everything except PhysX 3.3.

    Not that it matters, but the game foundation/code is largely complete and playable, I just need to fill it with assets. Upgrading the entire foundation to 3.3 sets me back quite a lot.
     
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I'm not from Unity but I can tell you with a pretty high degree of certainty that the answer is no I'm afraid, Unity is not modular on that level.
     
  7. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I'm in the same situation like RedRiverStudio. I love the new features, but the new PhysX completely breaks my driving physics, especially because the new wheel colliders work very differently. I'm ok to retune the rest of the physics in 5, but I really don't want to recreate the whole driving behaviour after weeks (or months?) working around all the quirks of the old wheel collider. At least a legacy wheel collider (with all the issues) would be very useful to gradually update the physics, without having to rebuild *everything*. Normally things get deprecated first, before they are removed completely...
     
  8. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,033
    Building the engine with two very similar physics APIs would probably not be that simple. They'd have to write a wrapper around both, then implement feature-gating based on the version picked. 4.x IS the deprecated version as far as UT are concerned.
     
  9. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,613
    No, it's not possible to swap out PhysX 3.3 for PhysX 2.8, sorry.
     
    shkar-noori likes this.
  10. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    @superpig How about a legacy wheel collider component? It was *not* marked as deprecated in Unity 4, that's why I'm a bit surprised that it was replaced by something that works completely differently. When the shuriken particle system was introduced, the old one was also not removed at the same time, probably exactly because of the same reason.

    I don't find any information about what exactly changed, the docs look pretty much the same like before. Will there be at least be an upgrade guide, for the physx changes in general and especially for wheel colliders?
     
  11. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
  12. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    Thanks, as a general physx upgrade guide that's quite useful (if it's really all that changed)!

    But the wheel collider part only explains how to build a car, which is pretty much the same like before. If you do the same thing with the old wheel collider it also works. It doesn't say what actually *changed* in the implementation in the new version, which values we should change to get the same behaviour and where it's not completely possible to do that. I assume that most of the developers who used the wheel collider in a real game made a lot of tweaks to make it usable and stable, so just creating a new vehicle from scratch is just not a option.
     
  13. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    It is a major update, which means it is not compatible in certain areas. One of them is physics, another one is lightmap baking. The changes in PhysX are huge and Unity also modified several aspects with the integration, that's why it is necessary to be prepared to balance everything again related to those areas.
    The particle system is another topic, because it doesn't rely on a 3rd party solution and Shuriken is still not on par with the legacy implementation in several areas.
     
  14. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    I'd rewrite the Physics side of it, if you was willing to re-do the rest for the upgrades, the new Physics is much better too.
     
  15. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I can completely understand that it's not feasible to create a legacy wheel collider based on the new PhysX. But I don't think it's too much to ask for proper documentation of what to expect when updating instead of just "please redo everything from scratch". And the new wheel collider still doesn't have any additional debug information/visualization which doesn't make it exactly easier.
     
  16. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I've found phyx 3.x more stable. Initially it wasn't so stable but I had to tinker quite a bit. You can also up the frequency of fixed update and still remain faster, which increases stability quite a bit. RC1 fixes a few things so try on that and if behaviour is undesired still, it will be better to file a bug report. You either do that or integrate your own physics engine.

    In particular, joint/spring settings were capped in 2.8, they're allowed to go much bigger in 3.x - pouring over the release notes and submitting bugs can really help you get your game working perfect in 5.
     
  17. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    Well you are user a beta, that's quite common for it to be initially minimal documentation.
     
    hippocoder likes this.
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah - it's important to note that Physx 3.x is an iterative solver, that is, it really likes more iterations and a higher rate of fixed update. This isn't so alarming now it's multi threaded and much more optimised, so you should be getting more stable simulations with higher framerates than 2.8. I understand people live in mortal dread of having to go and retweak and in a lot of cases, re-learn physx, but also 2.8 was pretty much a turd in comparison to what speeds you'll get in 3.x. It's so worth it going forward. So now's the time to bite the bullet. You can get old behaviour, just need to brave it out and in some cases, change the code or work around it.

    I for one am not looking back since it's allowed me to fill my world with ragdolls, vehicles and more - something that crawled on 2.8.
     
  19. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    I'm aware of it. I don't expect it to be perfecly documented in a beta, but now that we've already reached RC status, I feel it's the right time to complain about it. I'm not even sure UT is aware of the wheel collider issues (that it matters to some people with actual projects that rely on it), and I can't really submit a bug report because it wouldn't make sense. So I hope it doesn't get forgotten next to all the remaining work on "important" features like lightmapping.

    And it really looks like I'm the only one who never had performance issues with the old PhysX (while working with it quite often), so maybe that's another reason why I don't completely see the advantages of the update. But don't get me wrong, I'm not *against* the update, I just would love to see some more effort to make the transition easier. Anyway, I'm looking forward to find some improvements that affect my projects! :)
     
  20. Roni92

    Roni92

    Joined:
    Nov 29, 2013
    Posts:
    225
    I will always say big NO, NO, NO to backwards compability. It is biggest and the only thing that is stopping evolution/development of software. You want better engine? You want new features?? Then its NO for legacy S***. Legacy/old stuff must die!:p
    Noone one want waste precious developing time to implement and manage old stuff. Want old wheel collider? Use old Unity.
     
  21. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    @Roni92 I'm completely with you. Anywhere, everywhere. Except... for the wheel collider - it took way too much time of my life to tame it... ;)
     
  22. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    http://blogs.unity3d.com/2014/07/08/high-performance-physics-in-unity-5/
     
  23. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Taming it again is considerably easier as you're not taming broken code.
     
    davem250 and Jonny-Roy like this.
  24. Jonny-Roy

    Jonny-Roy

    Joined:
    May 29, 2013
    Posts:
    666
    It took me 8 hours to re-write my car physics in Unity 5... most of it was removing things that were no longer required, as the PhysX is so much better. No more bodges!
     
    davem250, Roni92 and hippocoder like this.
  25. RedRiverStudio

    RedRiverStudio

    Joined:
    Sep 8, 2014
    Posts:
    136
  26. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    just go for it, the visual improvements alone will make your game shine