Kai-46 / IRON

Inverse rendering by optimizing neural SDF and materials from photometric images
BSD 2-Clause "Simplified" License
299 stars 24 forks source link

Is this a bug in the GGX renderer? #24

Open Jarvisss opened 1 year ago

Jarvisss commented 1 year ago

In the Cook-Torrance BRDF f_specular = D * F * G / (4 * (n dot v) * (n dot l)), In the co-located setting, you assume v==l, so the equation should be f_specular = D * F * G / (4 * (n dot v) ** 2), right? but in your code implementation, https://github.com/Kai-46/IRON/blob/8e9a7c172542afd52b8e6ef28bc96ad52b5ffd5a/models/renderer_ggx.py#L69 it is f_specular = D * F * G / (4 * (n dot v), not f_specular = D * F * G / (4 * (n dot v) ** 2) Could you have a look at this? @Kai-46