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. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    611
    I have several questions that I wasn't able to find documentation for, other than writing an entirely new pipeline:

    1] How do I inject a command buffer at a specific render point without writing a whole new render pipeline. For example, I want to copy the depth buffer right after it is created and create several downsampled versions of it (half, quarter, etc.). This was easy with a camera command buffer using before depth texture (forward) or before reflections (deferred).

    2] I want to inject several other additional command buffers: one right after the opaque objects are rendered and one right before transparent objects are rendered, and a final one right after transparent objects are rendered. How do I do this with the new render pipelines? Is this kind of granularity possible?

    3] What is the replacement for light command buffers? For example I want to capture and perhaps modify the cascade and screen space shadow map...?

    Will this be different for lightweight vs hd pipeline? What about custom pipelines?

    It would be great to hook into rendering points without writing a new pipeline, similar to how camera command buffers work, but maybe that's not how these pipelines are supposed to work...? I am quite new to SRP so please forgive my newness.
     
    Last edited: Jan 10, 2019
    Nyarlathothep, HolyShovel and Shorely like this.
  2. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    149
    Hello everyone, i've got some question to you regarding by this article.
    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Upgrading-to-HDRP
    You did wrote here: "The HDRP template examples were made to look good but were not realistic, whereas this Scene uses physically correct light values: an afternoon direct sun with no clouds in the sky is much brighter than even the best professional construction spotlight. However, the spotlight is still casting light and shadows on the side of the wall."
    SO my question is, how you'll make it realistic further?
    Also any news about post process stack 3, with pre-exposure, and rule sunny 16 for physical base lighting setup?
    P.S
    Can you share evening lux for sun and sky? I can't figure out it
     
    Last edited: Jan 11, 2019
  3. ekakiya

    ekakiya

    Joined:
    Jul 25, 2011
    Posts:
    8
    That document's intensity values looks wrong.
    For the clear sky noon, Sun=100000 and Sky=20000 are typical number for iluminance(lux), not for luminous flux(lumen).
    And the surface's emissive intensity must be luminance(nit).

    The sun(directional light)'s intensity is ok at 100000lux.
    To make the sky 20000lux, the sky's emissive intensity must be 20000/PI nit if the sky is flat white.

    The LightBulb is 8500lumen, it's luminous flux(lumen).
    So the lightBulb's emissive intensity must be 8500/total surface area nit, if it's light distribution characteristics is isotropic.
     
    fractyja and Danua like this.
  4. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    149
    Ok, but I want to undrerstand what lux settings apply for sky and sun in THE EVENING. 5-6 PM
     
    Last edited: Jan 11, 2019
  5. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    149
    #Feature requset:
    Allow for volumetric fog color(single scattering albedo) HDR values here
    upload_2019-1-11_15-24-3.png
     
  6. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    163
    I've noticed the Cameras array in Render( context, cameras[] ) is always length of 1 even when both SceneView and GameView are visible rendering at the same time, is this intended?

    *EDIT* Yea it looks like the scene view and game view are called separately.

    I was trying to have some per-frame-data render globally across all active cameras and was treating it as if the Cameras array length is the currently active & rendering cameras, so that I know when all of them have rendered, but it doesn't seem to work that way.

    What is the intent of having Cameras as an array?

    *edit* here is the workaround, you can get an idea of what I am needing to do
    Code (CSharp):
    1. for (int i = DebugRenders.Count - 1; i > -1; i--)
    2. {
    3. #if UNITY_EDITOR
    4.     int count = Application.isPlaying ? 2 : 1;
    5.     if (DebugRenders[i].RenderCount >= count)
    6.     //if (DebugRenders[i].RenderCount >= cameras.Length) //TODO cameras.Length always 1 ?
    7. #endif
    8.     {
    9.         DebugRenders[i].Release();
    10.         DebugRenders.RemoveAt(i);
    11.     }
    12. }
     
    Last edited: Jan 13, 2019
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,086
    Core unity does need this class as we call Render on it. We may be able to do something a little better here though.

    This is being added today :)
     
  8. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,086
    You can have more than one active camera. Think split screen or a 'video' camera in your game world that records to render texture.
     
    ReadyPlayGames likes this.
  9. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    611
    Very nice!
     
  10. Danua

    Danua

    Joined:
    Feb 20, 2015
    Posts:
    149
    @Tim-C, what's about that?
    #Feature requset:
    Allow for volumetric fog color(single scattering albedo) HDR values here
     
  11. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    84
    @Tim-C @phil_lira Is there an API for querying whether or not a given Shader is supported by the active RenderPipeline?

    There exists
    Shader.globalRenderPipeline
    for setting what the active SRP is, but I don't see any way to query if a Shader has the correct
    RenderPipeline
    Tag. It would be great if either
    ShaderData
    ,
    ShaderInfo
    , or
    ShaderUtil
    had some way of querying this for Editor tools.

    On a side note, it would be extremely beneficial if the Shader List dropdown in the Material Editor would hide unsupported Shaders by default. Our artists quite frequently complain about there being a lot of "garbage" created when selecting a Shader now, since so many of them are unsupported. It's a Quality of Life feature, for sure, but with an API I could script this type of behavior myself with a custom MaterialEditor.
     
  12. whidzee

    whidzee

    Joined:
    Nov 20, 2012
    Posts:
    46
    Is there an easy way to revert back to not using a scriptable render pipeline once you've converted to the HDRP? my project is coming along nicely however i found out that some tools i have no longer work in the HDRP and reverting back to not using any scriptable render pipeline will allow my tools to continue working.
     
  13. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    84
    Remove the pipeline asset from the Graphics Settings, modify all your Materials to no longer be HDRP and remove any special components.

    Or, if you're using version control, just revert back to a revision before HDRP was used.
     
  14. phil_lira

    phil_lira

    Unity Technologies

    Joined:
    Dec 17, 2014
    Posts:
    330
    We have this in our backlog but given the amount of things to wrap-up for getting out of preview this didn't get high priority.

    About the Shader api to check if shader is supported. What's your use case? Is it for filtering shaders in the editor dropdown?
     
  15. equalsequals

    equalsequals

    Joined:
    Sep 27, 2010
    Posts:
    84
    I was able to achieve the filtering with some heavy use of Reflection and a blacklist ScriptableObject. It's quite an elaborate and not exactly as futureproof as an official API though. ;)

    For this specific case yes, but I can see some additional use cases as well. If a ShaderGUI or Material Editor for an asset needs to change its behavior depending on the active SubShader per RenderPipeline.
     
  16. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,306
    Just a bit of well intentioned criticism about the HD and LW teams not communicating.

    There are semantic differences between hand written shaders in HD and LW which are really not necessary. This is making shader shader conversions from legacy to HD/LW harder than it should be. I guess it is too late to change that now, but in the future, can teams please communicate a bit more in order to keeps things standard? That would help us a lot. Thanks.
     
  17. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    147
    I've got a question about the possibility of drawing both color and depth output in a single pass and whether or not this is feasible with the scriptable render pipeline. Currently my application renders point cloud data, and it is desirable for the user to load quite high density data. This performs well, however there is a caveat.

    In order to improve the visual outcome to the user we also use a screen effect to show the depth differences between each point. This works well, but means we have to draw everything in two passes.

    In a shortened pseudo version:
    Code (csharp):
    1. Pass 1
    2. {
    3.     vertex shader
    4.     geometry shader
    5.     pixel shader
    6. }
    7.  
    8. Pass 2
    9. {
    10.     Tags { "LightMode" = "ShadowCaster" }
    11.     ColorMask 0
    12.  
    13.     vertex shader
    14.     geometry shader
    15.     pixel shader
    16. }
    Without the separate ShadowCaster pass the depth simply isn't output and never ends up in the image effect. The problem is this essentially results in drawing e.g. 6 million vertices instead of 3 million. Is this something that can be achieved with the scriptable render pipeline? I've tried to do some research but did not find much on the topic of combining color and depth output into one pass.
     
  18. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    145
    How to make Light.AddCommandBuffer work in HDRP?
     
  19. antey3064

    antey3064

    Joined:
    Mar 21, 2016
    Posts:
    8
    The last three weeks HDRP downloaded from GitHub does not work.
    I'm using unity 2019.1.0 b3. New project.
    I copy the hdsrp files downloaded from github to the "Packages" folder. All except
    Tools,
    TestProjects,
    com.unity.testing.srp.lightweight,
    com.unity.testframework.graphics,
    com.unity.render-pipelines.lightweight,

    How to fix this error?

    Packages\com.unity.render-pipelines.high-definition\Runtime\RenderPipeline\HDRenderPipelineAsset.cs(203,32): error CS0115: 'HDRenderPipelineAsset.terrainDetailLitShader': no suitable method found to override
    Packages\com.unity.render-pipelines.high-definition\Runtime\RenderPipeline\HDRenderPipelineAsset.cs(211,32): error CS0115: 'HDRenderPipelineAsset.terrainDetailGrassShader': no suitable method found to override
    Packages\com.unity.render-pipelines.high-definition\Runtime\RenderPipeline\HDRenderPipelineAsset.cs(219,32): error CS0115: 'HDRenderPipelineAsset.terrainDetailGrassBillboardShader': no suitable method found to override
    Packages\com.unity.visualeffectgraph\Editor\PackageInfo.cs(20,80): error CS0117: 'PackageInfo' does not contain a definition for 'GetAll'
     

    Attached Files:

  20. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    752
    2019.1 requires 5.x.x HDRP, github master is at 6.x.x and works only in 2019.2. You can grab 5.4.0 from github today and it will work on 2019.1 or if you want to try wip branch, get https://github.com/Unity-Technologies/ScriptableRenderPipeline/tree/release/2019.1 (but be aware this isn't always stable).
     
    antey3064 likes this.
  21. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    377
    Hi, you can't. HDRP don't use this mechanism, the lighting architecture is different.
     
  22. drcrck

    drcrck

    Joined:
    May 23, 2017
    Posts:
    145
    How to access shadowmaps in HDRP?