Luoshuang's GPULightmass

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