Hi Seb,
Just curious if you know of something I’m missing with the atmosphere of Earth rendering in front of the Moon?
Thank you,
John
Hi Seb,
Just curious if you know of something I’m missing with the atmosphere of Earth rendering in front of the Moon?
Thank you,
John
Hey Seb,
It seems like I can’t get SkyAtmosphere to respect the world geometry, it just renders the horizon line on top of everything:
Compare this to AtmosphericFog which smoothly cascades over the mountains (aside from the wonky colors):
Any ideas?
Thanks!
Jesse
@GTJC Sorry I missed it. It seems that there was a bug in the atmosphere composition shader for space view. I fixed it this morning and it will be available in 4.25. Thanks for your feedback!
(if you have source code and can build the editor locally, here is the CL you need to integrate https://github.com/EpicGames/UnrealEngine/commit/671d31e0a47e1489002300e64b6218e95cc3a651)
@jrapczak Not sure. It seems that this could be due to several things. Is it with all the default parameters? What is the scale of your world? Some guesses:
Ah, I’m sure it’s that parts of the world are below 0. Is the transform update something I can grab from git or Perforce in the mean time?
@jrapczak If you want it, I would recommend you should grab those CLs (in order of integration):
1- Transform CL https://github.com/EpicGames/UnrealEngine/commit/59bebaba30a59cfefdf603926f2f3f186ff625d5
2- Some renaming https://github.com/EpicGames/UnrealEngine/commit/7494cdf3e24de16db815b84af20df3eb90db078b
3- Some bug fixing https://github.com/EpicGames/UnrealEngine/commit/345d7bb36ad6e1d0c51c342a59795da3afb6d3f7
Note: I may have dome other work in between those CLs…
Cool just found those in P4. Thank you!!!
That fixed my issue, thanks again @SebHillaire!
Is it possible to get very dense fog (100m visibility) without the aid of another height fog?
Even at 700m, objects are still easily visible with mie scattering set to max. Which really doesn’t seem like enough for most games in my opinion, where environments are intentionally made more compact than real life
@Arkiras Hello
Yes this is possible to achieve dense height fog without that HeightFog component.See ExpxonentialHeightFog section from Sky Atmosphere Component in Unreal Engine | Unreal Engine 5.1 Documentation
I prefer to use the sky atmosphere as opposed tot he height fog: more consistent lighting. But it needs a bit of setup because by default this component is made for large scale participating media. This is what you should do:
Positioning will become easier when you also get the atmosphere transform in 4.25.
@SebHillaire Thank you so much, that setup worked great!
No worries. Awesome! I’ll wait for 4.25
When the Sky Atmosphere was added I came up with a quick test run project for it and I have more to do in Maya with asset building/animating that I can handle in the meantime.
It’s funny because it is now faster to make an atmosphere around a planet in UE4 then a DCC like Maya.
The whole sky setup is something I’m super pleased to see added to UE4. You guys are doing killer stuff with Unreal.
Thanks for the nice feedback! And that is good to know.
Please keep reporting issues and do not hesitate to share your results
Sorry to bother you but I have a couple more fog questions:
Thanks
What’s the proper way to shadow the directional light in a Sky material when it goes below the horizon? Looking at the sample material it doesn’t seem to handle that case. I have a lot of red clouds at night even when the light is on the other side of the planet. When adding the moon light in at 0.26 lux and adjusting the scene exposure accordingly, I have to turn off the sun light completely so the clouds in the sample material aren’t bright red.
You are correct: this is still on the todo list. I have also noticed that the transmittance LUT does not seem to go fully black for some reason.
Different option that needs to be looked at: add a sun/planet intersection code in that node or fix the transmittance LUT (to get the same result for free).
Hello @SebHillaire! Thank you for the work you’ve done!
I am spawning our game’s lighting setup from code and storing it’s components for updating as time of day progresses. I can spawn a SkyAtmosphere but since it’s SkyAtmosphereComponent is private i can’t access it without changing engine source. Could you please expose the component throught a getter as other actors do?
Thanks @ ! This will be available in 4.25
See https://github.com/EpicGames/UnrealEngine/commit/3d8954a49f50274736f365c4d296c83ee93a656d
Edit: Looks like my 1st issue appears without a SkyAtmosphere in the scene, at least when Raytracing is on.
Edit 2: Enabling Apply Pre-Exposure before writing to the scene color might have fixed it…
Edit 3: It didn’t completely fix it, but now it seems like my sun bloom might be working better. The yellow translucent thing comes back in my scene only at ~10.3 or so EV (I made a manual exposure control slider). I’m not sure why that is happening.
I am making an International Space Station sim using a real-scale Earth model from orbit to surface, with proper orbit, and sun + moon position. To maintain coordinate precision, I am “manually” rebasing my coordinates with the ISS at world origin and the Earth moving around it. To enable motion of the SkyAtmosphereComponent, I cherry-picked all of your commits in dev-rendering between December 16th and now.
I am having an issue now: yellow translucent flashes in rectangular portions of my viewport. The flashes get more frequent when I am closer to world origin and thus my ISS model, and when I increase viewport resolution. The flashes get less frequent when I cap FPS to 25, and stop when I cap it to 20. I think I have seen these flashes even without having the ISS in the scene.
I also have a yellow-ish subsurface material on the solar panels of the ISS, which may or may not be causing something.
I have an unlit translucent emissive material for clouds which uses a SkyAtmosphere material node for getting colored lighting.
From DefaultEngine.ini:
[/Script/Engine.RendererSettings]
r.DefaultFeature.AutoExposure=True
r.DefaultFeature.AmbientOcclusion=True
r.DefaultFeature.MotionBlur=True
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
r.UsePreExposure=False
r.SkinCache.CompileShaders=False
r.RayTracing=False
r.SkyAtmosphere.TransmittanceLUT.LightPerPixelTransmittance=True
r.SkyAtmosphere.FastSkyLUT=False
r.SkyAtmosphere.AerialPerspectiveLUT.FastApplyOnOpaque=False
What might be the cause of this, and how might I fix it? If I find the time, I might be able to get some video of it happening. I am trying with Raytracing on now to see if that is different.
2nd issue: When in the shade of the Earth, my ISS is usually lit in red light when it should be in shadow.
This is less important for me to fix quickly, and I can think of a few odd ideas like manual shadowing with an invisible cube, and changing lighting channels.
Thanks! Super Cool that you have been able to do that setup! I look forward to seeing such results
Flashes: please have a screenshot, video or even a single small project reproducing the issue with a small setup (that can download). That would be great. I’ll try to repro from your settings but I cannot promise anything. We have noticed notice flickering in another case but I have not been able to reproduce it so far…
Transmittance not being black: Yes that is the same issue as reported by @jrapczak above. I’ll try to look at it for 4.25.
Edit: Dang it, I just found the same flashing issue without a SkyAtmosphere in the scene. It was only for a fraction of a second, but it was there.
here is an assortment of screenshots from my project, showing the flashing problem: https://drive.google.com/open?id=1oF…APjBPEknX_AkVD
There are some extra glamour shots as well. The flashing is definitely limited to sunset/sunrise, somehow aligned with the light direction, related to the exposure, and possibly affected by screenspace reflections. If I find the time, I’ll put together a uproject that repros this issue.
I would get video, but for some reason recording on my laptop’s 4K screen does not show as an OBS input, and the issue doesn’t come up when the viewport is on my 1080p external monitor (probably a difference of resolution).
At 4K resolution with my setup (no shader functionality changes besides the cvar values above), I get around 5-6ms of SkyAtmosphere draw time in the GPU profiler (Razer Blade Advanced 2019, i7-9750H, 2080 Max Q). Any tips on how to reduce this with more cvar settings? Are there plans to optimize this shader significantly, and/or provide optimized defaults for the relevant cvars in the near future?
I’m also curious, is there any integration of the SkyAtmosphere stuff with the SkyLight component/actor?
I’m eventually hoping to use this for VR as well as flat screen. We have 2080ti’s in our VR workstations, but our users probably don’t. We have lots of material/shader optimization work ahead of us.