Announcement

Collapse
No announcement yet.

New Sky/Atmosphere model in 4.24

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

  • replied
    tc22
    Tried last night. Won't install for me.

    Leave a comment:


  • replied
    anyone test 4.25?

    Leave a comment:


  • replied
    SebHillaire To be specific, I've narrowed it down to the one render command, r.SkyAtmosphere.AerialPerspective.StartDepth
    It seems values between 10 - 100 give a cleaner look (the look you see in my last images). If I put a value of 1, it gives the look I initially see (or if I close and reopen the project).
    I'm finding a value of 100 crushes a bit of the transition area between the light/dark side so I'm playing with values between 10 - 75 currently.

    I'll post more soon.

    Leave a comment:


  • replied
    GTJC Ok then. I am surprised the AP commands improves the result in this case.

    Z0DI4C.2.0 You do not have to use the sky dome shader with IsSkyTicked. That is only if you want to render a sky dome (with custom composition of clouds, planet and whatnot) as unlit opaque while not having the aerial perspective (atmosphere fog) apply on it again.

    Leave a comment:


  • replied
    SebHillaire thank you for adding it to the to-investigate list. I was overseas for work and am back now to continue my digging.
    It's apparent I have not played with many of the rendering commands in Unreal in general nor in relation to the Sky Atmosphere node.

    Playing with the r.SkyAtmosphere.AerialPerspective.StartDepth and r.SkyAtmosphere.SampleCountMax is cleaning up a bit of the noise, not completely gone but definitely cleaner:
    Click image for larger version

Name:	HighresScreenshot00031.png
Views:	536
Size:	396.7 KB
ID:	1727451

    Click image for larger version

Name:	HighresScreenshot00031_CU.jpg
Views:	525
Size:	87.5 KB
ID:	1727452

    I'll keep playing with the rendering values and settings and see how much I can clean up the atmosphere. Thank you for your feedback.

    Leave a comment:


  • replied
    Hi all, I have a noob question, do I have to use a skydome at all? Because for new Sun Sky plugin it seems like I don't have to (at least from visual perspective). I have volumetric clouds in the scene and I'm blending different cubemaps based on day time. I'm also planning to mix one extra cubemap for overcast. But if I had no specified cubemaps there would skybox be required for captured skylight?

    Leave a comment:


  • replied
    Thanks for the investigation and nice report. So if it still breaks without geometry then it is only due to the atmosphere tracing itself. I made sure it is on the to-investigate list.

    If you try again to reduce the radius of the planet then the atmosphere setup needs to be adapted (it does not scale automatically while preserving look):
    - proportionally reduce the atmosphere height
    - proportionally reduce the height distribution for Mie and Rayleigh
    - same for the absorption tent distribution altitude and width
    - scattering and absorption coefficient will need to be made inversely less high
    It might still look at bit different I believe because earth curvature will be different (especially at the light to shadow transition). I hope it can help you.

    If you do beauty shots from space, you might want to increase r.SkyAtmosphere.SampleCountMaxused when tracing the atmosphere (see the reference page for all the settings). I'll add details on rendering the atmosphere from space to the documentation for 4.25.

    Leave a comment:


  • replied
    SebHillaire and The Regurgitator

    I was hopeful to maintain perspective camera as opposed to orthographic. I'm interpreting an older work and thought it'd be cool if I could apply as much of a realistic setup as possible.

    I'm a Maya artist making the switch to Unreal (slowly). Currently with this short project my goal was to have the same animation/camera etc. setup up in both Maya and unreal so they are 1:1 in setup/scale. Then I was going to use Maya/Redshift as my guide for matching post process closer to my maya render.

    1. At first I tried a realistic earth/sun/moon scale/distance, then miniaturized it, which is what I posted on page 2 of this forum. Looking back it was clear the atmosphere with a ground radius of 100 looked very wrong.
    2. So, I rebuilt my scene to match the default ground radius in Unreal (which appears to be real world scale in centimeters). This is far more appealing.
    3. From there I stubbornly built the real world sun scale and distance (ignoring the fact that that is an absurd expectation of Unreal/Maya or any 3d package), but found the sun wasn't visible in viewport unless I selected it making it hard to artistically adjust bloom/flares/color etc.
    4. From that point I built a mini sun/closer to earth.
    5. The real moon distance and scale seems to work within the clipping planes of the camera so I kept it.

    With each of these steps I reanimated everything at the new scales/locations.

    6. I suppose, worst case scenario I could find a false moon distance at which the atmosphere works and find a new focal length. And then reanimate. But before I do this, I will dig a little.

    --- --- ---

    I tried playing with the atmosphere height and Mie/Rayleigh distribution (with meshes present under the atmosphere) with no luck.


    To test the theory that it's z-fighting the geometry below the atmosphere, I hid all geo and left only the initial directional light (the one tied to the atmosphere) and the sky atmosphere node.
    Looks like the atmosphere breakup still happens without any geometry present:
    Click image for larger version

Name:	HighresScreenshot00025.jpg
Views:	732
Size:	60.1 KB
ID:	1722850

    This likely isn't relevant to the cause of the breakup, but I tried it to see if it improved or not . . . it looks like the breakup changes dramatically depending on the AA. Again, not likely relevant.
    Click image for larger version

Name:	Atmosphere_AntiAliasing.gif
Views:	662
Size:	223.2 KB
ID:	1722851

    I will try playing with the atmosphere height and Mie/Rayleigh distribution settings with no meshes present next, but have to get ready for work and will try more tonight.

    Leave a comment:


  • replied
    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).

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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... ?

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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

    Leave a comment:

Working...
X