Search Unity

  1. Full schedule for #UniteBerlin is now available! Featuring talks on our roadmap, hands-on labs and much more! Check it out!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Feedback Wanted: Scriptable Render Pipelines

Discussion in 'Graphics Experimental Previews' started by Tim-C, May 9, 2017.

  1. Kustuk

    Kustuk

    Joined:
    May 29, 2016
    Posts:
    7
    definitely doesn't work in 2018.2b3
     
  2. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    126
  3. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    Hi,

    >My question or worry is that working with Unity going forward is going to feel like working with multiple different engines depending on what pipeline you're using

    so not sure what you expect as answer: yes, render pipeline will be a bit different as they respond to different need, we were not able to leverage current Unity for modern engine features (or for very low end mobile), so we decided to break compatibility and ask for a new learning curve.
    Still I re-iterate: If builtin Unity fit your need, use it. No need to learn new tech, you have everything you already know and that work.
     
  4. Kustuk

    Kustuk

    Joined:
    May 29, 2016
    Posts:
    7
    Hello a found that SSS always looks somewhat different in viewport and through any camera
    For example:


    At the left side sss looks as I like (and it almost no tweaks to default Skin profile).
    Problem is that at the same time from camera it look compertrly different. I tried to tweak Skin Profile (radius, world scale etc) - but can't replicate viewport SSS look.
    Could it be a bug?

    ---------------------------------------
    Update:
    It is interesting:
    SSS works well ONLY if camera selected in hierarchy
    2018.2b3
     
    Last edited: May 12, 2018
  5. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    330
    @SebLagarde Hi, was just playing around with the HDRP Decals, and have a few questions (I know it's still under development):

    1. Will the HDRP Decal shader eventually support Albedo tint as well as emission (and emission tint) in the future?
    2. How will we be able to control sorting order of overlapping decals?
    3. If multiple decal projectors use the same material and textures, will they batch?
    4. Will the decal shader support instancing?

    Thanks!
     
  6. grenappels

    grenappels

    Joined:
    May 25, 2016
    Posts:
    3
    Hello,

    I need to render 30+ very similar views (~1 degree apart), is there a way a custom rendering pipeline could help me do that? I keep reading that it allows for a lot of flexibility, but not on a per-object basis. That's possibly disappointing, as I was hoping I could instance each object across each view being rendered, so I could "stagger" the renders or have them happen almost concurrently (draw one object 30 times, then go to the next, etc). I definitely am interested any way, because it seems I'll be able to get away with culling once and doing a single shadow pass instead of the crazy number I'm doing now, so that's good!

    Thanks for working on getting all of this in, it's very exciting!
     
  7. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    59
    Whe have a known and fixed issue where the SSS works only in one 3D view when multiply 3D views are rendering (Game + Scene for example) at the same time. I just checked and it doesn't happen anymore with the current trunk of the SRP GitHub repository. You can expect the fix to land in the next release of the HDRP package :).
     
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,804
    Nice timing ;)
     
  9. Kustuk

    Kustuk

    Joined:
    May 29, 2016
    Posts:
    7
    That's awesome news! thank you very much
     
  10. cfree

    cfree

    Joined:
    Sep 30, 2014
    Posts:
    33
    @SebLagarde
    Just to confirm, new default Particle Shaders will need to be built (like the new HD Lit) in order to adapt the Particle System 100% to HD pipeline, is that correct? There will be a Particle HD specific shader as well in HD?

    Please, could you elaborate a little on the current status and plans for Particle System in HD pipeline?

    Thanks!
     
  11. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    1,590
    I cant fill in all the gaps for you but I know that this summer should lead to more info about the new VFX system from Unity. It got a brief mention in the roadmap session at GDC, and looks to be HD-pipeline, node-graph-based GPU stuff.
     
    cfree likes this.
  12. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    128
    Yep, there was mention of a preview release of it too so we might get our hands on it soon. Either way, I'm looking forward to seeing more info about it at Unite Berlin in a few weeks.

    Timestamp for the VFX Editor in the Roadmap Talk from GDC
     
    idkartist3D, cfree and elbows like this.
  13. xiaolinl

    xiaolinl

    Joined:
    May 27, 2015
    Posts:
    32
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    4,606
    syscrusher and xiaolinl like this.
  15. xiaolinl

    xiaolinl

    Joined:
    May 27, 2015
    Posts:
    32
  16. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    49
    The substitute at this time would be modifying the SRP you're using and injecting your CommandBuffer at the appropriate time. For instance, in LWRP you could add the CommandBuffer to the ScriptableRenderContext around the time RenderOpaques happens.
     
    xiaolinl likes this.
  17. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,804
    Hopefully it goes on the blog! awesome post
     
    chiapet1021 and Corvwyn like this.
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    21,804
    Why not make this internal? It's better the sharp pain now than pain Unity itself is allowing to persist. The worst and most common case is the endless asset store sellers making unoptimised junk that will freely spill over the pristine SRP future.

    Even a warning would be really nice so we can optimise it if it happens from 3rd party.
     
  19. FreeGameDev

    FreeGameDev

    Joined:
    Dec 1, 2015
    Posts:
    62
  20. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    59
    The easiest way for you would be to look at the unlit shader in HDRP to see how it's done and to convert your shader to output the same stuff.
     
  21. FreeGameDev

    FreeGameDev

    Joined:
    Dec 1, 2015
    Posts:
    62
    Thanks Remy, Will have a look and see what I can come up with.
    I suppose geometry shaders etc will all work if hand coded right?
     
  22. mr_madcake

    mr_madcake

    Joined:
    Jul 17, 2017
    Posts:
    34
    I very much like the idea of being able to customize the rendering process. For example i'd like to change the arrangement of data in G-buffers and possibly add another one.

    However when i tried to dig into HD render pipeline it seems like basic things that were available before (like custom vertex functions and lighting models) take more code and effort to do now.

    It took some time to figure out that after changing Lit.hlsl (default shader) i had to manually recompile Deferred.compute (which is strange to me. why would it not notice the change like any other shader with #include would?)

    My question is:
    Is this complexity justified? I do not see the bigger picture of the underlying architecture so it makes me wonder why does it have to be so convoluted?

    I believe scriptable render pipelines could be one of the greatest updates Unity had.
    But in order for it to fulfill the expectations we need a lot of detailed documentation explaining how it works and how to customize it (not just basic stuff but pushing it's flexibility as hard as it can be done).
    Without it the potential would be lost.

    P.S.
    I suppose something should really be done about Deferred.compute recompilation. If for some reason Unity can not pick up changes from included shaders there should be at least a button for manually recompiling the file. I resorted to adding semicolons to force recompilation.
     
    Lars-Steenhoff likes this.
  23. Daemonhahn

    Daemonhahn

    Joined:
    Oct 5, 2013
    Posts:
    780
    I had to make a little MenuItem option that would force it, sped it up a lot!
     
    mr_madcake likes this.
  24. mr_madcake

    mr_madcake

    Joined:
    Jul 17, 2017
    Posts:
    34
    I thought about it but i don't know api that would allow to force file recompilation. What did you use for it?
     
  25. Daemonhahn

    Daemonhahn

    Joined:
    Oct 5, 2013
    Posts:
    780
    I actually did a massive hack, and I am basically adding a semicolon to the file manually as text via a menuitem. I dont recommend this.
     
    Last edited: May 18, 2018
  26. mr_madcake

    mr_madcake

    Joined:
    Jul 17, 2017
    Posts:
    34
    well, then we indeed need some fix in Unity for this
     
  27. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    1. No emissive, yes, we will add albedo tint
    2. We think about this, but it may have performance implication. WIP
    3. & 4. Decal are already instanced
     
    Korindian likes this.
  28. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    Even outside of SRP with C++ modification I am not sure about how to solve this :)
    One think that come to mind is to use Geometry shader to output to different rendertarget (but you will support only up to 8). Otherwise it mean you need to allocate a RT of 30 * original size and generate your instance in the vertex shader to output to the correct location, seems an insane size for a RT. Maybe a mix of the two. Geometry shader 8 RT * 4 * size of original RT?

    In any case it require specific implementation that currently don't think you can do with SRP. Geometry shader duplication will work (I have never try Geometry shader in Unity), but instancing is not control from the C# DrawRenderers...
     
    grenappels likes this.
  29. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
     
  30. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    Include dependency is fixed. Don't remind which version it is, or if it is a backport in progress, but was a pain in the ass for everybody...

    >Is this complexity justified?
    If you want a flexible approach, Builtin Unity is your preferred choice. HD make choice for you to favor speed (For AMD GCN architecture - i.e PS4/XBoxOne) and accuracy (i.e PBR correctness, coherency: all lights work with all materials etc..) and this come with various constrain increasing the complexity and decreasing the flexibility. We assume it, as you can't achieve such a thing with builtin Unity.

    >But in order for it to fulfill the expectations we need a lot of detailed documentation explaining how it works and how to >customize it
    We currently focus on artists documentation. Programmers documentation will come later but yes, any modification will be a lot more work than with Builtin Unity, the API still change, thus why we don't document it for now.
     
    Daemonhahn likes this.
  31. DefiantDev_Chris

    DefiantDev_Chris

    Joined:
    May 9, 2018
    Posts:
    1
    Losing surface shaders would be a big loss for Unity. They have always been one of the biggest upsides to doing graphics in Unity over something like Unreal. They are a perfect blend of render pass abstraction, speed of implementation, features, performance, organisation and quality of life. I've used Unreals material system/Shader graph/Amplify Shader/Shader Forge and even Strumpy back in the day, and all have become completely unwieldy and borderline torturous for anything that isn't a relatively trivial shader.

    I completely understand the desire to have accessible shader creation, but removing surface shaders is such a high cost to achieve that.
     
    AFrisby, Daemonhahn and jbooth like this.
  32. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    357
    By the way, if I'm going to be use 2018.1 with the legacy pipeline do I need to download the render-pipelines.core package or what is that exactly? Is it only if you want to make a new pipeline yourself?
     
  33. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    128
    To use the Old/Default Pipeline you don't have to anything except load unity as usual.
     
    Alverik likes this.
  34. Daemonhahn

    Daemonhahn

    Joined:
    Oct 5, 2013
    Posts:
    780
    That is a massive shame, VFX editor was my biggest awaited feature and imo a much needed addition :( end of the year now I guess :(
     
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,039
    You do know the lesson that we get with unity all this time, don't wait for their schedule. Just go with what available, or create your own. Not that i disregard unity team or something. just trying to not get your hopes up.
     
    Daemonhahn likes this.
  36. Daemonhahn

    Daemonhahn

    Joined:
    Oct 5, 2013
    Posts:
    780
    nono I know, but I had hoped this might come as part of 2018.2 as preview. Makes sense though as it is tied to HD pipeline which is 2018.3

    Either way I am just happy to see its being worked on. I do believe it should be released as independent preview package on package manager, as should all features rather than being arbitrarily locked for a certain release (unless theres good reason for this). I say this as HD pipeline can be accessed in 2018.2 now with fiddling and is pretty usable.
     
    Reanimate_L likes this.
  37. grenappels

    grenappels

    Joined:
    May 25, 2016
    Posts:
    3
    Thank you for your response! Glad to know this isn't a head-scratcher only for myself :)

    The size is insane, you're right, so my first iterations of it use 512x256 as the size I render each slice at, for a total of 32 views. I can then copy that render nicely into a 2048x2048 RT , and sample from that. The reason I did it this way instead of using a RT array was because I found this method had the widest support across different platforms, but I'm willing to go back to experimenting with RT arrays because it is seeming more like we'll be targetting desktop for now and deferring mobile.

    I'm reading what I can from google searches but do you have a resource you recommend where I can get info about writing a geometry shader like this? Thanks again!
     

    Attached Files:

  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,039
    @SebLagarde is the current srp repo not compatible with the public beta release? i notice the content are different, and it was compatible with public beta release a couple week ago (2-3)
     
  39. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    1,590
    It still worked fine for me yesterday, and I note that they did stuff like disable the SSR they've recently added to master branch until an editor fix is in place. There have been plenty of changes again today though and I havent tried those. And Seb did warn some weeks back that master would stop working with publicly available betas at some point. I would like to applaud efforts to keep it working for us as long as possible, and also the fact that some fixes/improvements have been backported to the 2018.1 branch on github.

    When you say the contents are different, compared to what? Certainly there are a lot of changes compared to versions available via package manager, but this in itself is not an indicator that master branch no longer works with any public version of Unity.
     
  40. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,039
    From the folder structure it's already different. Also no SRPMARKER file anymore. it seems the folder structure are package manager ready.
    Edit : Okay, got it to work, it's different now. Need to edit package.json file.
    Also. . . . it seems HDRP Graph are working :eek:
    upload_2018-5-25_2-51-24.png

    @SebLagarde
    it seem in the current master branch the volumetric fog Ultra setting are broken again, i'm getting black fog when using ultra settings

    also how to use the new SSR? or it is still not working yet?
     
    Last edited: May 25, 2018 at 8:53 AM
  41. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    9
    Fully Translucent Lit particles demo.
    My 2018.1.0f2 HDRP demo: Realtime dynamic GI indirect lighting on snow-particles.
    Used: Translucent material with subsurface scatering, "Light Probe Group", "Light Probe Proxy Volume".
    Issues: particles not soft, particles color settings not work

    Project file for 2018.1.0f2 (HDRP version 1.1.8 Preview):
    https://drive.google.com/open?id=1keZk9U_d1DtB1aa8azRAoJGF5mFqa87E



    Main settings below:

    Translucent material:
    1212.PNG

    Subsurface scatering:
    22212.PNG

    Particles rendering:
    particle system.PNG

    "Light Probe Group", "Light Probe Proxy Volume":
    Unity_2018-05-25_13-wd43-23.png

    Lighting settings:
    Unity_2018-05-25_13-57-24.png
     
    Last edited: May 25, 2018 at 1:10 PM
  42. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,009
    INFO FOR SRP 2018.2+ / master (branches on github)

    Hi all,

    Yesterday we made a change to how SRP repository is laid out. This is to bring us inline with the other packages that are coming online (like ecs), allow integration of automated testing, and allow better granularity or test coverage.

    What we have done is made a requirement that SRP repository should live OUTSIDE of assets. So it should sit next to Assets / Library and similar folders. Then from your package manifest you can link directly to the package. This is called 'Local Packages' in package terminology.

    If you have an existing project please update your SRP submodule, then cut / paste it outside of assets, then update your project manifest file to point to the correct locations. An example manifest is linked below.

    Any issues / questions please post them.

    Here is the updated docs on the github:
    ------
    This repository consists of a folder that should be cloned outside the Assets\ folder of your Unity project. We recommend creating a new project to test SRP. Do not clone this repo into an existing project unless you want to break it, or unless you are updating to a newer version of the SRP repo.

    After cloning you will need to edit your project's packages.json file (in either UnityPackageManager/ or Packages/) to point to the SRP submodules you wish to use.
    See: https://github.com/Unity-Technologi...Projects/GraphicsTests/Packages/manifest.json

    This will link your project to the specific version of SRP you have cloned.
    -------
    Take a look here for some test project examples.
    https://github.com/Unity-Technologi...e/tree/master/TestProjects/LWRP/GraphicsTests


    More info here: https://forum.unity.com/threads/feedback-wanted-shader-graph.511960/page-15#post-3509854
     
    Last edited: May 25, 2018 at 2:56 PM
    AntonioModer, equalsequals and id0 like this.
  43. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    204
    This, a thousand times.

    It also seems like the outputs of the Standard/StandardSpec surface shaders line up with the HD SRP inputs, which means supporting them should be relatively straight forward - even if they are less optimised.
     
  44. Japa

    Japa

    Joined:
    May 4, 2013
    Posts:
    21
    Is this the right place to discuss code contributions to the shadergraph editor?
     
  45. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    1,590
    Thanks for all the info. Can I just double-check that the terminology 'Local Packages' is the same as what was being referred to as 'embedding packages' in the following posts, or is it slightly different? #2 and #4

    And on a related note, is there any reason we shouldnt make these folders inside the local project Packages folder?
     
  46. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    689
    I have an asset with a single custom unlit shader that I need to upgrade to support SRP. I'm planning to look at the existing unlit shaders and adapt my code to match those, since Shader Graph doesn't support some functionality I need.

    Is there a way to use conditional code to have a single *.shader file that compiles in all pipelines, even though there will be relatively little code in common? I'm interested in this option because since my asset has only one shader, I would really like to avoid having to make three or more versions of it. Or is there a better way? What about putting three shader files into the package (default, HD, and Mobile pipelines) but having each one ignored if it's not for the right pipeline?

    Finally, is there a way that my C# script, which currently creates a procedural material at init time and uses the (virtual) name of the shader, to inquire of the Unity engine which pipeline is currently in use so it can init that material with a different shader? Or will my shaders all have the same logical name ("Unlit/MyCustomShader") regardless of which actual shader is used in the current pipeline?
     
  47. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    See Tim cooper reply about the SRP re-org. There is a 2018.2 branch for public beta.

    We will check for the volumetric settings not working, thanks for the report.

    >also how to use the new SSR? or it is still not working yet?
    SSR is disabled currently as with public version it will crash in the Editor (Unity is not supporting more than 16 textures in compute shader currently...)

    Also about SSR: It is not yet at the quality we expect, it is super slow (no optimization started yet - Impossible to use it in production / to ship a game). So don't expect anything from it yet (unless you use the proxy mode fallback.

    There is two mode with this SSR: Hi-z raymarching (very costly)

    and proxy intersection (cheap - reuse proxy volume of reflection probe, mean reflection is as accurate as the proxy volume is representing the scene. A Square room: perfect reflection for almost no cost, a pillar in the middle of the room, the pillar reflection will appear like project on wall. Dynamic chararacter => almost F*** all the time if not close from a wall).
     
    Last edited: May 26, 2018 at 1:05 PM
  48. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    Hey,

    For those willing to test an HDRP project from scratch with latest Github change. Here is a step by step guide (note that we have now a 2018.2 branch, so master branch will soon not be compatible with public version.




    Download Unity beta 2 b5

    https://unity3d.com/unity/beta-download


    Launch Unity


    1. Create a project with Unity

    Note: On windows due to the maximum path length, it is recommended to use short name.

    Note 2: Take care of creating the project with the 3D template, and not with the HDRP template.


    2. Go to PlayerSettings and change Color Space to linear







    And disable MSAA (control is on the render pipeline Asset for SRP)



    For the various configuration (low to ultra)




    3. Close Unity.



    Install tortoise GitHub

    https://tortoisegit.org/


    Install git lfs

    https://git-lfs.github.com/



    In a command line that point on the git.exe use by tortoise do: "git lfs install"

    This may require a reboot to be effective.


    Clone the last SRP code

    Go to a folder outside the Unity project Asset folder

    Suggestion: Put it at the same location than Asset folder.


    Right click at this location and clone the github repository of this path https://github.com/Unity-Technologies/ScriptableRenderPipeline








    Note: Once again use a short path name here due to Windows maximum path length


    Once clone, you will need to update Postprocessing submodule. Go to folder SRP (That you create above), right click in a blank area:





    Select Postprocessing




    With recursive option and initialize.


    Init the HDRP local package

    Open the project Packages folder, open manifest.json

    Edit it and copy/paste in the file:


    {

    "dependencies": {

    "com.unity.postprocessing": "file:../SRP/com.unity.postprocessing",

    "com.unity.render-pipelines.core": "file:../SRP/com.unity.render-pipelines.core",

    "com.unity.shadergraph": "file:../SRP/com.unity.shadergraph",

    "com.unity.render-pipelines.high-definition": "file:../SRP/com.unity.render-pipelines.high-definition"

    }

    }


    Note: file:../SRP/com.unity.render-pipelines.core must match the path where you have clone your folder. In this example we have clone at the same level as Asset folder, and Package folder is at the same level, so we just do “../”


    Example: https://github.com/Unity-Technologi...Projects/GraphicsTests/Packages/manifest.json


    Launch Unity


    Now you need to setup HDRenderPipeline in Unity


    Create a new Render Pipeline Asset in your Unity Project browser at the location you want to create the asset (Caution: You can’t create the asset in Package folder, you need to create in Asset folder).





    In Graphic Settings, setup the HDRenderPipeline Asset






    You are now ready to use HDRP.


    You have (minimal) documentation here:

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki
     
  49. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    127
    >it seems HDRP Graph are working

    Warning. Current HDRP graph is a subset of what HDRP support. Node is compatible with LW, mean only features available in LW are present on the share HDRP master node.

    A new master node will be develop with all the feature of HDRP in the future, current node is for "cross-pipeline" compatibility.