facebookresearch / banmo

BANMo Building Animatable 3D Neural Models from Many Casual Videos
Other
539 stars 58 forks source link

Volume rendering #50

Closed s0rrymaker77777 closed 1 year ago

s0rrymaker77777 commented 1 year ago

Hi, thanks for your code. I want to ask the question about the calculation of sil_coarse in rendering.py https://github.com/facebookresearch/banmo/blob/c4498030aeca9b056e700892788025a80953cb5a/nnutils/rendering.py#L359 Why does it need to add [:, :-1] to weights while others do not? Thanks! https://github.com/facebookresearch/banmo/blob/c4498030aeca9b056e700892788025a80953cb5a/nnutils/rendering.py#L219

gengshan-y commented 1 year ago

Hi, this is because the last bin along the sampled ray between the near and far point is set to have infinite length (see here).

You may think about the last bin as the non-object space. When rending the object silhouette, we ignore the last bin. When rendering color, we could either consider the last bin as an ambient color, or ignore it as well.

s0rrymaker77777 commented 1 year ago

Thank you for the reply.