Announcement

Collapse
No announcement yet.

New Sky/Atmosphere model in 4.24

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Thanks for sharing The Regurgitator ! Great results you get there!

    Planet shadow: I added that and it will be in 4.25 if QA does not find anything bad. https://github.com/EpicGames/UnrealE...a0571e194268eb.
    Only tested by me so far. ALso be careful since when per pixel transmittance is enabled, every triangle "inside the virtual planet" will be black (because it intersects with it and thus is in shadow).

    Flickering bug: yes this is the bug we already have registered but I have not been able to reproduce so far... Still in progress, stay tuned.

    Performance: space view as of today forces ray marching per pixel. This is because LUTs are optimized for ground view are less effective in space. So right now this is more expensive yes, especially at 4k. This is not a path we have used and tested a lot yet. So stay tune for future improvements.
    What I recommend you to try locally for your case since you still stay relatively close to the planet: do no force ray marching when out of the atmosphere (this can be done by increase the atmosphere radius for instance). See how it looks and increase the resolution of the transmittance, multiscattering, skyview and aerial perspective as needed. You might find a sweet spot that works for you.

    Comment


      #62
      SebHillaire Thanks for the update! I'll try out the transmittance shadow soon.

      I am now pretty much convinced that the flickering has something to do with specular (or possibly screen-space) reflection of the bright directional light in the scene.

      Comment


        #63
        SebHillaire Would it be possible to add an overwrite for the sun disc scale and visibility? Right now if I increase the source angle to get nice soft shadows with RT I end up with a giant sun.
        ArtStation - Portfolio

        Comment


          #64
          Originally posted by The_Distiller View Post
          SebHillaire Would it be possible to add an overwrite for the sun disc scale and visibility? Right now if I increase the source angle to get nice soft shadows with RT I end up with a giant sun.
          I think the point of physically based rendering and especially Ray Tracing is having shadows related to light source properties. So it just makes sense that softer shadows make sun bigger. Not saying you should not be able to do that if ever needed, but I don't think it belongs right in the main Sky Atmosphere UI as an instant "break accuracy" button. There could be some modifier but it should be hidden away more.
          https://www.artstation.com/artist/rawalanche

          Comment


            #65
            The UI already has a "Art Direction" tab, which would be a perfect fit.
            ArtStation - Portfolio

            Comment


              #66
              Originally posted by The_Distiller View Post
              The UI already has a "Art Direction" tab, which would be a perfect fit.
              Yes, I suppose that would actually make sense. I am just worried about new users who are not yet sure what they are doing. Controls like this exposed by default go into opposite direction of explaining new users the basics such as shadow softness being related to light source size.
              https://www.artstation.com/artist/rawalanche

              Comment


                #67
                The most important thing in my opinion is having a less blurry Sun disk, so controlling how sharp the Sun disk is shown makes a big difference.
                Nilson Lima
                Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                Join us at Discord: https://discord.gg/FUwTvzr

                UE4 Marketplace: Cloudscape Seasons
                supporting: Community FREE Ocean plugin

                Comment


                  #68
                  Originally posted by NilsonLima View Post
                  The most important thing in my opinion is having a less blurry Sun disk, so controlling how sharp the Sun disk is shown makes a big difference.
                  Two factors come into play. Scattering of light in the atmosphere and glow/glare from the optics capturing the image. Some earlier atmosphere models such as Mental Ray's physical sky did a big mistake of embedding the glare right into the sky model itself, not just atmopsheric scattering. But that does not seem to be the case here. Just turning of bloom in post processing settings displays the actual sharp sun disc. You will also be extremely surprised how tiny the sun disc really is. Generally, people tend to underestimate how small the sun disc without the glow actually is. That may in fact tie to The_Distiller 's request above, where he may have gotten giant sun disc mainly due to a glow.

                  Some examples:
                  Default new sky with default amount of bloom (no PP volume present in scene to override it):
                  Click image for larger version

Name:	DefBloom.jpg
Views:	450
Size:	144.8 KB
ID:	1714612 Default bloom disabled in project preferences:
                  Click image for larger version

Name:	NoBloom.jpg
Views:	411
Size:	144.6 KB
ID:	1714613
                  Convolution bloom for more close to reality result:
                  Click image for larger version

Name:	Convolution.jpg
Views:	411
Size:	151.8 KB
ID:	1714614
                  https://www.artstation.com/artist/rawalanche

                  Comment


                    #69
                    Rawalanche I totally agree. Also, some atmospheric effects depends highly on light physics at certain latitude/longitude. I have experimented some Sun effects to approach this picture, originally captured at Sweden on a very specific weather conditions and also during a certain season as follows: https://twitter.com/i/status/1134892762246144002
                    Nilson Lima
                    Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                    Join us at Discord: https://discord.gg/FUwTvzr

                    UE4 Marketplace: Cloudscape Seasons
                    supporting: Community FREE Ocean plugin

                    Comment


                      #70
                      Originally posted by NilsonLima View Post
                      Rawalanche I totally agree. Also, some atmospheric effects depends highly on light physics at certain latitude/longitude. I have experimented some Sun effects to approach this picture, originally captured at Sweden on a very specific weather conditions and also during a certain season as follows: https://twitter.com/i/status/1134892762246144002
                      That one would be beyond difficult It involves basically a simulation of caustics inside volumetric media. That would be tricky even for an offline renderer. You can see that when the sun disc goes out of frame, the whole thing stays in place, so it has nothing to do with the camera optics at all. It would be overkill to simulate such an advanced dependencies in Unreal's realtime renderer, so this would have to be faked somehow
                      https://www.artstation.com/artist/rawalanche

                      Comment


                        #71
                        Originally posted by SebHillaire View Post
                        Ok There was indeed a performance issue (only in editor, not visible in GPU perf capture so must be CPU, that is why timers might have been weird also).
                        Explanation: when enabling a SkyDome with a sky shader, we render in the background some editor text to warn artists when the sky dome is not covering/initializing the color buffer. This text is rendered using Canva and was costing more than expected for some reason (investigation will be conducted). The fix is in (not using the canvas) but it will only be available in 4.25 because it involves shader changes which are now prohibited in 4.24 updates.
                        However, the next 4.24 update will have a new command I have added to disable that text rendering pass: Use r.SkyAtmosphere.DebugText 0. That should help in the meantime.
                        Thanks for your report!

                        Planet: The decision was made to simulate telluric planets with a ground that cast shadow in the atmosphere (visual feature deemed important). That is why we have the ground radius for a virtual planet. Not a gaseous planet. Also, even if we add a color to the ground that will still create a sharp edge at the horizon (because you are close to the ground).
                        The goal was not to reproduce what the AtmosphericFog was doing because it has many issues, fudge factors and more (for instance the camera was forced high up in the air).

                        That being said, in 4.25 you will be able to transform the Atmosphere around the component and position the planet anywhere. Then you can use the current component properties to reduce its radius and increase the participating media density to simulate a gaseous planet bottom with smooth horizon. That should do what you want.
                        Thanks for the r.SkyAtmosphere.DebugText 0 --- fixed my issue in editor! Back to 120FPS.

                        teak
                        "A little bit of nonsense now and then is cherished by the wisest men..."
                        -- Willy Wonka

                        Smooth Zoom Camera Plugin for 4.24 here.

                        Comment


                          #72
                          Originally posted by SebHillaire View Post
                          Ok There was indeed a performance issue (only in editor, not visible in GPU perf capture so must be CPU, that is why timers might have been weird also).
                          Explanation: when enabling a SkyDome with a sky shader, we render in the background some editor text to warn artists when the sky dome is not covering/initializing the color buffer. This text is rendered using Canva and was costing more than expected for some reason (investigation will be conducted). The fix is in (not using the canvas) but it will only be available in 4.25 because it involves shader changes which are now prohibited in 4.24 updates.
                          However, the next 4.24 update will have a new command I have added to disable that text rendering pass: Use r.SkyAtmosphere.DebugText 0. That should help in the meantime.
                          Thanks for your report!

                          Planet: The decision was made to simulate telluric planets with a ground that cast shadow in the atmosphere (visual feature deemed important). That is why we have the ground radius for a virtual planet. Not a gaseous planet. Also, even if we add a color to the ground that will still create a sharp edge at the horizon (because you are close to the ground).
                          The goal was not to reproduce what the AtmosphericFog was doing because it has many issues, fudge factors and more (for instance the camera was forced high up in the air).

                          That being said, in 4.25 you will be able to transform the Atmosphere around the component and position the planet anywhere. Then you can use the current component properties to reduce its radius and increase the participating media density to simulate a gaseous planet bottom with smooth horizon. That should do what you want.
                          Just wondering, if it causes such a significant performance drop, shouldn't the debug text be set to 0 by default, so that all the people who use the new sky level template get proper performance out of the box? I mean it's a bit silly that if user selects one of the 3 level templates, he has to lurk forums to find an obscure cvar to fix it to get proper performance so he can start working on the level... ?
                          https://www.artstation.com/artist/rawalanche

                          Comment


                            #73
                            In my project, I'm placing the cine camera very far from Earth. The camera is moon distance in centimeters and I've cranked up the focal length.
                            The atmosphere looks fine up close, but at a long distance under a high focal length it begins breaking up.
                            Click image for larger version  Name:	HighresScreenshot00003.jpg Views:	0 Size:	124.4 KB ID:	1719971

                            Curious if there's a way to keep my camera distance and eliminate the noise/breakup of the atmosphere.
                            I'm also noticing the clouds are not visible at this distance.


                            Edit:
                            Here's a closer view
                            Click image for larger version  Name:	CloseAtmos.jpg Views:	0 Size:	28.0 KB ID:	1719972
                            Last edited by GTJC; 02-11-2020, 12:59 PM.

                            Comment


                              #74
                              Originally posted by GTJC View Post
                              In my project, I'm placing the cine camera very far from Earth. The camera is moon distance in centimeters and I've cranked up the focal length.
                              The atmosphere looks fine up close, but at a long distance under a high focal length it begins breaking up.
                              Click image for larger version Name:	HighresScreenshot00003.jpg Views:	0 Size:	124.4 KB ID:	1719971

                              Curious if there's a way to keep my camera distance and eliminate the noise/breakup of the atmosphere.
                              I'm also noticing the clouds are not visible at this distance.


                              Edit:
                              Here's a closer view
                              Click image for larger version Name:	CloseAtmos.jpg Views:	0 Size:	28.0 KB ID:	1719972
                              I've reproduced this; it appears the effect breaks down, possibly due to z-fighting with the surface below it, or possibly due to some other issue in the sampling.

                              Comment


                                #75
                                Rawalanche Yes I agree I was hesitating with that solution also. But the message is important (and only there when using a Sky material shader). I'll see if 4.24 can still take that.

                                GTJC Great scene As mentioned by The Regurgitator this is likely due to some imprecision when tracing and/or zfighting with you planet mesh. far camera + small fov can cause that and we have not invested time in such cases yet. Other solutions to try: use Ortho projection then distance to earth does not matter and will look very similar to your use case or increase the atmosphere height and Mie/Rayleigh distribution in the atmosphere (would look different but might be acceptable).

                                Comment

                                Working...
                                X