Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Feedback Wanted: High Definition Render Pipeline

Discussion in 'Graphics Experimental Previews' started by Tim-C, Sep 25, 2018.

  1. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    29
    Hello, I have couple questions. I'm trying to make a transmissive Curtain, it works great but it also seems to create artifacts in my mesh normals, also is there any reason why metalic channel is inactive in translucent type?




    It looks like that with this shader:


    Changing it to standard solves the problem completely, but then I'm unable to make a surface transmissive:


    Normal map masks the problem a bit but it still exist. I can't sleep cause of that :D
    2019.3.0a4 HDRP 6.9.0
     
    keeponshading likes this.
  2. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    382
    I would try to give all inputs.
    Don t know what happens but plug in an default normal (fast test) or the right one and calculate an Bent Normal for the curtain (Blender or Substance).
     
  3. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    382
    When you will get it totally perfect apply this shading network shown in the 2 videos in blender.
    Textures he provides for free.

    and hit bake.
    There are also 2 addons where you can directly bake textures from the PBR Standard Principled for HDRP or BuiltIn.
    e.g
    PBR Texture Bakery
    https://blendermarket.com/products/pbr-texture-bakery-for-cycles
    can bake you all pbr maps needed from the network above.
    But it s some work. See baking example of the icecube with stuff inside. You can open it on Sketchfab to see realtime transparent interaction . Great one.
    However done in a night and you can sleep well next because you have created the most photoreal one in Unity.

    Fast way when you dont need realtime interaction only an photorealistic look like in the video would be to bake full combined pass from your geo with the textures provided(it looks then like the video) and push it in Albedo. Bake AO seperate and push to AO.
     
    Last edited: Jul 14, 2019
  4. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    29
    @keeponshading I have already baked all the maps for the curtains, bent and normal also, I was just talking about specific scenario without them, normal helps but in low intensity values it's still visible. My question was why these artefacts happens to be in HDRP translucent shader. I thought that's caused by UV seam and baked lightmap, but it's not the case. Shader is just doing something to normals and I'm curious what and how to prevent it. Putting all the maps into inputs doesn't change that, also ticking different options.

    I'm already satisfied with the look of it, just wanna remove these little normal artifacts caused by the shader, whole model is just default smoothed-out without weighted normals.

     
    Waterlane likes this.
  5. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    458
    >is there any reason why metalic channel is inactive in translucent type?

    When object is translucent, we assume it is dieletric and don't store mettalic. It is to save space in GBuffer to store the translucent profile index. Agree that when doing some fabric you may want this kind of metallic aspect, thus why we have added the Fabric shader graph that allow to do that. Maybe you should give it a try.

    hope this help.
     
    Wawruch2 likes this.
  6. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    458
    Yes, currently shader compilation hurt a lot any shader graph work with HDRP. We are conscious of the issue.
     
  7. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    458
    Information: In 2019.3 we will deprecated the procedural sky. It will be provided as a sample that can be install with the packge. The motivation behind this is that Procedural sky was develop more than 8 years ago by an anonymous person and nobody know how it work anymore. Also this sky don't work with our physical light units system. We are removing it to not have to support it in the future in favor of a physically based sky based.

    Physically based sky will take a bit of time to be at the right quality. But it is where we are investing our effort. It work with the volumetric fog and have more coherent response.
     
  8. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,193
    I have a question about new physically based sky:

    - Is there any plan for making clouds for it?

    or alternatively, is there some recommended way users should implement their clouds when using this?
     
    BATTLEKOT, Gokcan, Ruberta and 2 others like this.
  9. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    433
    Please make clouds. Really ... what I mean to say is ... please don't require us to buy a day/night cycle from the Asset Store unless we want a _different_ day/night cycle than the one you build in that looks beautiful.

    Thanks. :)

    Also note my bias: I really just want HDRP to create small cartoons, so the easier it is to create pretty scenes, the happier I am :). I really only get paid to create stuff for hardware that is ... not ... going to be running HDRP anytime soon, heh.
     
    Ruberta likes this.
  10. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    485
    It wouldn't make a whole lot of sense to have clouds because there are so many different kinds of clouds, and they could be realistic or cartoony, and Unity should not make assumptions about what kind of clouds you want. Impossible to do it in a generic way. That said, it would be nice if the system were extendable and allowed for user-added texture layers so that people could add their own.
     
  11. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    That's the approach they are taking with it. You will also have to add your own Sun/Moon disk as an emissive mesh because the sky won't have any built-in.

     
  12. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    433
    Forgive me if I'm not remembering right, but doesn't Unreal have a built in sky? Given that HDRP is leaning so heavily towards realism (the procedural sky is even being redone to be more in sync with physical lighting, right?), why not have a realistic sky default that can be turned on/off or overridden? Obviously I'm a single person, and this isn't being built for me ... but it seems to me like having some form of day / night full sky system would benefit a lot of individuals / small teams ... which is why there are so many things like Time of Day on the asset store.

    For a lot of projects, having a properly working sky is good enough, even if its not customized exactly the way we want it. Maybe not AAA games that need to make millions, but not every career using Unity needs to do that!

    This just seems a little silly to me. Provide ways to override it ... that makes sense. Not to provide _any_ default sky though just makes your sky incomplete without having to do stuff to it ... which just means a higher point of entry to do a quick project using this.

    [Edit -- for some reason I thought you were a Dev!]
     
    Last edited: Jul 18, 2019
  13. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    433
    Assuming they stick with a semi-realistic approach, then no, its not impossible to do in a generic way. Its impossible to do it in a generic way that fits _every_ game, and maybe even impossible to do it in a generic way that will be used as the final sky in most large games that need to sell a lot of units. But ... I'm guessing a lot of games that have large teams modify shaders and do other changes as well ... that doesn't mean there shouldn't be an easy to use default.

    Its not impossible to do it in a generic way to give a "good enough" sky for smaller indie games, or prototyping, or products that don't need to be sold to the public and thus ... having the sky "just right" isn't such a huge deal.

    If this weren't useful to so many people, we wouldn't see all the generic time of day assets being sold. I'm not debating if any of them are used at launch in any games being sold ... maybe not? No idea? But that doesn't mean they don't have a _lot_ of use.

    With that said, I'm not going to be using HDRP to make a full blown game thats getting sold on Steam or wherever ... so I may be coming from a different perspective than Unity wants to build for. I work for a small company that makes educational games for public schools / colleges / etc, and I'm _hoping_ to someday be able to use HDRP for this. However ... the higher the point of entry, the less likely we will even attempt to pitch something with it.
     
    Last edited: Jul 18, 2019
  14. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,399
    Actually there is a branch on github called HDRP/pbr-sky-sun-disk

    I havent really looked at this branch, but it has been updated in recent days and I suspect the name is a strong clue.
     
  15. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    Oh yea, forgot I saw this popped up on GitHub thanks for pointing it out. It didn't have any info on the sun disk when i checked it out so my brain just went with what I previously saw about it.

    It's been stated from a while back that HDRP will have a full day and night cycle at some point, this starts with the Physical sky (clouds included) This is the just start of the Physical Sky

     
    DGordon likes this.
  16. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    433
    Awesome ... I completely missed that. Thanks!!
     
  17. Ruberta

    Ruberta

    Joined:
    Mar 5, 2019
    Posts:
    60
    I think if they gonna make it, it should be realistic cloud. Why? Because all things they focus on HDRP is seems to be realistic. From the physical camera to realistic light and shadow. Even the post processing likes exposure is work likes it based on realistic thing which really hard for me to adjust to get the proper result. (Compare to build-in and LWRP which light is easier to adjust)
     
  18. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,624
    Well, then hello Realtime GI. :D
    I hope they make a complete weather and lightning as well. Because it's about lightning and all... :p And moons too (multiple).
     
    Ruberta likes this.
  19. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    483
    Might be a weird question, but does anyone have an example of a planar reflection script for HDRP?

    Not the planar reflection probe, since i need access to an actual reflection camera gameobject (for post-processing needs).

    All attempts so far (like copying the BoatAttack example, seem to cause it to die when calling the reflection camera to render() because it's in a protected loop (to stop recursive rendering).

    Also, that preview pic of the new procedural sky looks great. I can totally get why you want to move away from the old one; the brightness levels for the sky and sun disc are kinda what, but if we're honest it served well enough from Unity 5 through 2017 as a decent baseline and background ambient / lighting, and as a replacement for the old Default Unity Skyboxes (aka my dead homies, RIP).
     
  20. Aiursrage2k

    Aiursrage2k

    Joined:
    Nov 1, 2009
    Posts:
    4,822
    Does the pipeline work on mobile? It looks so much better especially i think needed for AR realistic apps
     
  21. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    382
    Here some extended test of the

    ArchViz6 HDRP scene
    with future optimisation proposal.

    https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-6-released.536008/page-65#post-4763765

    Fontainebleau scales even more,
    but it was not an good test scenario in this case because of the PLM setup which does not
    implement todays possibilities in terms of GI baking.

    The resulting calculation times possible today,

    1x Titan RTX 00h32m07s
    1x Quadro RTX 6000 00h29m54s
    1x GeForce GTX 1080 00h52m17s


    and much faster possible variants after optimisation

    eg.
    2x Quadro 6000 RTX 00h15m00s
    4x GTX Titan V 00h09m00s

    by allowing maximum
    quality
    and
    framerate
    on the HDRP target hardware (including switch to VR) without compromise.

    Future additional DXR replacements for RT Reflections, RT AO, RT Shadows to improve accuracy... are welcome but quality and performance when disabled should be analog to the screenshot.


    Bakery_result_02_sh_2xGTX1080.JPG

    Bakery_result_sh_2xGTX1080.JPG


    This makes this also an candidate for an dynamic day\night calculations with ibl timelapses.


    2. Questions for HDRP
    • Is it possible to get some official support for lightmap streaming via virtual (granite) textures.
      to allow time of day switch\interpolation e.g. in ShaderGraph and HDRP Standard Shaders?
    • Is it possible to get some official multithreaded or other kind of probe data set interpolation for these day/night cycles pre-calculations?
    Target would be an more streamlined and faster switch from Lightmaps and Probes, similar to the Fontainebleau implementation, without switching scenes up to enable interpolation for these for an smooth transition of precalculated lighting scenarios.

    Today, based on informations we have,
    we see no possibility to wait for PLM to reach this speed and quality. Nor the potential.
    Due to the flexibilty of an Scriptable Render Pipeline and an Scriptable Build Pipeline
    we see currently also no possibility to further rely on the progress of the PLM and "Solution 2021".

    I addition this would finally allow to use custom lightmap and probe baking with todays standard ,best in class, path tracers
    like vray, octane, cycles.... which could be important towards risk management.
    In the case of cycles and bakery there are also no software licensing costs for large scale farming to precalculate GI which is standard in todays AAA gaming and industrial visualisation processes.

    So i hope you can see this as needed steps for todays requirements to create
    photorealistic and physical based scenarios by providing maximum performance and immersion
    with the HDRP.
     
    Last edited: Jul 19, 2019
    konsic likes this.
  22. darkydoodle

    darkydoodle

    Joined:
    Oct 27, 2018
    Posts:
    49
    I'm using the last hdrp master (7.1.1) with 2019.3.10 and I have a problem with shadows.

    I have a spot light throwing shadows. It's position is 250y. the ground is around 0y. All objects with y < 2 begin to lose their shadows (no shadow at all when y < 1). And this with the shadowmap near plane at the maximum (10). Less than that and I have very fast no shadows at all.
    First, I thought it could come from the y position of the light. And yes, if I put 100y, for example, I have my shadows back, except they begin far from any object touching the ground, like if it was flying. Playing with the parameters doesn't fix it, it can just make it worse (bias, etc...).
    I don't know if there was a kind of shadow optimization and maybe my case is special (I use the spot light as a sun for a "civ-live" world map) but it's clearly not usable for me in its new state.

    Note that previously (with 2019.3.7 and a previous hdrp master around 7) everything worked well.
     
  23. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    57
    Hi there! I have volumetric fog in my scene. It looks like a bug inside the building. upload_2019-7-24_2-43-28.png
    Is there a way to make it be affected by global illumination? Or maybe I can exclude it from the building?
     
  24. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    485
    Have you tried using separate volumes, one where there is fog, no fog in the other?
     
  25. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    57
    I know this cheaty solution. If I watch through the window and go into the volume I'll see the fog disappearing from the whole scene, not only indoors. Same with building full of bright fog, when I look from the outdoors. So I think this is the bad way fixing this problem :)
     
  26. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    483
    Late response, I know...
    BUT
    The same thing happens with SSR reflections, and to a extent even SSAO.

    It's because as it's processing a pixel near the edge of the screen, it's less and less sure about its surroundings (what to reflect, refract, bounce light off, etc); there might be things a pixel out of view that, when the camera rotates, causes some drastic change, flickering, or whatever.

    Screen space reflection has an option called Screen Edge Fade Distance to control this; you can push the SSR right to the edge if you accept the problems with that. Try messing with the screen weight distance in your render settings volume profile.

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/Reflection-and-Refraction


    Create > GameObject > Rendering > Density Volume.

    From there, make the fox influence box the size of the interior, and lower the density. to near-0. you can adjust the extents so that it's not a straight sharp cut-off and is a bit smooth.

    What way, it should look good from outside, inside and going in/out.
     
  27. MihaPro_CarX

    MihaPro_CarX

    Joined:
    Apr 5, 2017
    Posts:
    10
    Hello,

    DebugMenu is built into HDRP 5.16.1. We found that it remains even in the release build. Players may accidentally call it. How can DebugMenu be excluded from a release build for publishing a game?
     
  28. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    572
    You can disable it on the HDPipeline Asset
     
  29. MihaPro_CarX

    MihaPro_CarX

    Joined:
    Apr 5, 2017
    Posts:
    10
    Could you post a screenshot with this setting and specify which version of Render Pipeline?
     
  30. MihaPro_CarX

    MihaPro_CarX

    Joined:
    Apr 5, 2017
    Posts:
    10
    This settings don't exclude DebugMenu from build: upload_2019-7-24_11-40-32.png
     
  31. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    57
    upload_2019-7-24_12-53-31.png
    I can't find the Density parameter. Only For Distande that makes the volume more dence the lower the value and can be set to min 1. And highering the value doesn't work :-( I think the density excludion feature is not provided.

    I'm using HDRP 5.16.1
     
    Last edited: Jul 24, 2019
    konsic likes this.
  32. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    57
    Maybe there is a place for feature request? :)
     
  33. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    925
    How is the Vegetation support going on regarding HDRP !?

    Any support yet for eventually :

    1. Manual / Procedural placement of trees,vegetation, detail meshes ?
    2. Or any way of placing trees, vegetation and detailed meshes yet ?
    3. Instanced Indirect rendering ?

    I lagged behind the development of HDRP and am not aware of how this is going and i know it was not possible some time ago !

    Thank You !
     
  34. Ruberta

    Ruberta

    Joined:
    Mar 5, 2019
    Posts:
    60
    How about wind node that actually work with Unity Wind Zone for shader graph in HDRP? That's very useful.
     
    sqallpl likes this.
  35. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    835
    What are light probes new features which will come in 2019.2 ?
     
  36. Jovssen

    Jovssen

    Joined:
    Jun 3, 2016
    Posts:
    31
    I know it has to fade and why, but the sky color is 99% of the time the wrong thing to fade to. Why not fade to the opaque buffer? Fading to the sky color is only acceptable when the sky or extreme sky-colored fog is directly behind the pixel, but there is a way to know what is behind the pixel, sky or not, and we already have it, the opaque rendertexture...?

    Considering refraction is already using that buffer, an alternative that would still be better than the way it currently is, would be to fade the refraction strength/distance, blur amount, and tint, so that at the very edge, it would sample directly under the pixel with no blur. That would need 1 less texture sample.
     
    Last edited: Jul 25, 2019
    id0 likes this.
  37. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    57
    Do you know is there aboloty to get Parallax Occlusion on the terrain?
     
  38. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    397
    Oh wow :p

    On another note, what is the plan for wind animations for folliage and trees? It's been months since SpeedTree basically said: "well we're waiting for HDRP to be final"... so now we are kind of stuck with static, non-moving trees.
     
    sqallpl likes this.
  39. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    71
    There is basically a revised version of the HDRP wind shader, ported to shadergraph and the volume system in the Fountainebleu repo https://github.com/Unity-Technologies/FontainebleauDemo
    It's great!
     
    Ruberta likes this.
  40. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    29
    Just wanted to say that it's solved in 7.0 HDRP.

    There's existing bug with reflection probes, turning on ambient occlusion in Scene Profile gives NaNs propagation artifacts even with postprocessing being turned off for them while baking. Turning off ambient occlusion solves the problem.


     
    keeponshading likes this.
  41. Jovssen

    Jovssen

    Joined:
    Jun 3, 2016
    Posts:
    31
    Triplanar with parallax mapping is awful, I'm sure it can be done better?
     
  42. Jovssen

    Jovssen

    Joined:
    Jun 3, 2016
    Posts:
    31
    I can't seem to get outward parallax mapping, shouldn't 0 to 1 in the texture equal -1 to 1 in displacement?
     
  43. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    485
    I don't think the parallax effect cannot extend beyond the extents of the mesh, so that is probably why it only goes inward. Still, it would be nice to be able to bias the effect so it has the appearance of going outward.
     
  44. Jovssen

    Jovssen

    Joined:
    Jun 3, 2016
    Posts:
    31
    It can't, no, but it doesn't look perfect as it is now anyways at shallow angles, which is where outward would also suffer.
    With strong displacement, it just looks like the material has a glass refractive surface on top, because when I move around and change the angle, it shifts around kinda "self contained"-like, which is not what I want.

    From:
    https://catlikecoding.com/unity/tutorials/rendering/part-20/

    "Lows area now remain in place, while high areas get pulled upwards. The standard shader offsets this effect, so low areas move downward as well, while areas in the middle remain where they are. This is done by subtracting ½ from the raw height data.

    float height = tex2D(_ParallaxMap, i.uv.xy).g;
    height -= 0.5;
    height *= _ParallaxStrength;"
     
  45. Tiddan

    Tiddan

    Joined:
    Dec 10, 2015
    Posts:
    5
    Can anyone help me find a way to render a world-space UI on top of the main camera pretty much like in this tutorial from Reddit:

    https://www.reddit.com/r/Unity3D/comments/chn25q/tried_to_recreate_the_look_and_feel_from_metroid/

    I'm currently on Unity 2019.1 but considering updating to 2019.2 if that's any help. Ideally the UI would use it's own set of post-processing but I can also work with the UI not having any kind of post-processing I guess.

    The problems they way I see it is:

    1. I can't use a separate Camera and render to a RenderTexture as "FinalPass.shader" overrides alpha to 1.0. This I found out from this post: https://issuetracker.unity3d.com/is...ble-is-ignored-when-using-hdrp-5-dot-10-dot-0

    2. From what I've read and tried you cannot use stacked cameras in HDRP. Also if I really wanted to do post-processing on the UI that would probably affect the entire image anyways.

    3. I cannot render the canvas with the main camera as I use post-processing like motion blur and DOF. This does not work well with the UI at all. Also I want to UI to stay on top always so this is probably never a good approach anyways.

    4. I don't think I can use CommandBuffer's as they don't work with Canvas but only meshes (or am I missing something). I guess if I could render the Canvas after Post-processing just at the very end then I'd be happy.

    This is driving me nuts. Can anybody please guide me in the right direction? Thanks.
     
  46. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    397
    Have you tried Curved UI from the Asset Store ? (Not sure if that works with HDRP)

    I just tested this, and it works:
    • Create a second camera
    • Create a screen space canvas of type "Screen Space Camera"
    • Set your camera to perspective
    • Adjust the FOV so that you UI stretches on the edges.
    If the effect isn't appropriate, I'd try adding a fish eye post processing on that UI camera so that it looks more like your Reddit link.
     
  47. Tiddan

    Tiddan

    Joined:
    Dec 10, 2015
    Posts:
    5
    It "almost" works. I forgot to mention the problem is when the main camera has post-processing. Then when the second camera is turned on then the post-processing from main camera is gone.



    As for Curved UI. Yes the problem is the same.
     
  48. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    397
    Looks like you are right, I'm losing all PP effects upon adding a second camera, even if I disable Post Processing on that one.

    Just checked what they do in the FPS sample to render the weapons, I'd suggest taking a look at it. Maybe you could make a custom world space UI shader that is not affected by post processing? And that is rendered with a different FOV or fish eye? That'll take a bit of work to setup but once done you could easily sell that on the store ;)
     
  49. Dreamback

    Dreamback

    Joined:
    Jul 29, 2016
    Posts:
    166
    I have a request: HDRenderPipeline.cs used to call RenderPipelineManager.endCameraRendering after customRender functions; it no longer does. We need that, in our use case we use endCameraRendering to call a replacement for the old OnRenderImage on special camera scripts, and some of our cameras use custom RenderPipeline scripts.
     
  50. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    71
    I wanted to ask how shadergraph shaders are handled regarding compilation of variants and what I else I can do to reduce them? We had to cancel all our last build attempts as they take literally forever... (more than 4 days on a 12 core threadripper). We already only have the settings active for the features we need (only deferred, only one lightmapping and fog mode).
     
    fherbst likes this.