Luoshuang's GPULightmass

So, I may be too fast with that solution, because I only tried it once on my project and I can’t say it will work always - or even just a second time - but fingers crossed. It’s quite simple: I’ve baked the whole project with the original CPU Lightmass once. The buggy shadows disappeared and after that, baking with 's GPU Lightmass delivered no more problems. (As I said: For now I only tried it once. But I’m quite happy and therefore writing that answer :nerd_face:)

The difference is that the GPU baker included at 4.26/4.27 has a bug where the volumetric lightmap probes ignore the backfaces and you get light leaking from other rooms onto dynamic objects even if your volumetric lightmap grid is dense enough to place probes inside walls.

Hello, I’m new on this forum I still don’t understand how to make a new post, so I have to make a reply…
With standard Lightmass I can choose how many bounces (from skylight and indirect) I need,
how to do the same with this plugin?
I’ve tried to change these same parameters in Lithmass Settings, but it does not change at all…
Many thanks!

Hello, I’m curious if anyone could help me figure out why my builds are failing on a specific map. I can compile other bigger maps, but this one map that doesn’t seem to be pushing the boundaries keeps failing during the build BVH stage. I’ve cleared and validated cache. I double checked my total lightmap memory use which is about 50-60% of other maps.

I get the following output from swarm:

12:30:43 PM: LogLightmass: Display: Lightmass Win64 started on: COMPUTER-1. Command-line: 284D85FD46C1B6F9FC8AADB979A48321
12:30:43 PM: Failed to determine engine directory: Defaulting to
12:30:43 PM: Failed to load ‘aqProf.dll’ (GetLastError=126)
12:30:43 PM: File ‘aqProf.dll’ does not exist
12:30:43 PM: Failed to load ‘VtuneApi.dll’ (GetLastError=126)
12:30:43 PM: File ‘VtuneApi.dll’ does not exist
12:30:43 PM: Failed to load ‘VtuneApi32e.dll’ (GetLastError=126)
12:30:43 PM: File ‘VtuneApi32e.dll’ does not exist
12:30:43 PM: Lightmass Win64 started on: COMPUTER-1. Command-line: 284D85FD46C1B6F9FC8AADB979A48321
12:30:43 PM: LogLightmass: Display: Processing scene GUID: 284D85FD46C1B6F9FC8AADB979A48321 with 14 threads
12:30:43 PM: Processing scene GUID: 284D85FD46C1B6F9FC8AADB979A48321 with 14 threads
12:30:43 PM: Building static lighting…
12:30:43 PM: [OpenConnection] Registering TCP channel …
12:30:43 PM: [OpenConnection] Connecting to agent …
12:30:43 PM: [TryOpenConnection] Testing the Agent
12:30:43 PM: [TryOpenConnection] Opening Connection to Agent
12:30:43 PM: [TryOpenConnection] Local Process ID is 708
12:30:43 PM: [Job] Found a parent connection for PID 708
12:30:43 PM: [Job] 6FF72C0E → 4B499305
12:30:43 PM: [Interface:TryOpenConnection] Local connection established
12:30:45 PM: Measured CPU frequency: 3.60 GHz
12:30:45 PM: FStaticLightingSystem started using GKDOPMaxTrisPerLeaf: 4
12:30:45 PM: Number of texture mappings: 5986
12:30:45 PM: Number of fluid mappings: 0
12:30:45 PM: Number of landscape mappings: 0
12:30:45 PM: Number of BSP mappings: 0
12:30:45 PM: Number of static mesh instance mappings: 5986
12:30:45 PM: Reserving memory for 5986 meshes, 5178598 vertices, 6795892 triangles
12:30:45 PM: Reserving memory for 0 meshes, 0 vertices, 0 triangles
12:30:49 PM: Scene surface area calculated at 2276.241 million units (89.073% of the estimated 2555.480 million units)
12:30:49 PM: Importance volume surface area calculated at 1732.928 million units (123.595% of the estimated 1402.099 million units)
12:30:50 PM: Embree Build 0.5s
12:30:50 PM:
12:30:50 PM:
12:30:50 PM: Collision Mesh Overview:
12:30:50 PM: Num Triangles : 6555490
12:30:50 PM: MeshInfos : 0.5Mb
12:30:50 PM: UVs : 38.2Mb
12:30:50 PM: LightmapUVs : 38.2Mb
12:30:50 PM: Embree Used Memory : 494.4Mb
12:30:50 PM:
12:30:50 PM:
12:30:54 PM: Processing…
12:30:59 PM: GPULightmass Kernel: Importing mesh: 5009817 vertices, 6048250 triangles
12:30:59 PM: Assertion failed: primitiveCount > 0, file , line 61
12:31:00 PM: [Job] Job has failed! Job executable didn’t exit cleanly. Exit code: -1073740791

Maps that build successfully report the same missing dll and failure to find engine directory. One thing that’s unique about this output I noticed is the surface area calculated looks a bit high at 89% and the importance volume area is at 123%. However other maps that compile use much more area but have a much higher total available and show a much lower percentage. Not sure what that means if anything.

Here’s the log from a map that builds successfully:

12:41:03 PM: Scene surface area calculated at 2869.551 million units (5.095% of the estimated 56325.316 million units)
12:41:03 PM: Importance volume surface area calculated at 2148.854 million units (32.419% of the estimated 6628.356 million units)

Any help would be greatly appreciated!

So got this to work in the silliest way. Asked an engineer to review the error on line 61 and suggest some changes in content to get around the error. I was told BVH is a process of sub-dividing the world into small pieces and error appears to be caused when the world is divided up one half happens to have 0 meshes/primitives. I fixed this by throwing a cube mesh outside of the level bounds on all 6 sides.

Her suggested fix is to add:

args.canCreateLeaf = [](RTCThreadLocalAllocator, const struct RTCBuildPrimitive*, size_t primitiveCount) { return primitiveCount > 0; };

On line 328 in EmbreeBVHBuilder.cpp

If anyone here regularly updates & compiles the binaries might be worth investigating.

1 Like

Having an issue with Multi-GPU where the two separate GPU tile pools don’t blend with each other. This is resulting in sharp seams on large surfaces like walls etc. Please advise if there is a work-around or setting that needs to change. Thanks! Love the tool!

I have something similar, it happens on all my machines when we build the light these strange “boxes” shadow shows up, all I can do is to delete the light that is the source of it and replace it with another static light, rebuild and pray for it not to show!

I really need to fix this, it delay my job many hours!




1 Like
  • I think your lights are way up there

it is not, it is below, besides, even if I place a light in the middle of the room, still happens

1 Like

I have the same problem. still i haven’t find a solution

You can clean the project, keep only conflictive meshes, confirm the problem persists, and share that cleaned up project, so people can make a try :wink:

Regards

Maybe you could send me the file because I want to try out the problematic scenario

can someone share loushoung’s GPUlightmass for version 4.27.2

7 Likes

can you compile for unreal engine 4.27.2??

3 Likes

Hi guys…please can someone share loushoung’s GPUlightmass for version 4.27.2…I am needing

2 Likes

Our savior is @ , remember his name for his great contribution :wink:

4 Likes

GPU Lightmass 4.27.2-release

Download binaries

Source code

22 Likes

thank you so much

2 Likes

Thank you

1 Like

Hello folks. Could you guys answer me a little question. I´ve been not working with Unreal for awhile. And I used to use gpu lightmass from in 4.24 version. But now I installed the 4.27 and I saw there is a native gpu lightmass. Howeverm, new version from the still here. I just wanna know why? I mean, is there any difference betweem them? Thanks