Announcement

Collapse
No announcement yet.

New Sky/Atmosphere model in 4.24

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

  • replied
    Haven't tested in 4.24, but in 4.25 and 4.26 Sky Atmosphere fog is incorrect while in VR: the right eye is off when applying the aerial perspective volume (the sky itself looks correct).

    Leave a comment:


  • replied
    Originally posted by SebHillaire View Post
    Hello Alakuloinen ,
    A few answers:
    • Dark evenings: SkyAtmosphere can render beautiful evening with blue sky even when the sun is way below the horizon at sunset. Just make sure you have an exposure setup to see something. If it is too dark you can do the following: add a moon because on earth it is a high contributor at night. You can also use the more expensive (just a bit more) but more accurate multiple scattering evaluation by setting r.SkyAtmosphere.MultiScatteringLUT.HighQuality 1 (just noticed a name error in the documentation, we will fix).
    Has anyone had any luck with this? I have messed around with just about every setting on the sky atmosphere, the light and exposure but i still cant get anything but a black night sky. (need it to work realtime, not baked, and with time of day change)

    So far i can get around that with the old method of adding another skydome, hdri or whatever additional stuff i want, but it would be nice to not have to.


    Some posts also mentioned not having to use the height fog any more, as well? That the fog in the sky atmosphere could do all the same up close fog effects (light light rays and cones from nearby spot lights) but no luck there either. Increasing the mie scattering, like some suggested, just darkens everything.

    UPDATE: I have had good results by adding a second directional light to act as a moon light (with low brightness and low exposure values).
    Still no luck with the sky atmosphere as the only fog, but the height fog is working alright for now.
    Last edited by dc-null; 09-17-2020, 12:50 PM.

    Leave a comment:


  • replied
    Originally posted by SebHillaire View Post
    Yes agreed: I am not saying there is not a problem somewhere but all I am saying is that PI or 2PI is likely not it. (PI is usually a surface shading error, but yeah who knows everything is possible).
    Not claiming otherwise for sure. Not well-versed with the subject. It is just that difference is quite close to PI or SHAmbientFunction or w.e. which may or may not be a helpful hint.


    Originally posted by SebHillaire View Post
    So there must be a fundamental problem somewhere else. Maybe something like the skylight captures the height/volumetric-fog into the environment lighting representation that is then used to lit it self again on the main view via the diffuse spherical harmonics. The SkyAtmosphere contribution is separated from that: this contribution is from a atmosphere light scattering only value (so this way of doing things for an unshadowed participating medium should be more correct than the skylight feedback loop). And it is separated to avoid that specific feedback loop. So again investigation is required within the wide matrix of all the interactions.
    For the record, images were taken with skylight capturing sky without heightfog in all cases.


    It is just that my expectation from height fog with respect to atmosphere would be that inscattering from atmosphere would function more or less reliably without need for manually tweaking additive inscattering color, as well as not causing so noticeable transition to volumetric fog. At least to a point where it would work equivalent to using inscattering cubemap. Right now it is much darker.

    Leave a comment:


  • replied
    Yes agreed: I am not saying there is not a problem somewhere but all I am saying is that PI or 2PI is likely not it. (PI is usually a surface shading error, but yeah who knows everything is possible).

    So there must be a fundamental problem somewhere else. Maybe something like the skylight captures the height/volumetric-fog into the environment lighting representation that is then used to lit it self again on the main view via the diffuse spherical harmonics. The SkyAtmosphere contribution is separated from that: this contribution is from a atmosphere light scattering only value (so this way of doing things for an unshadowed participating medium should be more correct than the skylight feedback loop). And it is separated to avoid that specific feedback loop. So again investigation is required within the wide matrix of all the interactions.

    Thanks for those images, and I added all that in the long list of todos...

    Leave a comment:


  • replied
    Originally posted by SebHillaire View Post
    Deathrey
    So that 6.28 is a setup from the flat-earther!
    Beg your pardon, that would be a plane earther. Earth is a finite plane.


    Reference image.


    Comparison image:


    It is not coloration or lack of directional scattering that causes concerns, but darkening.

    Volumetric fog, when set to reasonable distance, fades out to height fog. Notice huge difference between two. That already cases issues visually.

    Check volumetric fog with inscattering override at defaults. Pitch black. How?
    And this is the main symptom I'm referring to. Difference between Height Fog and Volumetric Fog with Inscattering override. I'm positive that there should not be that much difference. Moreover, they seem to be different by exactly a Pi.

    That is 4.25.0, for reference.

    Leave a comment:


  • replied
    Deathrey
    Quick answer:

    I am not sure what is your expected appearance but heightfog one must be wrong anyway since it is done with simple height distribution and some fake lobe for the directional component and it does not feature multiple scattering. All these techniques (height fog, volumetric fog and SkyAtmospehre) have different ways to represent participating media, do the computation and different features (phase function lobes, altitude distribution, multiple-scattering) so brightness will change across them. Heightfog is a different participating media than the SkyAtmosphere on for instance, and it is flat not round, etc.

    HeightFog and VolumetricFog should however get closer because they represent the same flat participating media (although the volumetric fog can represent more from voxelised entities) but they still can look vastly different because a different directional lob (or phase function). Maybe something else is missing also, we are actively trying to test more interactions by adding more test to our test suite also (the interactions matrix is huge).

    So that 6.28 is a setup from the flat-earther!
    Last edited by SebHillaire; 07-16-2020, 02:09 AM.

    Leave a comment:


  • replied
    Originally posted by SebHillaire View Post

    Deathrey See this document: it has a height fog + SkyAtmosphere description. Height fog is an approximation so it will never match the complexity of the atmosphere Mie scattering itself with multiple scattering and self shadowing. Mie scattering is dynamic and can be changed from blueprint so this should not prevent you from using it dynamically. SingleLayerWater: yeah thanks for reporting! we have that already tracked on our side.
    Awww, thanks. Did not realize that contribution parameter is unclamped and can go beyond 1.

    Which brings me to a bit of a follow up:
    It is peculiar, that I achieved expected appearance at around 6.28 Sky contribution multiplier to the fog. Coincidence?

    Correct me, If am I wrong here, but my expectations would be that volumetric fog with large distance, when set to work with sky inscattering, should not look appreciably different from analytical fog.
    That is not the case, and they have significant difference in brightness. And this difference originates from sky inscattering.

    I'd also think, that even when volumetric fog is not set to override lights with inscattering, it still should not be vastly different in brightness.
    Interestingly, boosting sky inscattering for volumetric fog by 3.14, as well as scaling Sky contribution to fog by 6.28,
    makes all 3(Height Fog, Volumetric Fog with Sky Inscatter override and without it) look instantly correct under all sky conditions.


    Something is slightly off or is it me?

    Leave a comment:


  • replied
    Originally posted by SebHillaire View Post
    sh0day 4.26 will have those reduced even more. However we have not tested that extensively so any surprises might happen. If you find something broken, maybe scale your game assets up (but yeah I understand that is also not easy)
    That is awesome, thanks, looking forward to 4.26

    But as you mentioned, scaling everything up has its own problems and is not that easy..

    Leave a comment:


  • replied
    MostHost LA That will be fixed in 4.26.

    sh0day 4.26 will have those reduced even more. However we have not tested that extensively so any surprises might happen. If you find something broken, maybe scale your game assets up (but yeah I understand that is also not easy)

    Deathrey See this document: it has a height fog + SkyAtmosphere description. Height fog is an approximation so it will never match the complexity of the atmosphere Mie scattering itself with multiple scattering and self shadowing. Mie scattering is dynamic and can be changed from blueprint so this should not prevent you from using it dynamically. SingleLayerWater: yeah thanks for reporting! we have that already tracked on our side.

    Leave a comment:


  • replied
    SebHillaire Rawalanche So how is exponential height fog supposed to be used with atmosphere? In a typical foggy day case, I can't seem to get the result with height fog alone, as it appears to scatter a lot less than it should. Tweaking mie is not an option, for fog needs to be dynamic.

    Also, both fog and sky atmosphere are causing double fogging with single layer water rendering. This really needs curing.
    Last edited by Deathrey; 07-15-2020, 08:04 AM.

    Leave a comment:


  • replied
    @SebHillaire One question: I saw your change of min radius for planets and atmosphere (to 1km and 0.1km) in branch dev-rendering.. maybe it is possible to change radius to 0.1km or less ? I'm trying to do some very small Mario Galaxy type planets and would greatly appreciate using the SkyAtmosphere (and clouds) there as well

    Leave a comment:


  • replied
    SebHillaire

    Can you guys please make it so that the AthmosphericLightVector parameter is also available to the vertex side of things?

    [SM5] /Engine/Generated/Material.ush(2082,19-70): error X3017: 'MaterialExpressionAtmosphericLightVector': cannot implicitly convert from 'struct FMaterialVertexParameters' to 'struct FMaterialPixelParameters'

    I'm not sure why, but having to create an actor bp to keep a MPC updated just to make a sun flower kind of follow the sun is pretty tedious when the vector is already there for the pixel shader...

    Leave a comment:


  • replied
    Originally posted by Rawalanche View Post
    PS: When you wrote "for instance a dumb programmer like me", I hope that wasn't reference to something I've written.
    For what's it worth, for me it clearly sounded like a habit of self-sarcastic (or just modest?) person used to say things like "I did this, but this not perfect, sorry, I'm just dumb programmer clicking into things, artist would make it properly"

    Originally posted by Rawalanche View Post
    Now I feel that we're not in a territory of insufficiency of the model, but rather odd defaults. Perhaps they could be tweaked to get something better looking out of the box. To most people who are used to working with physically based sky models coming from other software, encountering one with pitch black color under horizon by default is quite jarring experience
    I see many questions on Reddit or Unreal Slacker how to handle such cases, so better defaults/documentation would definitely help many people. (just don't hide this in video live stream)​
    Last edited by Moth Doctor; 07-05-2020, 10:11 AM.

    Leave a comment:


  • replied
    SebHillaire Thanks, now I have better clue which parameters to look for. The renders with the water planes were actually not made by me. What I am worried most about is the suggestion to actually use some ground plane. That generally requires some giant geometry extending far away enough so that there's no visible gap between it and the super sharp transition between sky and black. That's also often more tricky if your scene is kind of "below sea level". What I just generally expect to be able to do is to employ just the sky atmosphere on its own, without need for additional geometry, and still get smooth gradient around the horizon so that the sharp transition is not so distracting.

    To better illustrate:
    If I start with the default sky atmosphere and have some terrain, everything is fine:Click image for larger version  Name:	Sky1.jpg Views:	0 Size:	307.0 KB ID:	1784307Unless I get to higher elevation, where I can see the horizon. Then, by default, I see this, not very nice:
    Click image for larger version  Name:	Sky2.jpg Views:	0 Size:	274.5 KB ID:	1784308 So the first suggestion I usually hear is "Add the ground". So fine, let's add a giant plane:
    Click image for larger version  Name:	Sky3.jpg Views:	0 Size:	227.2 KB ID:	1784309 Well, the horizon problem is solved now, but obviously I can't have the plane running through my level, so let's lower the plane:
    Click image for larger version  Name:	Sky4.jpg Views:	0 Size:	284.5 KB ID:	1784310 Then, when I lower the plane, the gap starts to show. I can obviously make plane excessively large but I am always worried about running into some sort of precision issue.

    That being said...

    Your explanation of the correct setup helped a lot. Now I am able to get pretty much what I need. I did not need to go nearly as high with the Mie Scattering scale, and I also touched the Mie scattering anisotropy to compensate down the increased glow around the sun disc caused by increasing scattering scale:
    Click image for larger version  Name:	Sky5.jpg Views:	0 Size:	201.2 KB ID:	1784311

    Now I feel that we're not in a territory of insufficiency of the model, but rather odd defaults. Perhaps they could be tweaked to get something better looking out of the box. To most people who are used to working with physically based sky models coming from other software, encountering one with pitch black color under horizon by default is quite jarring experience

    PS: When you wrote "for instance a dumb programmer like me", I hope that wasn't reference to something I've written. I hope I didn't write anything that even indirectly implied I consider you dumb. Quite the contrary. I've been crying for physically based sky model in Unreal for years, so I am really grateful we finally have one. I just tend to nag a lot as I want it to be the best one it can be, and it seems that is the case, apart from combination of my lack of understanding of it combined with perhaps questionable defaults
    Last edited by Rawalanche; 07-04-2020, 12:31 PM.

    Leave a comment:


  • replied
    presto423 Hello, not sure what you mean since the SkyAtmospehre component has an entire section called Atmosphere - Mie and I think tooltip were there in back 4.24. I could remember wrong though, sorry if they are missing
    Simply increasing the MieScattering Scale should increase the particles in the air and the impact should be easy to see. Please check this page for some visual exemples with sliders https://docs.unrealengine.com/en-US/...tmospheremodel.
    I hope this helps.

    Leave a comment:

Working...
X