Search Unity

Please stop with the package release breaking fixes.

Discussion in 'High Definition Render Pipeline' started by jbooth, Apr 16, 2020.

  1. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Currently, if you download a Unity 2019.3 version and choose a URP project, it may install:

    URP 7.1.6
    URP 7.1.8
    URP 7.2.1
    URP 7.3

    This will depend on which patch release you're on. A PATCH RELEASE, not a Unity version. 3 of these have breaking changes in the shaders that make them incompatible with the other versions. You also can't downgrade to, say, 7.2.1 on the latest Unity, or upgrade to 7.3 on the older versions.

    The same is true for HDRP, as my users are reporting issues in HDRP 7.3 vs 7.2.1 due to undocumented changes.

    It is impossible to maintain compatibility with these changes:

    - You don't document the changes, or any of the shader code
    - You release these at seemly random moments
    - There is no Unity 2019 version of the SRP that anyone can count on actually working
    - Different assets are going to be written for each one, because it's impossible to support them all. So now any two things on the store won't be compatible with each other.
    - People don't understand this when they buy assets, because Unity used to "Just Work", now, it "Just Breaks".

    So fine, you might write a shader abstraction layer one day to deal with this, which you should have done from the start- given the glacial pace of Unity fixing things vs. breaking things, that's at least a year or two off. In the mean time, can you please limit breaking changes to align with Unity version changes? Not patch releases? Patch releases are supposed to fix things, not break them, or make it impossible to support your pipeline.

    You've gone over the cliff of insanity at this point- can you dial it back just a hair?
     
  2. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    I actually have a question, I'm using Unity 2019.3.8 now and URP and HDRP in package manager just shows 7.3 version and there is no option to go back to 7.1.8 (no other version or drop-down available) even In Unity 2019.3.10 latest version the same problem exists only 7.3 of URP and HDRP is found. Since your post said 2019.3 and the related URP versions posting it here looking for an answer.
    Unity 2019.3.5 had options to download any versions (7.1.8, 7.2.1 etc) of URP and HDRP.
    I have installed both 2019.3.5 and 2019.3.8 now on my system could this be also the reason as to why 2019.3.8 does not show other URP downloads except 7.3
     
  3. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Yes, newer patch versions are forcing newer versions of the SRPs, so if the asset you're trying to use is compatible with 7.1.8 but not 7.2.1, which is quite common, you can't upgrade to that patch version of Unity and have to stay on an older one. Of course, the next asset might be compatible with 7.2.1 and not 7.1.8, so you will have to make a choice of which assets you can use as well. And if one asset upgrades to 7.3, and your stuck on 7.1.8 due to another asset, you won't be able to upgrade that asset or Unity version until every asset is on the new version, or you are willing to remove the older asset from your project.

    Basically it's a massive mess with no workable solution for anyone, and completely disregards the asset use, asset publishers, or how people use actually use Unity.

    Unity need to adopt a rule of letting any version of the SRP install in a paired version, not patch release, of Unity, and never changing the API during that release cycle. In other words, in Unity 2019.3.0 -> 2019.3.9, or whatever it gets to, you should be able to use any version of the SRP released during that cycle, with no incompatibilities between them. They should not be introducing things like cascaded shadow maps in the middle of a patch cycle for the engine.

    This is the exact opposite of what they promised with things like packages - instead of being able to get bug fixes faster, or get them only for what we need them in, we now have a massive cascade effect where trying to get a bug fix for, say, asset bundles released with a Unity patch release, will force you to upgrade to a new rendering engine and break all your 3rd party assets and shaders. And if you want to upgrade the URP to get that new cascaded shadow map code, it might break half the shaders in your project. A surface shader would not have had this problem, and upgrading Unity versions from 2019.3.0 to 2019.3.1 didn't have these kinds of issues previously either. They've made things so much worse.
     
  4. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    Thanks for your reply, yes a lot of issues regarding the shaders.
    For now, I installed 2019.3.7 which gives the option of downloading different HDRP and URP versions. Yes just as a user and indie developer I understand how much pain it is to use assets on a project because of the various render pipeline versions that Unity has now. I'm just wondering how much of a pain it will be for the asset developers, waiting for the 2019.4 LTS version in spring as mentioned in unity site to sort out these issues, else have to go back to default render pipeline or go back to Unreal. Unity is more a 3d software than a game engine because of the way the new updates have been done.
     
  5. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    328
    Sometimes I feel like HDRP was made so they can say "Where is your Unreal now?!"
    Not for people to actually release games using it...
     
    Last edited: Apr 28, 2020
    VirtusH, Sam-N, soleron and 6 others like this.
  6. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
  7. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    Oh missed this the whole time, I just noted you are the great author of the whole Microsplat series :) love all your assets, currently own the Terrain collection, HDRP, URP and the low poly set, still haven't used the asset :( as I have been working on an old project where I have gaia and cts linked on all my terrains. But want to try out the wind and glitter and lava soon on a new project; as I have been used to the CTS workflow and still need to learn the PBR workflow of Micrsplat but saw some videos love how much control is available need to switch soon.
    Meanwhile I have started a low poly project using Poseidon, guess it supports Microsplat so will be adding the low poly pack to it.
    Again love all the pack's great fan of them all.
     
    Last edited: May 9, 2020
  8. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    I don't want to put oil in the flames, but not too long ago I started poring some old code to hdrp and now I'm very surprised there aren't more threads like this.

    When you start reading the hdrp shader code, down to bottom of it, you'll notice this whole thing is a dune of shifting sands.

    What I find baffling, is to the very core of hdrp, the Unity team decided to wipe out everything and start from scratch. But that's not how things are done. Here is a very very simple example:

    For whatever reason, Unity now decided to change the name of the base texture in hrdp. So in code we read:

    Code (CSharp):
    1.         _BaseColor("BaseColor", Color) = (1,1,1,1)
    2.         _BaseColorMap("BaseColorMap", 2D) = "white" {}
    Brilliant. It's a base texture, we should rename it so right? Why keep with 10 years of history or so and name it '_MainTex' ?? Now we should rename!

    Well down in code we read this:

    Code (CSharp):
    1.         // HACK: GI Baking system relies on some properties existing in the shader ("_MainTex", "_Cutoff" and "_Color") for opacity handling, so we need to store our version of those parameters in the hard-coded name the GI baking system recognizes.
    2.         _MainTex("Albedo", 2D) = "white" {}
    3.         _Color("Color", Color) = (1,1,1,1)
    A hack eh? Brilliant. We've now realized we can't just name it '_BaseColorMap'. But instead of fixing our code to keep with what's has been laid out there, we stand our ground, It should be named '_BaseColorMap'! What can wrong?

    We'll let's try the following simple code:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class CahngeMat : MonoBehaviour
    6. {
    7.  
    8.     [SerializeField] private Texture2D newTex;
    9.  
    10.     void Update()
    11.     {
    12.         if (Input.GetKeyDown(KeyCode.Z)) {
    13.             this.GetComponent<Renderer>().material.mainTexture = newTex;
    14.         }
    15.     }
    16. }
    Attach to a mesh with hdrp material. Plug a tex, start the game, press Z. What happens? Nothing. Nothing at all. Because '_MainTex' is hard coded to bottom of the Unity code.

    Unity 2019.3.10f1, HDRP 7.3.1
     
    VirtusH, Sam-N, Lipoly and 9 others like this.
  9. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Not invented here syndrome. You hire a bunch of new coders, they want to forge their own path, and often don't want to sift through things to figure out why they were the way they were, what was good about them, or what the ramifications would be when removing them. Instead it's off into the ocean looking for new land, and we're all forced onto the ride.
     
    Sam-N, chriscode, SenseEater and 5 others like this.
  10. DrummerB

    DrummerB

    Joined:
    Dec 19, 2013
    Posts:
    135
    Unfortunately, this summarizes my experience with Unity over the last 2 years very well.

    The problem is not slow bug fixes and breaking changes between versions. That's always going to happen in any moderately complex project, such as a game engine. The problem is that now with the engine being fragmented into dozens of separate packages, it becomes a daunting task to assemble a list of working and compatible packages. And as you point out, sometimes this is even impossible.

    This is not just an issue with the SRP packages and shader incompatibilities. Almost every part of the engine is now in a similar state. UI, Input, VR, Physics, Rendering. All of these modules have 2 or 3 separate, independent implementations in the engine. In a perfect world, this would give you some flexibility in choosing whatever version best fits your project and that's probably what Unity envisioned with their package approach. In reality, however, it becomes a nightmare of dependencies and incompatibilities.
     
  11. max_coding13

    max_coding13

    Joined:
    Apr 24, 2016
    Posts:
    34
    I agree, it's completely maddening depending on what you're trying to work on. For instance, working in AR you hit this issue immediately and you end up spinning multiple plates trying to figure out compatibilities between ARFoundations major releases, Unity patch releases, and URP patch releases.

    The package manager is a godsend for Asset Store packages, as well as managing your own internal packages across projects, but I don't believe Unity should be using it for their own engine features. Engine features would preferably all be released in sync and updated along the main engine versioning path. I would imagine this would make the unit testing for feature upgrades much easier for Unity to manage internally, and would reduce the chaos we are feeling as devs.
     
    Last edited: May 9, 2020
    soleron likes this.
  12. Crayz

    Crayz

    Joined:
    Mar 17, 2014
    Posts:
    194
    Yes, please. Unity is doing too much.
     
  13. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    That is not good to hear

    We planned on relying on Microsplat for HDRP as Unity terrain is still in 2005 in terms of materials especially
    But yeah everything is a mess right now. This package manager madness where nothing works or exists out of the gate is a struggle. It feels like the 3DS max patchwork monstrosity of engines right now.
     
  14. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    263
    This is why I still will not touch URP or HDRP for anything important. Did a big eval over a year ago and nothing's changed.
     
    Egad_McDad, Rich_A and Neto_Kokku like this.
  15. ginconic

    ginconic

    Joined:
    May 19, 2015
    Posts:
    89
    This :"forced onto the ride".. this is a scary thing.

    Code (CSharp):
    1.     // A Material can be authored from the shader graph or by hand. When written by hand we need to provide an inspector.
    2.     // Such a Material will share some properties between it various variant (shader graph variant or hand authored variant).
    3.     // To create a such GUI, we provide Material UI Blocks, a modular API to create custom Material UI that allow
    4.     // you to reuse HDRP pre-defined blocks and access support header toggles automatically.
    5.     // Examples of such material UIs can be found in the classes UnlitGUI, LitGUI or LayeredLitGUI.
    Very thoughtful. Would have been useful if those classes were public. But who would want to use those outside hdrp, right? What kind of person would ever want to write a plugin or an asset for hdrp?

    Edit: don't really mean to flame or rant. HDRP is great. But it sort of feels like a private party.
     
    Last edited: May 10, 2020
  16. sas67uss

    sas67uss

    Joined:
    Feb 8, 2020
    Posts:
    81
    an important question :
    Do the bug fixes in the latest version of URP apply to previous versions as well? For example, I want to use the unity 2019.4 LTS , which finally supports URP 7.5 . Will the bugs fixed in URP 10 also apply to URP 7.5?
     
  17. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    This is going to be a very much more painful road for asset publishers now that EVERY unity version can ship with different SRP version, or if we are lucky, they don't update it between the versions but there's no real wording so far how they are going to message the changes from now on.

    For people who haven't followed what Unity is doing so closely: There will not be SRP package updates for future Unity versions in Package Manager, you will not be able to pick of the SRP variant like 7.3 or 7.5 there. Instead each Unity release will have it's own SRP package shipped with it (in Unity core). Meaning if you need an update to fix a bug you are having, you have to upgrade from say 2021.1f1 to 2021.1f3 to get the SRP package they ship with that version.

    This of course doesn't make things easier for asset publishers, but the opposite (now Asset Publishers that support LTS versions have possibly like 20 different SRP versions to support, instead of like 4-5 we had in past).
     
  18. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    But you couldn't use older Untiy version with newer SRP version before as well. You would have to upgrade Unity. I guess it will be the same only now SRP in Unity core.

    Main challenge should be to have only few hotfixe versions like in Unreal. So 2021.1f1, 2021.1f2, 2021.1f3 maximum.
    That would make version control a lot easier.
     
    Last edited: Jan 4, 2021
  19. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    It's not the same. You can use 7.1.8, 7.2.0, 7.3.1 etc HDRP versions on pretty much all released Unity 2019.3 and 2019.4 LTS versions. 7.5 requires newer 2019.4 LTS but 2019.3 support was already expired by the time they shipped 7.5. But the main point here is that old SRP versioning wasn't tied specific minor engine version, only limiting factor is that you had to have 7.x and 2019.3 or 2019.4 coupled together.

    In the future each minor Unity engine version could potentially have different variant of HDRP or URP, making it really hard to just give support for few popular variants of it. You can't just tell your customers to only install 2021.3.f0 or f15 specifically (or can but it won't go that well).

    For example, imagine if Unity did provide fixes to URP on every minor engine release (they won't but it's still theoretically possible), this would potentially mean 40 different URP versions throughout one LTS support cycle.
     
  20. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Different versions of 2019 shipped with different supported versions of URP, so that part isn't much different. That said, closing down access to the graphics repository so we can't easily diff changes and figure out what they are doing, that's a kick in the teeth.
     
  21. QuantumTheory

    QuantumTheory

    Joined:
    Jan 19, 2012
    Posts:
    1,081
    I think it's incumbent on the store to address the issue, not publishers.
     
  22. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,276
    This is one of the reasons for the shader graph right? It does some crazy code generation in the background and makes it work in your current 'package' version.
    If you write your own shader code, even if you try and set a few shader variables in code like the textures on a material at runtime, then you risk things breaking as soon as a new package is out?
     
  23. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,759
    This is exactly why you DO NOT use a non-LTS version (betas/latest update). If your not using the latest LTS, you shot yourself in the foot...
     
  24. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    883
    Latest LTS are usually far more unstable and cluttered with bugs than .1 of next TECH release (at least for me).
    I don't know why it is happening but 19.4 is slow and constantly crashing in the build.
    And I have almost no problems with 2020.1 so far.
    And I tried 2020.2 and it is broken. So I feel that 2020.3 LTS will be broken too.
    I would like to use LTS releases, but for some stupid reason UT initialy fixes bugs for current alpha and then backported them to latest released TECH releases and only then to LTS. So if you found a bug, good luck waiting for fix like a half of year. And if a bug is considered like "a feature" it will be never backported.
     
    Last edited: Jan 15, 2021
    ArthurAulicino and max_coding13 like this.
  25. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,794
    There’s much less difference in stability between Tech and LTS than Unity wants you to think.
     
    soleron and warthos3399 like this.
  26. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    197
    lol, you're kidding. no one would be dumb enough to think MainTex is better than BaseColor. how can i believe you.
     
  27. ChillX

    ChillX

    Joined:
    Jun 16, 2016
    Posts:
    145
    FFS why is it so damn hard to to do even the most basic things with HDRP. Like 10.4 is broken so I want to downgrade to say 10.2 but now I have to go find the git url and blah blah blah
     
  28. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    No you don't, you can just edit the manifest and enter valid package number there.
    You can see possible versions at https://packages.unity.com/com.unity.render-pipelines.high-definition but be aware they are not all guaranteed to work with the engine version you use - in other words things can break again.

    But from 11.0 and onward, you can't even upgrade the packages easily anymore so there you have to go to git if you need to find some update/fix. Unity wants you to just update the engine as that will give you latest HDRP version tested specifically to work on that engine version.