kaolin-wisp
kaolin-wisp copied to clipboard
Support for unbounded scenes
Hi! Is there going to be support for handling unbounded scenes via background models with re-parameterized inputs in the near future? If not, would it be possible for you to provide some tips on how to best implement that?
Hi @Salarios77 , agreed that would indeed be a useful thing to have. We should implement that, but until we do, here is a quick workaround for you, which involves extending the current tracer with one that queries some background model:
-
Add a new
forward_bg()function to your neural field (BaseNeuralFieldsubclass). The implementation of this function should accept, i.e., a tensor of rays. -
Duplicate
PackedRFTracerto create a customized version of your own tracer. You can find it here. -
Remove these lines which delete the
raystensor, as you'll need it soon as input. -
These lines determine the blending with the background color. Instead of assuming a fixed color (i.e.
1.0 - alphais assumed to be multiplied with a "white" color here ), query theforward_bgfunction of yournefinstance for a predicted background color.