yasaminjafarian / HDNet_TikTok

MIT License
335 stars 36 forks source link

Question about visualizing normal map #36

Closed zhan-xu closed 2 years ago

zhan-xu commented 2 years ago

Hi, thanks for the code. I have a question about getting normal map from *_normal_1/2/3.txt.

Based on readme, seems I can simply concatenate the *_normal_1/2/3.txt by the third axis. but I wonder why here, before converting to RGB, you have such conversion (first negative then scale z). Does it mean I have to do the same conversion if I want to use the normal map?

Thank you!

zhan-xu commented 2 years ago

I now understand about the scaling on z, because the output z is within [-1,0], and you want to map it to [0-255]. However, I am still not understand why reverse the signs of x and y but keep the sign of z. Thank you!