NextFace icon indicating copy to clipboard operation
NextFace copied to clipboard

About smooth SH

Open 07hyx06 opened this issue 3 years ago • 1 comments
trafficstars

Hi! Thanks for your code. I have some questions about smoothing SH coeffs. I notice that during optimization there is no smoothSH operation because the default value of smooth is set to False in the toEnvMap function.

https://github.com/abdallahdib/NextFace/blob/b0b2ef461371db105ed64e67cc479ee8ea2674f9/pipeline.py#L124

https://github.com/abdallahdib/NextFace/blob/b0b2ef461371db105ed64e67cc479ee8ea2674f9/sphericalharmonics.py#L73

But after optimization, the SH can be smoothed as specified by smoothSH operation in optimConfig.ini:

https://github.com/abdallahdib/NextFace/blob/b0b2ef461371db105ed64e67cc479ee8ea2674f9/optimizer.py#L380

What about the results if smooth SH coeffs during optimization?

07hyx06 avatar Aug 12 '22 08:08 07hyx06

Hi, the main reason why the first three Sh coeffs are not smoothed during the optimization is to capture as much as possible of the higher frequencies of the incident light. Smoothing the SH is a kind of a low pass filter which may results in loosing some important frequencies, especially if the face is lit by strong light intensity. In case u are in a controlled light setup and ur light can be explained with lower bands u can in this case activate the smoothing during optimization. U can try with/without smoothing the SH during optimization and see if u can significant differents for ur images.

abdallahdib avatar Aug 14 '22 12:08 abdallahdib