Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Feedback Wanted: Scriptable Render Pipelines

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

  1. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    163
    Is the ScriptableCullingParameters cullingPlaneCount limited to a certain number?

    I'm trying to set the amount and then set the culling planes, but it errors when running, "Assertion failed: Assertion failed on expression: 'params.cullingPlaneCount == kPlaneFrustumNum'"

    I have planes that were created from portals clipped to the frustum, but the amount varies (at least a minimum of 3 culling planes)
     
  2. hong1991

    hong1991

    Joined:
    Sep 16, 2017
    Posts:
    8
    ui(canvas, image, text etc) doesn't show in scene view when i use a custom pipeline
     
  3. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    163
    Ah yea, 6 planes makes sense, I tried modifying it so 4 planes are always created around the min/max of the portal, with the the 2 side planes re-used for index 5 & 6 (instead of near/far)

    It works and culls the portals correctly, strange since when I try to re-use the near far it generally works but often over-culls. I think ideally the near would be on the portal and the far plane based on that but using the existing far clip distance.
     
  4. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    163
    Another ScriptableCullingParameters question :)
    What is the sceneMask ? Is there any way to make use of it to allow only specific loaded Scenes to be rendered? Tried changing it to some different numbers and it makes everything not render so I'm assuming it is somehow related to scene's and masking.
    The portals in my case are always tied to a scene that is loaded, so by knowing what portals are in view I also know what scenes I care about, it would be nice to further cull things with that (aside from toggling renderers / layers on and off like I used to do in 4.7)
     
  5. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,138
    alexzzzz and Prodigga like this.
  6. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    Been a while since the last time i've test SRP, the new refraction are beautiful man!!! kinda glitchy tho.
    The clear coat are buggy, the anisotropic are looks better
     
  7. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    202
    Hi,

    How to solve these errors (Unity 2017.3.b02-b08)

    Assets/ScriptableRenderPipeline-master/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs(456,13): error CS0117: `UnityEditor.SupportedRenderingFeatures' does not contain a definition for `reflectionProbeSupportFlags'

    Assets/ScriptableRenderPipeline-master/TestbedPipelines/Fptl/FptlLighting.cs(425,194): error CS0117: `UnityEngine.Experimental.Rendering.RendererConfiguration' does not contain a definition for `ProvideReflectionProbeIndices'
     
  8. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    163
    this seems to work, just some differences with the enums
    reflectionProbe = SupportedRenderingFeatures.ReflectionProbe.Rotation

    RendererConfiguration.PerObjectReflectionProbes in place of RendererConfiguration.ProvideReflectionProbeIndices
     
  9. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    202
    My hardware: i7-4790K/32GB RAM/GTX 970

    Thanks for help. Errors gone - but Unity crash after change pipeline
    throwing errors on console:

    Kernel 'Deferred_Direct_Clustered' not found UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    UnityException: FindKernel failed
    UnityEngine.Experimental.Rendering.HDPipeline.TilePass.LightLoop.Build (UnityEngine.Experimental.Rendering.HDPipeline.RenderPipelineResources renderPipelineResources, UnityEngine.Experimental.Rendering.HDPipeline.TilePass.TileSettings tileSettings, UnityEngine.Experimental.Rendering.TextureSettings textureSettings, UnityEngine.Experimental.Rendering.ShadowInitParameters shadowInit, UnityEngine.Experimental.Rendering.ShadowSettings shadowSettings) (at Assets/ScriptableRenderPipeline-master/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs:548)
    UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline..ctor (UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset asset) (at Assets/ScriptableRenderPipeline-master/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs:348)
    UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset.InternalCreatePipeline () (at Assets/ScriptableRenderPipeline-master/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs:14)
    UnityEngine.Experimental.Rendering.RenderPipelineAsset.CreatePipeline () (at C:/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipelineAsset.cs:19)
     
    Last edited: Nov 8, 2017
  10. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    @SebLagarde any chance we can get derivative normal in SRP, totally remove tangent from mesh?
    also i noticed there's a bent normal support, shouldn't that suppose to be an additional Gbuffer not a texture?
     
    Last edited: Nov 14, 2017
    hippocoder likes this.
  11. benjcooley

    benjcooley

    Joined:
    May 3, 2014
    Posts:
    45
    Hey, just saw this massive commit #7a73833.

    I see - CharacterShader, EyeShader, SkinShader, HairShader, and VegetationShader.

    What is Yibing project, and what is coming in with these commits? I'm assuming a proper set of character shaders that implement correct skin, eye and hair.

    Any details on this available?
     
    Alverik and PhilSA like this.
  12. scvnathan

    scvnathan

    Joined:
    Apr 29, 2016
    Posts:
    74
    My guess is the Yibing project is their demo project for SRP - the SRP teaser that was showed at the Unite Europe '17 keynote. But who knows
     
  13. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    i'm getting massive error with the latest commit in unity 2017.3 b8. what unity version the master branch compatible with?
     
  14. benblo

    benblo

    Joined:
    Aug 14, 2007
    Posts:
    469
    Last edited: Nov 16, 2017
  15. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    405
  16. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
  17. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    377
    >@SebLagarde any chance we can get derivative normal in SRP, totally remove tangent from mesh?
    >also i noticed there's a bent normal support, shouldn't that suppose to be an additional Gbuffer not a texture?

    Regarding removing tangent space, we haven't gone through the derivative map way but use a surface gradient framework (no documentation currently, but information are in various paper of Morten Mikklesen blog (https://blogs.unity3d.com/author/morten-mikkelsen/)). Still for UV0 we keep the traditional tangent space. This have usage like being able to do POM etc...

    We use bent normal to sample the GI (indirect diffuse), so we don't store them in the Gbuffer.
    This could indeed be use for other purpose, and so legitimately store in the GBuffer, but let it as a users exercise as our goal is to stay with 5 RT for the version we deliver (but users can add more RT if they can afford the performance hit).

    >Hmm strange, usually the master branch are compatible with the latest unity beta
    Master should be most of the time out of sync with the public beta, and is targeting internal development.
    We create release and branch (Unity-2017.3) for public version

    >What is Yibing project, and what is coming in with these commits?
    This is an internal sandbox project and the shaders here are not aim to be part of HD. Use for testing purpose (And it is not related to the work of DanRoarty :) ).
     
    Last edited: Nov 20, 2017
    Reanimate_L likes this.
  18. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    377
    >Kernel 'Deferred_Direct_Clustered' not found UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    With Unity 2017.3 the compute shader maangement is a nightmare (this is fixed for 2018.1).
    The rules when you merge or do anything with compute shader in 2017.3 is:
    - Re-import HDrenderPipeline folder
    - Close unity
    - open unity
    - Re-import HDrenderPipeline folder again (yes...)

    Then it should work. Otherwise, it may happen for whatever reasons that a HDRenderPipelineResources.asset is not complet, like a missing compute shader in the properties. In this case it need to be fill.
     
  19. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    377
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    i found some function in the built in cginc for that but since no sample or documentation it kinda hard to find out the usage.

    I see, was hoping that we could get a good specular occlusion

    i see, it was sync with the current beta for couple month. But if that how it is so be it then.

    Oh come on. why!!!?? why can't we get more sample and built in fancy stuff :(
     
  21. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    63
    So why we still forced to use this non-traditional smoothness map instead of roughness?
     
    alexzzzz, JakubSmaga and scvnathan like this.
  22. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    245
    Do we have to use this with the 2017.3 beta or can we start messing with it in the latest 2017.2 release/patch release?
     
  23. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,474
    I'm in agreement, I feel roughness is a much better industry wide accepted term. There needs to be a valid reason it's called smoothness, a logical reason not a "we felt like it" reason.

    Could make a tiny modification to asset import pipeline to invert a channel of choice on import for textures, it would probably not need a change to unity editor source. As for shaders, no idea why it's smoothness... perhaps the specular workflow.

    But specular workflow is redundant here. We have a fresh start with SRP HD/LD etc. Perhaps now is the time?
     
  24. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    405
    in 2017.2 there's a shader with roughness too, so there's both workflows in unity right now.



    Don't see a reason why they wouldn't have a version of it for SRP since this addition was fairly recent to Unity.

    There might be a switch in the shader/material editor for the base node to switch roughness/smoothness and metallic/Specular workflows.
     
    hippocoder likes this.
  25. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    66
    Hi, will SRP allow for manual treatment of culling data? Right now with CullResults we can only specify parameters, not the actual collection of objects, but I am thinking about hierarchical z culling and for that I would need to manually discard or modify elements of culling data.
     
    Birkeman likes this.
  26. Birkeman

    Birkeman

    Joined:
    Apr 22, 2013
    Posts:
    16
    This is a feature I also think would be beneficial to a lot of people. For PCG levels, player made content and really any geo created at runtime you can't rely on the built in occlusion culling so would be nice if custom ones could be implemented with SRP. Alternatively now where occlusion culling can be baked at runtime it would be nice if you could save and load the baked data. Both options would be great to have.
     
    scvnathan likes this.
  27. kalineh

    kalineh

    Joined:
    Dec 23, 2015
    Posts:
    58
    I'm not sure if I missed some API somewhere, but I'd like to entirely disable all the culling and bounds calculations; is there any way to get a dummy cull results that includes everything? (our cull/bounds calculations collectively takes up almost as much as draw handling on CPU (not using occlusion culling, just frustum))
     
  28. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,266
    So are there any plans for a surface shader replacement within the SRP framework? In my spare time I do shaders for the asset store, and I'm assuming if you want to support the old workflow plus the two SRP loops you'll end up having to write your shaders at least 3 times. I have moved away from writing vert/frag shaders because the lighting pipeline in Unity is such a tower of macro's that it's virtually impossible to get everything correct if you have to support multiple versions of Unity (in my case, 5.4 and up), and testing it all as a solo dev is nearly impossible. While I've noticed the overall shader pipeline looks much cleaner in the HD render loop, there's still a lot of lighting complexity/macrofu/etc, and having to understand and write shaders for 3 times as many pathways seems like a nightmare.

    Most of my asset store stuff uses a fragment combiner to actually write the shader code, since I long ago past the number of options that shader_feature could handle. So my current plan is to modify this so that it can take some kind of wrapper file to generate the shader within, sort of like the difference between a surface shader and the shader it actually writes out for the compiler. However, this still seems like a useful abstraction for Unity to provide. I fear that without this adoption of SRP pipelines will be very slow or only for studios which are going to customize the entire pipeline anyway. And any assets which involve shaders will either have to provide multiple implementations for common SRPs, or be limited to "the one everyone uses anyway".

    Basically the part I'd be interested in is being able to declare a structure which a SRP expects for it's shader stages, a set of passes which get generated and call the surface function to fill out such structures, and a way for that code to export the resulting source code for the shader compiler.

    I suppose another option is the C#->HLSL cross compiler; where you could inherit from "MySRPLit" and override the surface function with your own.
     
    Thrawn75, hippocoder, kvekos and 4 others like this.
  29. kvekos

    kvekos

    Joined:
    May 17, 2016
    Posts:
    60
    @Tim-C @SebLagarde @Alex-Lian

    Does the current state of the SRP offer a solution for my problem?: I have hit a limitation with a custom shader asset I'm creating where using CommandBuffers isn't cutting it because I need to do a grab of the scene before rendering each transparent object and applying a custom shader to each of those grabs which will be used to render the objects. The problem with the CommandBuffer is that you time their execution with the CameraEvent parameter and it provides no way for me to have it execute with more fine-grained control (In my case I would ideally have it execute before each transparent object which has my custom shader applied to it in the correct order based on transparency sorting of the individual objects in the current view of the scene).

    Since I'd like to sell my shader on the Asset Store it would also ideally let me do this without having to attach a custom script component to every object that wants to use my shader because this is bad from a usability perspective. I just want the user to be able to drag and drop any material using my shader on to any mesh and just have it work. I don't want them to have to remember to set tags on the objects or assign them to specific sorting layers either.

    Can the SRP provide a solution for my particular needs?
     
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    If i'm not mistaken, SRP already have that, a full refraction pass in the last update for 2017.2
    Edit : You just make me reopen the project :D. yep confirmed, it was there already a pre refraction pass and distortion for multilayered transparent object and blurry refraction
     
    Last edited: Dec 19, 2017
  31. kvekos

    kvekos

    Joined:
    May 17, 2016
    Posts:
    60
    Oh... that's what I've been implementing in the classic rendering pipeline for the last 7 months... :(
     
  32. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    407
    Hi @SebLagarde!

    Since Unity 2018.1 Beta which includes SRP is coming out in a few days I have a small question.

    On the documentation page: https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html You can see that Volumetric Lighting & Atmospheric Scattering model is set to (Later).

    In which Unity/SRP version could we expect to see them? (It's one of the most interesting things for me, That's why I'm asking)

    Happy New Year to the SRP team!

    Thanks.
     
  33. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,474
    Yeah this is currently why I am avoiding using microsplat and currently why we're just going to use normal meshes unless this is clarified - obviously! Wonderful asset but having tested SRP LD and been watching HD I do think these are both far, far superior to using the current built in graphics and my game is a way off being locked down so no real choice. Not a criticism of microsplat but adding my voice for information.
     
    Alverik likes this.
  34. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    3,266
    From my initial tests, LD seems like a cleaned up version of the current forward rendering pipeline, not something which is going to radically alter the look. I've actually started porting MicroSplat to an LD render loop already, so I'm hoping to have this working by the time 2018.1 ships - I'm basically designing the compiler in MicroSplat such that it can compile to different render loops, so companies with their own SRP frameworks could likely adapt MicroSplat to it easily.
     
    Alverik, elbows and hippocoder like this.
  35. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,033
    I bet it will be a while. Especially since for 2018.1 the roadmap indicates that in addition to the underlying SRP functionality, the package they want to ship with 2018.1 is the Lightweight Render Pipeline one. This is not unexpected since they always said in conversations here that the LW Pipeline would be the first example one to ship, and although the HD one is clearly in active development we will be waiting a bit longer for the first release version of that.

    I too am interested in the stuff including volumetric stuff but I have to continue to moderate my expectations. Lots of work clearly done in the last year+, plenty more to do. I hope the pipeline stuff stabilises in first couple of 2018 releases and that everything goes ok with simpler pipeline. At some correct moment I hope that attention is paid to some good example eyecandy of what HD pipeline can achieve that current built-in unity pipeline cannot, but I understand when the timing is not quite right to make that sort of big splash. I am particularly interested in whether the combination of volumetric fog & area lights gets much beyond what was demonstrated (& shared on githib) in the Adam demo.
     
    Alverik and JakubSmaga like this.
  36. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,033
    Its also too early to predict how much people end up relying on that fancy layer of stuff that Unity plan to add to their HD pipeline in the future, as opposed to how much 3rd party developers will embrace the pipeline stuff and end up adding cool stuff like the volumetric stuff either quicker than Unity manages to develop theirs, or with fancier functionality.
     
  37. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,474
    There will be a blog post quite soon - I had a chance to read an early version and am quite excited - it makes LD more accessible and will eventually empower HD as well, so looking forward to that.

    I think HD needs more time though, judging by github. Hoping it will be optimised enough to choose for a general console release. I saw that they removed the volumetric stuff for the time being (check github commit history) and I think that's expected while they work on bringing the more important things together. Probably worth putting out of mind for another 6 months or more :)
     
    tatoforever and Alverik like this.
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    i still bit confused about the character shading part though (skin,hair,cloth), didn't Yibing Jiang already have a working shaders for those part but it was reverted back ?
     
    Alverik likes this.
  39. Gokcan

    Gokcan

    Joined:
    Aug 15, 2013
    Posts:
    188
    @SebLagarde Everyone here wonders about what Yibing Jiang is currently working on? Can you please talk with her to answer community questions here?:) I guess people here including me want to see high quality character shaders like they did in Uncharted 4...
     
    Alverik likes this.
  40. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,315
    Oh and a small request if possible, yeah might be not small one though :D
    1. Integrated Unique Character Shadow
    2. Sphere/Elipsoid Soft Shadow or Capsule shadow with directional support :)
     
    OCASM likes this.
  41. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,033
    Yeah I do search the history from time to time, and noticed that one at some point after it was removed. I'm waiting for 2018.1 before taking a proper look again but it is nice to see how much work is being done to the HD pipeline on github at the moment. And I think I just noticed the latest commit having some volumetric-relevant stuff in it again but I havent looked properly just yet.
     
  42. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    407
    Looks like It's slowly getting there. https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/755
     
  43. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    407
    Alverik likes this.
  44. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    202
    Hi,
    Is it possible to use HDRenderPipeline in 2018.1 Beta ?
     
  45. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    407
    How to get your hands on SRP and the Shader Graph

    In the next iterations of the beta, we will integrate these elements in a friendly user workflow for creating and using projects. But if you can’t wait to try them out, we made a simple sample that uses SRP, built on the Lightweight pipeline, and also includes the Shader Graph tool.

    https://blogs.unity3d.com/2018/01/10/get-early-access-to-unity-2018-1-the-beta-is-out

    Looks like HD is going to be available in one of the upcoming betas.
     
  46. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    202
    Thanks for information.
     
  47. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    342
    Is HD/Shader Graph going to include a shader for the terrain so we don't have to use 3rd party solutions anymore for tessellation, etc?
     
    Alverik likes this.
  48. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    13
    Hi there, how can I actually get started with Render Pipeline and Unity 20128.1 beta?
     
  49. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    405
    You will have to download the sample project here https://forum.unity.com/threads/feedback-wanted-shader-graph.511960/

    Its in the first post, just scroll down and look for "Sample Project" that link will take you to a project containing the Lightweight Pipeline (The one available right now) HD Pipeline will come later.

    2018.1 beta from their beta page here - https://unity3d.com/unity/beta
     
  50. EthanHunt

    EthanHunt

    Joined:
    Oct 9, 2012
    Posts:
    13
    Except that does not really help at all if I want to experiment with the HD pipeline or write my own custom pipeline. I figured it out anyway: Clone the Git repo and follow instruction with master branch, BUT make sure that the project's manifest.json does not contain any reference to anything "pipeline". I also had compile errors complaining about missing TestTools and NUnit, but then I tried with a new blank project everything seems to work fine.

    EDIT: It appears that the issue with missing test assembly was resolved in a new commit 11 hours ago.
     
    Last edited: Jan 12, 2018