ShichenLiu / SoftRas

Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"
MIT License
1.2k stars 156 forks source link

Question for flatten loss #83

Closed YanhaoZhang closed 3 years ago

YanhaoZhang commented 3 years ago

Thanks a lot for releasing the code. May I know the formulation of the flatten loss? I did not find it in your paper. Thanks a lot.

ShichenLiu commented 3 years ago

Hi, flatten loss is defined as the angle between each pair of triangles in the mesh. Specifically, for each edge i, let theta_i be the angle between its two associate triangles, the flatten loss is: sum_i (cos(theta_i) + 1)^2. By minimizing the flatten loss, the mesh are forced to be as "flatten" as possible.

YanhaoZhang commented 3 years ago

Thanks a lot for your prompt reply. :+1: