Hello!
I'm relatively new to LuxCoreRender (using the C++ API), and I noticed in the changelog for version 2.3 it says "BAKECPU now correctly includes the dot product of shading normal and light direction in light maps", does that mean we can use LuxCoreRender to bake directional lightmap information? If so, how does that work exactly? I already have the lightmap baking code set up, but I can't find any information on how you'd configure it to output light direction information. Ideally I'd want two outputs, one with the light intensity/color, the other with some kind of average or dominant light direction (similar to how it works in Unity), is that possible?
Thank you!
Baking directional lightmaps?
Re: Baking directional lightmaps?
Lightmaps are the incoming light in a point so it can be used, when combined with textures, to render a scene with OpenGL/WebGL/DirectX11/Vulkan/etc. You can even bake caustics: https://sketchfab.com/3d-models/luxcore ... bff3cffdec
The best place where to start is probably here: https://github.com/LuxCoreRender/LuxCor ... cenes/bake
You produce the bake maps with render-bake.cfg and you can test them with render-baked.cfg.
The comments here (https://github.com/LuxCoreRender/LuxCor ... r-bake.cfg) should explain a bit how it works.
BAKECPU is not currently supported by BlendLuxCore so it is not a very well known LuxCore feature.
The best place where to start is probably here: https://github.com/LuxCoreRender/LuxCor ... cenes/bake
You produce the bake maps with render-bake.cfg and you can test them with render-baked.cfg.
The comments here (https://github.com/LuxCoreRender/LuxCor ... r-bake.cfg) should explain a bit how it works.
BAKECPU is not currently supported by BlendLuxCore so it is not a very well known LuxCore feature.
Re: Baking directional lightmaps?
Thank you for the quick response!
The issue isn't the lightmap baking itself, it's the baking of light directions. This Unity article explains it pretty well (most modern Engines support directional lightmaps though):
https://docs.unity3d.com/Manual/Lightma ... ional.html
I.e. for every sample, in addition to the light color and intensity, you also need a direction vector representing the dominant light direction for that sample. This is an essential feature to create realistic lightmaps in modern Game Engines and Cycles has no support for it, so I was wondering if there is some way to do it with LuxCoreRender?
The issue isn't the lightmap baking itself, it's the baking of light directions. This Unity article explains it pretty well (most modern Engines support directional lightmaps though):
https://docs.unity3d.com/Manual/Lightma ... ional.html
I.e. for every sample, in addition to the light color and intensity, you also need a direction vector representing the dominant light direction for that sample. This is an essential feature to create realistic lightmaps in modern Game Engines and Cycles has no support for it, so I was wondering if there is some way to do it with LuxCoreRender?