bake engine
bake engine
In the code of bakecpu/lightmap, when calculating the next ray, why does the sampling direction not need to be adjusted based on the sign of calculation result about dot(sampledDir, geometryN)?
Re: bake engine
Where exactly, do you mean the BSDF::Evaluate() ?
Re: bake engine
Here it is.
https://github.com/LuxCoreRender/LuxCor ... thread.cpp +279~285
Re: bake engine
Notice the:BruceXu wrote: ↑Mon Mar 29, 2021 12:59 pm Here it is.
https://github.com/LuxCoreRender/LuxCor ... thread.cpp +279~285
Code: Select all
const Vector sampledDir = bsdf.GetFrame().ToWorld(localSampledDir);
Re: bake engine
Dade wrote: ↑Mon Mar 29, 2021 1:27 pmNotice the:BruceXu wrote: ↑Mon Mar 29, 2021 12:59 pm Here it is.
https://github.com/LuxCoreRender/LuxCor ... thread.cpp +279~285
It works in local frame and, in the local frame, Z+ is always geometryN.Code: Select all
const Vector sampledDir = bsdf.GetFrame().ToWorld(localSampledDir);
I see, thank you.