Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback Wanted: Scriptable Render Pipelines

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

  1. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I think the feature itself still works, but shaders are not being recompiled when the setting is changed. If I manage to trigger a recompile some other way, or more simply edit the settings to switch Ultra on before I've ever opened the project with the current SRP installed, then I think Ultra mode still works.

    On a related note, editing just the ShaderConfig.cs file has never been enough for me, it doesnt seem to recreate ShaderConfig.cs.hlsl so I have to edit that file manually too (even thogh it says not to manually edit that file). And in the past, it was changes to ShaderConfig.cs.hlsl that used to rebuild other shaders, but no longer seems to.
     
  2. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Sadly there is a problem with the new re-org that we have done .hlsl change are no more detected...
    So currently we ask to avoid any upgrade.

    I suppose this is the behavior you observe.

    ShaderConfig.cs is not automatically convert to ShaderConfig.cs.hlsl, you need to call Edit->RenderPipeline->GenerateInclude files. But in practices we never do that, we just update both files.

    Current workaround regarding hlsl change undetetion is to reimport on individual shader and compute :(
     
  3. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Yes, thats it exactly, thanks for confirming and sorry that the re-org has brought more pain to you & team. I really appreciate all your efforts, and although it is in some way impressive to sometimes see you here & on github on weekends, I hope you get a really nice holiday at some point!

    Personally I think I am ok to continue with versions that have this problem, I can work round it and am only doing some very specific things with HD pipeline at the moment anyway (mostly all related to volumetric stuff).

    Thanks for explaining how that stuff works - I have been quite happy changing both files myself too, but always wondered what the 'proper' way to do it was. And I didnt want to press all the Render Pipeline menu items without really understanding what they did ;)
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Oh seeing as we were talking about menu items, I was wondering if there was a good reason why Density Volume just has a menu item to add the Density Volume component to an existing gameobject, rather than a menu item which creates the gameobject too (like how create scene settings works, and other sorts of volumes menu items like post-processing if I remember correctly). It's not a big issue, but I was just thinking about saving a click or two and being more consistent with other parts of the system.
     
    Last edited: May 27, 2018
    Grimreaper358 likes this.
  5. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    is this only happen with volumetric lighting? or everything?
     
  6. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    129
    I've tried experimenting with the HDRP today, and stumbled upon a weird thing. If I set directional light to ~60k Lux, I get scene that is too bright - even though direct sunlight based on wikipedia should be around 111k Lux, and from 30-100k Lux based on the Frostbite PBR document?

    Am I doing something wrong, or is the implementation broken?
     
  7. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    It's not properly set up for actual Lux values yet, that will come with the Physical Camera implementation and probably Time of Day for it to work right. (Mainly Physical Camera is needed to properly setup scenes based on the Sunny 16 rule, time of day will be something extra. Granted I actually don't know how the team at Unity will go about doing this but from my knowledge, this would be the setup for proper Lux values.)
    upload_2018-5-27_17-44-23.png
    From

    From

    It's all on the roadmap so we just have to wait for it.

    For now, the default value that's set on the Directional Light is whats to be used right now or lower depending on the time of day, sky, etc. Devs will give you a proper response as they are pretty active on here.
     
    id0 likes this.
  8. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    1. Are realtime point lights supported in HDRP (2018.1.1)? I have set 2 of them on terrain but they are not rendering anything.
    2. Procedural sky in HDRP has sharp cut on the border of ground and sky color. In default pipline is much softer blur.
    3. Directional light: when player walks on terrain as if shadow cloud is going with him and it's drawing shadow around him as camera moves. You can see sharp edge of the shadow which is drawing in realtime as player moves while lower resolution at distance. shadow.JPG
    4. When importing standard player in HDRP, I got this error

    Code (CSharp):
    1. PlayerSettings Validation: Requested build target group (20) doesn't exist; #define symbols for scripting won't be added.
    2. UnityEditor.PlayerSettings:SetScriptingDefineSymbolsForGroup(BuildTargetGroup, String)
    3. UnityStandardAssets.CrossPlatformInput.Inspector.CrossPlatformInitialize:SetEnabled(String, Boolean, Boolean) (at Assets/Standard Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs:127)
    4. UnityStandardAssets.CrossPlatformInput.Inspector.CrossPlatformInitialize:.cctor() (at Assets/Standard Assets/Editor/CrossPlatformInput/CrossPlatformInputInitialize.cs:22)
    5. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
     
    Last edited: May 29, 2018
  9. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    1. Yes they work, it is the terrain that is not supported in hD
    2. It is because HD do per pixel sky (all sky system is per pixel in hd) and builtin do per vertex. We are aware that the per vertex looks is nicer, but our goal is to replace the procedural sky by a true physically based sky in the future, so we don't invest in updating procedural one.
    3. terrain is not supported in HD
    4. UnityStandardAsset are pretty old, I don't know about it :), I guess Unity content team have created new stuff recently and they have done a blog post about it.
     
  10. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Sadly, to embrace fully physical light unit like for the sun (around 100K average), HD miss pre-exposure and a way to setup manually exposure of EV16. This will come in the future but not there yet. I advice to not go above 10 000 lux for the sun for now and it will help as it will reduce the dynamic range at the same time. Please see this presentation if you haven't see it:
    https://www.gdcvault.com/play/1023284/Lighting-the-City-of-Glass
     
  11. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I've imported my own terrain (simple mesh with a couple of planes) and it's having lower resolution of shadow at distance which is visible. As plyer walks, sharps edges of the shadow are being rendered. I would like to have uniform shadow across all of the mesh.
     
  12. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    How can I add decal render order in the in HDRP? For now it's a mess.
     
    Last edited: May 30, 2018
    AntonioModer likes this.
  13. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    54
    Hi there Unity,

    I've been experimenting with LW RP lately in Unity 2018.1.1f1 using the package manager. Its a great update, but there are two issues that I noticed:

    1) As I use "Instanced Properies" in any of the LWRP shaders, the shader code does not compile. I'm using Amplify shader editor to create the shaders. Is this a known issue or is it something I need to pick up with the Amplify team?

    2) When I add the new post processing stack to my camera (without any post processing effects enabled) the camera will render a depth pass which adds significant amount of draw calls. Since we are planning on only using Bloom and Vignetting it feels like rendering a depth pass is unnecessary overhead.

    Thank you very much in advance,
    Laurens 't Jong
     
  14. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    Are there any plans on Volumetric clouds?
     
    konsic likes this.
  15. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    65
    Decals render by ID materials/objects, last created material/object draw last:

    rwernwe.PNG
     
  16. id0

    id0

    Joined:
    Nov 23, 2012
    Posts:
    455
    In start it work like this, yes. But later forward decals can move on back, and so on.
     
    AntonioModer likes this.
  17. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    65
    id0 likes this.
  18. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Will HDRP be ready for game production in 2018.2 ?
     
    EricWilliams and AntonioModer like this.
  19. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    I asked about that earlier in the thread, here was the reply:

    Previous post.
     
    id0 and AntonioModer like this.
  20. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,671
    Please, yes. That would be amazing. Currently, as I understand, you always have to cull the whole scene from every camera. Layer bitmasking and bucket filtering helps, but in case you want to render a very small amount of specific objects, you don't wan't to iterate the whole world.
     
  21. relativegames

    relativegames

    Joined:
    Nov 22, 2013
    Posts:
    32
    If only I had such a package manager option in that sample project, but I don't. I have the package manager in a fresh project, but not in the sample. Also, I downloaded the Post Processing V2 repository and the ShaderGraph repository and now I got

    Assets/ShaderGraph-master/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs(272,40): error CS0246: The type or namespace name `DragUpdatedEvent' could not be found. Are you missing an assembly reference?

    Assets/ShaderGraph-master/com.unity.shadergraph/Editor/Drawing/Views/MaterialGraphView.cs(282,33): error CS0246: The type or namespace name `DragPerformEvent' could not be found. Are you missing an assembly reference?

    UPDATE: So after downloading these, the package manager under Window has appeared. Wow ! I installed from it the post processing package, shader graph, SRP core and lightweight render pipeline, but then I got errors that I already have them in my project. I now deleted them but I have no idea what to do next as I deleted all the previous stuff and have no sample scene or anything, how am I supposed to test this feature with packages ? Do packages have scenes and I need to get them from somewhere ?
     
    Last edited: Jun 3, 2018
  22. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Will default Unity pipeline get volumetric point and spot lights in Unity 2018.2?
     
  23. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Default Unity pipeline isnt getting any of the stuff that is being worked on in the new pipelines. If you want volumetric fog in the old pipeline, choose from quite a number of 3rd party assets that have provided various different sorts of volumetric lighting and fog for years. In terms of a Unity-provided solution for old pipeline, the closest you will get is the fog that was made for the Adam demo, although off the top of my head I dont think it supports spotlights. ( https://github.com/Unity-Technologies/VolumetricLighting )
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Kinda doubt that, since built in would be legacy. And usually they only doing bugfix support, not improving
     
  25. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Someone reported somewhere (couldn't find it anymore) that with the GitHub master branch you'll get a constant reimporting of hdrp shaders. Now with b7 and 2.0.0 package Manager I'll get the same. If you click on the editor, shaders get reimported. Since the editor loses focus, the next click reimports again and again.

    You have to restart the editor to work again, until you try something with shaders (I added a planar reflection and clicked on the material) to get the reimport issue again.
     
  26. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Also get the issue with constant reimporting on b6.
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Thanks for doing this in newer versions, cross that one off the list of small requests :)
     
    Last edited: Jun 11, 2018
  28. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I have a question about Pipeline Asset settings. I noticed there are separate settings for support and enable for specific features (forward and msaa). Is support compile time and enable runtime time setting or is there some other reason why these are separate settings?

    Also, I might have missed it but is there any plans for Area Light shadows atm?
     
  29. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Even at the research stage, where the likes of Eric Heitz's work brought us this sort of area light technique in the first place, realtime shadows for these lights have not been an easy problem to solve.

    However this year, Eric Heitz, Stephen Hill and Morgan McGuire produced a paper which demonstrates a solution that makes use of raytraced shadows & de-noising:

    https://eheitzresearch.wordpress.com/705-2/

    Since it involves raytracing, I'm kind of expecting that this will be one of the initial batch of use-cases for the realtime raytracing stuff that was heavily promoted by nvidia etc at this years GDC. So, not something I expect to suddenly see arrive in the coming months. And I dont know when Unity will try it, I know a competing engine would like to implement this in some kind of initial form by the end of this year.

    On a vaguely related note, I would really like to know what the plan is with area light compatibility with volumetric fog, especially since the earlier work done a few years back for the Adam demo had support for this, so in some sense HDRP feels like a step backwards on this front. But having said that, I know we only got volumetric fog in initial form in the HD pipeline quite recently, and there might be a good technical reason why it doesnt seem to work with area lights yet, or they just havent had the resources to look at this yet.
     
  30. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    And, for that matter, using textures with area lights, images of which caught my eye with Erics original research papers a couple of years ago. As far as I know Unity doesnt have that feature yet?
     
    Last edited: Jun 11, 2018
  31. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Is there a way to iterate through the individual objects about to be drawn with CullResults? Or pass a list of objects through whatever process CullResults uses? I have a list of objects I want to run some custom command buffer stuff on, but I need to be able to draw each object in the list sequentially (to do some custom pre/post logic per object rendered) rather than just passing an entire group of objects to be rendered at once. I understand this is *usually* what you want to do for performance reasons, but..

    Right now I've created a list of renderers in the LightweightPipeline class that I register objects OnEnable/OnDisable with. This works, but seems like a grossly incorrect solution. Additionally, these objects are never culled using the same process other objects are (CullResults)

    If CullResullts.visibleRenderers returned a List<Renderers> like visibleLights does, it would be exactly what I'm looking for, but since this isn't the case I'm curious what the correct alternative is?

    What I'm trying to use this for: A system to block shader effects based on "occlusion" geometry.
     
    grenappels likes this.
  32. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    What you want is handled by FilterRendererSettings. The
    renderingLayerMask
    is an arbitrary bitmask that you can use to further filter out a
    CullResullts.visibleRenderers
    to get a smaller subset. You'd spin up a custom Pass and do something with the filtered CullResults, either invoking something with the equivalent of a Replacement Shader, or other.
     
  33. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    Thanks, I'll take a look. I'm not sure that would work though, as I don't really want a _smaller_ subset; I need to render objects from the cull results individually, one at a time to a RT and do some processing on it before moving onto the next object in my custom pass.

    This sounds like objects would just be passed through one more filter (by layer), but still be processed all at the same time not allowing me to do logic pre/post each objects individual render.
     
  34. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    So you potentially want objects that are off-screen and thus would not already be in the CullResults? That seems more like a special CommandBuffer which the DrawRenderer commands are issued individually via some custom Script, if I understand you correctly.
     
  35. DMeville

    DMeville

    Joined:
    May 5, 2013
    Posts:
    418
    No; I have a list of objects I need to render one at a time. CullResults doesn't let me do that, as it renders ALL objects that meet the criteria (pass/tag/whatever) at once. If I could iterate through all the renderers that CullResults filters that would be great, but that fine grain control doesn't appear to be exposed anywhere.

    In order to circumvent that limitation I pass in a List<Renderers> manually but those don't get passed through the culling method. I would like them to be, as there is no reason to try and render an object that should be culled, but again I'm not sure how to do that. There is no method I'm aware of that will let me pass in a list of objects and then return a list of objects will all the offscreen objects removed or whatever CullResults does internally. If there is a method like that which I'm not aware of please point me in the right direction.

    I'm still learning about graphics programming and the SRP, but I did manage to throw together this demo: https://github.com/DMeville/Volumetric-Occlusion-Mask-SRP/

    You can see specifically what I'm doing about the problem posted here: https://github.com/DMeville/Volumetric-Occlusion-Mask-SRP/blob/master/Assets/LightweightPipeline.cs at line 584.

    Essentially:
    Code (CSharp):
    1.  
    2. clear mask rt
    3. for each object with shader pass "custom"
    4.     clear temp buffer 1
    5.     clear temp buffer 2
    6.     write object pass1 to buffer 1
    7.     write object pass2 to buffer 2
    8.     using that data and a custom shader stamp the results to mask rt
    9. end
    10. set mask rt to global shader texture
    11.  
    The issue with using CullResults is that I can not iterate each object like I need to above.
    The issue with NOT using CullResults is my List<Renderers> includes offscreen objects.

    Not sure if there's a solution I just am missing.
     
  36. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    154
    Ohh I understand now. Sorry, I don't know why that was so hard to understand. Yeah, it is my understanding from my experience working with CullResults that what you're proposing is outside of the intended use case. I have a tangentially related post from April where I queried about further modifying CullResults, but in my case I wanted to further cull based on additional parameters. It may get a more expanded API in the future?

    With your approach though, I think you'll have better luck performing a manual cull based on the Camera's culling planes and executing a custom CommandBuffer at some point in the Render loop, like you're already doing.

    That being said, that amount of Render Target switching can be quite expensive depending on the hardware, so perhaps there is an approach that allows you to do all of the back faces, then all of the front faces without the need to clear your intermediate RTs between each object.
     
    DMeville likes this.
  37. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Harold Halibut sure made beautiful use of HDRP, as seen in todays keynote, lovely stuff.

    Never mind how much confetti fell to celebrate prefab improvements, lets make sure the HDRP team get an infinite supply of virtual confetti (rendered using HD pipeline of course) one day!
     
  38. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    I copied this from Book of the dead. Will this be in the official Unity 2018.2 ?

    - Area Volumes: Volume based system driving atmospheric scattering, sunlight and wind properties.
    - Custom atmospheric scattering.
    - Custom vertex shader for procedurally animated wind, used by all our vegetation.
    - Project-specific Lit shader customizations.
    - Project-specific customizations to lighting, shadows and occlusion inputs and calculations.
    - Occlusion Probes, a baked solution for efficient sky occlusion on foliage.
    - Grass occlusion system to create additional occlusion for our smaller vegetation assets placed on the terrain.
     
  39. VisualTech48

    VisualTech48

    Joined:
    Aug 23, 2013
    Posts:
    247
    Maybe this has been answered already, and sorry if so, however, what is the state of SSR and SRP?
    Can they be used in the beta 2018.2?
     
  40. xipeluife

    xipeluife

    Joined:
    Jan 15, 2013
    Posts:
    14
    I have a question regarding transparency sorting. I'm making a 2D game where sprites further along the Y axis should be drawn first. I achieved this easily with Unity's default renderer via the transparency sort axis in the graphic settings. Can this still be achieved using LWRP or SRP? If so, can you help me please? I would love to understand more on this new graphics workflow, keep up the good work!
     
  41. macrod

    macrod

    Joined:
    Dec 9, 2012
    Posts:
    31
  42. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Is there any significant performance cost or difference in performance with HDRP when using standard GameObjects instead of some kind of scripted instancing system for rendering a lot of meshes (things like trees, grass, detail objects) if the materials have instancing enabled?

    I'm referring to this tweet by one of the authors of Book of Dead: https://twitter.com/vesseff/status/953560738139865088
     
  43. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yes this can be done :) When calling DrawRenderers you can pass in: https://docs.unity3d.com/ScriptReference/Experimental.Rendering.DrawRendererSortSettings.html as ortho.
     
  44. cfree

    cfree

    Joined:
    Sep 30, 2014
    Posts:
    72
    @SebLagarde
    @Tim-C
    Hi!!
    After the Unite Roadmap session, i have some little doubts:
    --> Specular AA (listed for 2018.2) will help to fight the "flashing" artifacts we see on rough surfaces (specular light reflections)? Can you share more details on that?
    --> Hair shader is listed for 2018.3... what about skin shader / eye shader / fabric shader (we saw it in the Windup demo at GDC).
    --> A little off topic, but do you have info on GPU lightmapper? :)

    GREAT JOB SO FAR ON HD PIPELINE :)

    Thanks a lot!!
     
    Last edited: Jun 21, 2018
    konsic and sqallpl like this.
  45. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    And more info about programmable VFX
     
  46. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    elbows and konsic like this.
  47. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I have a question about the HDRP it seems that Sub Surface Scattering on materials only works with the distance light and spotlight. Is that correct? Point lights seem to have no effect.
     
    Last edited: Jun 23, 2018
  48. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    Hi. No, SSS work correctly with all lights + Ambient probe. Transmission too. However transmission shadow don't work with directional light currently.
    (in 2.0.3-preview)
     
    EddieChristian likes this.
  49. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    >And more info about programmable VFX

    VFX editor is under development, we are preparing source code to become public via our Github, however it doesn't mean the product is usable or out.
    We do public development so it is expected to see the source code, but we will no do any support or answer any questions until the product is officially release as experimental/preview package.

    We hope to be able to provide an experimental for 2018.3 but no guarantee.
     
    konsic, Grimreaper358 and elbows like this.
  50. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    why SSS not working with multimonitor ? f.e. editor window is on one monitor and game is on second - in game window there's sss off ?