Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Feedback Physically Based Sky

Discussion in 'High Definition Render Pipeline' started by SebLazyWizard, Oct 23, 2019.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    817
    View from the other side:
    upload_2022-6-14_11-9-58.png
     
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    I'm encountering some weird "glittering" white lines coming from the Physically Based Sky. Basically they leak through a lightmapped solid enclosed room from certain angles. It's not from the SSR or some reflection probe.
     

    Attached Files:

    Last edited: Jun 16, 2022
  3. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    507
    The Sky is far from done.

    A. Star pattern when dark.
    B. At least a decent Sun texture representation.
    C. The Moon should rise after the Sun sets.
    C2. Ideally a proper moon system because the moon does not only come out in the night.
    D. A nice Ambient Lighting preset during "night".
     
    ftejada likes this.
  4. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    And to all this we must add many more things.

    The performance is the great weak point of PBS. But there are more issues that have been discussed in this thread before.

    It's a shame for years that it hasn't received any improvements... "really", not the last update that sets the number of rebounds at 3 instead of 8 and a few more things that practically don't really improve PBS.

    Regards
     
  5. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    817
    I don't know about the Moon. There are a lot of games where action happens on other planets with more than one moon or with none. But yes, there should be an easiear way to handle several celestial bodies.

    The main problem is that this sky is in the half-baked state with no further plans for improvement. Also It is not extensible, in any way, except modifying sources, which is always a bad idea. I could not write my own PBS, because we have no access to lightning and could not change light color depending on sun angle. Also we don't have an access to atmoshperic scattering or fog to make it consistent with a custom PBS. Lastly, we could not even provide custom scatterig tables to PBS. So we locked to use what was provided or fallback to 2010 tech using static skyboxes and doing other manual work.
     
    ftejada likes this.
  6. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    507
    Indeed, but let's cover the basics first, and then look at the many more things.
     
  7. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    sorry, but if you think that "The performance is the great weak point of PBS. But there are more issues that have been discussed in this thread before." They are not the most basic things, I think we are going wrong...

    I think currently one of the top priority things to fix on PBS is performance, atmospheric dispersion, and some things that have already been covered in this thread...
    If we have a PBS that doesn't offer realistic "in-light" results and performance is an issue, it can't be used for AAA... And HDRP is mostly focused on AAA. So PBS becomes a practically useless resource in most uses for AAA.

    Anyway... it's just my point of view.
    Cheers
     
  8. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    481

    Other than possibly the last one these aren't strictly the PBS itself or atmosphere that it also is a part of but celestials, its possible that it may be out of scope of the "sky"

    As a suggestion though, you can still achieve most of what you've asked.

    There's a slot starmap on PBS ( can use planets too)
    Alternatively you can add planet cookies if you have any atlas space.

    You can add a second Directional light for the moon ( with shadows unchecked).

    You can normalise movement between a starmap/sun/moon and sync it all in timeline.

    Hope that gives you some incentive to explore more components that pair up with PBS to see if it can fulfill your needs
     
    RevC2 and ftejada like this.
  9. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    215
    I released a new update for my improved PBS;
    https://gitlab.com/bad-bug-busters/...mmit/f561c7d4e0ac7adf502ed5881a5aa44209a1d207

    The spherical PBR fog got reworked and optimized.
    It now applies to the sky itself too, which helps to mimic better multiple scattering and reduces banding artifacts.

    screen_1920x1080_2022-06-27_12-16-30.jpg screen_1920x1080_2022-06-27_12-16-51.jpg
    The atmosphere within the planets shadow is no longer pitch black and still receives some light as it should.

    screen_1920x1080_2022-06-27_12-22-24.jpg screen_1920x1080_2022-06-27_12-22-50.jpg
    Banding artifacts (especially at low sun angles) are now greatly reduced.
     
    soleron, ftejada, m0nsky and 2 others like this.
  10. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    507

    Thanks a lot for the suggestions. I will give them a try.

    The thing is, I should not have to. ;) All other engines offer this as standard so that we do not have to waste our time building missing features on a half baked system.

    Being "out of scope" is not really a good reason for not providing something that should be part of the scope in the first place.

    If that was a good reason, maybe all we should have for sky is a slot with the color blue.

    There. Done :D Night was out of scope :D
     
    ftejada and HIBIKI_entertainment like this.
  11. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    481
    No problem at all, I'm happy to help where possible.


    Regarding scopes, I guess it all just depends on the scale you're looking at; global, macro, micro, that sort of thing.

    Tme is a big factor of this, and it begs the question of whether you want partial systems in place now that will grow, or wait for a complete solution down the line and have nothing in between.

    For the company large, regular and good feedback could provide insight into how resources could be better allocated.
    -Many smaller parts focused on a wide variety of tooling (macro/micro)
    -or just one big large step for some strategic benefit, like an acquisition or a complete solution (global)

    The latter is the most costly and resource-intensive, especially in time.


    I'm personally grateful I don't have to code the engine, am able to use it and have lots of different tools to work with, even if that means that the ceiling may not align with my expectations perfectly and may slow down my ideal workflow.

    When unforeseen issues arise in a project, it can be rough, but I guess that's just where talking about them and sharing ideas and solutions can help or inspire ideas on how to solve those pains.

    Just keep talking about it :)
     
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Keeping tabs on this. Would be fantastic to have some of the improvements suggested by seb.
     
    ftejada likes this.
  13. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    481
    I think almost all of sebs issue tracker posts have been addressed now, which was pleasingly fast in response either by design or in review stages for 2022

    One of the main changes was rejected by design I believe, hence sebs continued git efforts. Which is good to see something branch like that, offers choices. Definitely appreciate Seb and the teams input into it all in general.
     
  14. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,753
    This make me wondering would it be possible to separate the PBS sky though? this way maybe @SebLazyWizard sky can be installed as a custom sky inside vanilla HDRP?
     
  15. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    215
    I actually considered to make it into a custom sky, but since all functions to scatter/absorb light within an atmosphere are tightly bound to the PBSky's ID itself, I would loose access to those.
    That would skip all manipulations which the PBS does to directional lights and requires some hackery to get that functionality back in.

    I also would have to inject a custom type of spherical fog too.

    In the end it's much more work (well mostly workarounds) to "just" implement a custom PBS, so editing the HDRP source directly skips all that hassle.

    Extending HDRP beyond basic stuff isn't much fun.
     
    ftejada and iamarugin like this.
  16. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,753
    i see, if that's the case then yeah that's too much
     
  17. Jack_Martison

    Jack_Martison

    Joined:
    Jun 24, 2018
    Posts:
    40
    Hey, I kinda new to this, I would like to install all those fixes, do I need to compile the code from gitlab, or there's some kind of installing solution?
     
  18. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    215
    At first you have to move the hdrp package folder "com.unity.render-pipelines.high-definition" from "YourProject/Library/PackageCache/" to "YourProject/Packages/" in order to make it an editable package.
    Then simply overwrite the package files with the ones I uploaded to GitLab https://gitlab.com/bad-bug-busters/unity/improved-pbs/-/tree/main/HDRP Package Files
    That's it.

    I'm about to port it over to 2022.2 and HDRP 14 btw.
    Things like the flipped textures on the planet- and celestial bodies got finally fixed by Unity.
     
    ftejada, Jack_Martison and m0nsky like this.
  19. Jack_Martison

    Jack_Martison

    Joined:
    Jun 24, 2018
    Posts:
    40
    Oh thanks a lot. You're doing god's work, sometimes perfect feature consists of such unnoticed details (half-baked in this case).
    Hell, i'd even throw some bucks for such things in the future, just to compensate hours and frustration
     
    SebLazyWizard likes this.
  20. SebLazyWizard

    SebLazyWizard

    Joined:
    Jun 15, 2018
    Posts:
    215
    m0nsky and ftejada like this.
  21. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    365
    Night sky support and visual fidelity improvements were mentioned in the GDC 2023 roadmap talk.

    Would be great to see some list of changes/improvements that are planned.

    pbsrm1.jpg
     
    newguy123 and Ruchir like this.
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,753
    is the talk available online?
     
  23. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    365
    Yes -
     
    Ruchir, newguy123 and Reanimate_L like this.
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,753
    Oh it was unlisted, Thanks for that