Epic's GPUlightmass

Finally figured out; glass objects cast shadow until ‘visible in raytracing’ is disabled in the static mesh editor. Disabling this in the glass material doesn’t have any effect.

1 Like

Sell 3 out of 4 of your cards, sit on the money, buy a 3080 or 3090 when they become more avalible, unless the 40 series is coming soon, but i doubt that.

Hey there,

I’ve been playing around with the plugin, and I’m amazed by the progress that is being made, GPU LM clearly is the future! :slight_smile:

There are a few questions that I don’t manage to find answers to on this forum… Hoping that someone around here can help:

  1. Where is the main development being done the next months? All in UE5? Also in UE4.27? Both branches?
  2. IES profiles only work for Stationary lights so far in 4.26.2. Any plans to add IES to Static Lights in the next release?
  3. Source Lenght for Point Lights is not yet implemented for Static Lights. Any plans to add those in the next release?
  4. Quality of Volumetric Lightmaps seems to be lagging (especially with higher densities). Any recomendations on how to work around this? Any plans to improve (the smoothing or quality) of volumetric light?

@Luoshuang When reading through the documentation I noticed it states that bounces are not configurable. I hope you will consider allowing for a zero-bounce stationary skylight when you ultimately go to implement them.

Having a zero-bounce skylight allows you to use the skylight baking primarily for skylight shadowing. This allows you to have very clean dynamic time-of-day lighting with lightmaps.

I made an example of this using CPU lightmass a while back;

For static scenes with dynamic time of day, this approach provides far superior results to relying on DFAO (the only other option outside of Lumen). Given how expensive Lumen is, it would be incredibly valuable to accommodate this type of setup with GPU Lightmass.

Gpu lightmass 4.27 all new lights and some existing ones do not contribute to the baked lighting. Is there a light limit still? Screenshot shows the baked on left and as dynamic lights on right.

Afaik, yes, there is a limit on number of lights in the scene

I know you said you have no control over the denoiser, so I can only hope that at some point you’ll just replace it.

Using a denoiser is obviously crucial to getting fast lighting builds, but I find that difficult to do with GPU LM because the results are routinely completely unusable. I have to believe it can be done better than this…

So… when there is no “sun light”, there is not “sky” lighting too? However, if it’s not zero-bounced, sky lighting will be present even with 0 “sun light”, that’s the idea? I’m curious now…

I would say yes that’s more or less correct.

Stationary lights bake down two things: Shadows and bounce lighting. Direct lighting is still dynamic. So you can change the intensity of a stationary light at runtime, but this doesn’t affect the bounce lighting so the skylight continues to glow as if it were daylight, even at night. By using a zero-bounce skylight, there’s no bounce lighting to bake down so you’re only using it for shadows.

Example:

The obvious question is well, why not just use a moveable skylight then? Well… because moveable skylights are unshadowed and DFAO is not a suitable replacement for skylight shadowing.

Essentially, if your project has a Day/Night cycle, you have three options when it comes to the skylight:

Moveable Skylight
:x:Unshadowed
:ballot_box_with_check: Provides proper darkness at night

Stationary Skylight with bounces
:ballot_box_with_check: Properly shadows interiors
:x:Bounce lighting causes exteriors to brightly glow at night

Zero Bounce Stationary Skylight
:ballot_box_with_check: Properly shadows interiors
:ballot_box_with_check: Provides proper darkness at night

Zero bounce skylight offers the best compromise by far…

3 Likes

Sounds like a bug that needs to be filed?

Which part of this is a bug?

Stationary skylight with bounces shouldn’t exteriors to brightly glow at night ?

That’s not a bug, it’s by design. Bounce lighting is baked, that’s the tradeoff you make when you use lightmass for bounces.

Could you make the same examples with zero bounce but with SSGI enabled? This seems like somewhat nice idea, and SSGI on top of it could provide nice local indirect illumination for the moving sun light.

1 Like

Not exactly the same scene setup, but close:

It is obviously more view dependent than Lumen, but still works quite well in my opinion.

Just for clarity since I forgot to write it in the screenshots: These are all using a movable directional light for the sun

I see!

I made my own tests, and it’s an interesting thing, no doubt. It only works with CPU lightmass; GPU Luoshuang’s lightmass don’t work too.

The main utility is to have the ability to modify Sky intensity in real time, so you can obtain totally 0 lighting on the scene (from the Sky), or make it quite visible.

Great work Arkiras! Should be an useful addon. Let’s hope @Luoshuang read you, or the Epic Team, and they can change it.

Ye, this works as nicely as I’d expect :slight_smile:

GPULM 4.27 strikes again:

Assertion failed: SizeX != -1 && SizeY != -1 [File:E:/UE4Source/UE-oculus-4270-release-1650/Engine/Source/Runtime/Engine/Private/ShadowMap.cpp] [Line: 619]

UE4Editor_Core!AssertFailedImplV() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:104]
UE4Editor_Core!FDebug::CheckVerifyFailedImpl() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Core\Private\Misc\AssertionMacros.cpp:461]
UE4Editor_Engine!FShadowMap2D::AllocateInstancedShadowMap() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Engine\Private\ShadowMap.cpp:619]
UE4Editor_GPULightmass!GPULightmass::FScene::ApplyFinishedLightmapsToWorld() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp:2769]
UE4Editor_GPULightmass!GPULightmass::FScene::BackgroundTick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\Scene\Scene.cpp:1739]
UE4Editor_GPULightmass!FGPULightmassModule::EditorTick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Plugins\Experimental\GPULightmass\Source\GPULightmass\Private\GPULightmassModule.cpp:95]
UE4Editor!FEngineLoop::Tick() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4922]
UE4Editor!GuardedMain() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Launch.cpp:178]
UE4Editor!GuardedMainWrapper() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!LaunchWindowsStartup() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:273]
UE4Editor!WinMain() [E:\UE4Source\UE-oculus-4270-release-1650\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:320]
UE4Editor!__scrt_common_main_seh() [D:\a01_work\26\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll

Any idea what it could be ? @Luoshuang

My GPU Lightmass bake has extremely dark terrain. Works fine on the static meshes around the level, but the terrain itself is very dark in comparison. Why? Seems like a bug. Also has random block box spots around for areas that seem to have not rendered. r.PathTracing.LightGridMaxCount 9999 fixes some of hte objects but not all.

Its not just terrain… other bugs in lighting bakes as well when comparing full bake vs bake what u see modes.

@Luoshuang Working on a new 4.27.2 project. Getting constant crashes with Hierarchical Static Meshes. Down on the manual webpage (limitations section) it says LODs are supported (Y). Should the HISMs work as well or is this not supported (yet)? Can’t find anything here or in the answerhub.

Edit: some details about a crash:
LoginId:1df701f44c75c8de2c7f4198cdc4c8f5
EpicAccountId:318bd546ef6e466b939f63f35437e69c
Assertion failed: SizeX != -1 && SizeY != -1 [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/ShadowMap.cpp] [Line: 619]

Edit2:

  • I did some more reading and found a post that HISMs dont work with static lighting.
  • also, due to the auto-instancing, these ‘old methods’ might not be useful anymore
  • I still think though I have used them with the Luoshuangs GPUlightmass plugin from a few years back. Cant be sure though
  • there’s no crashes anymore if - instead of HISMs - normal static meshes are created in blueprint. Wondering if there will be a big performance hit in VR