You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current PackedRFTracer implementation allows some control for bg_color to the RGB channel. We're missing this flexibility for additional channels (i.e. whose "clear color" may be random or some other non-zero value).
There are actually 3 entangled issues here that need to be addressed:
Allow to set the background value for any channel type, not just RGB.
The premultiplied alpha flag should be orthogonal to the bg color to avoid confusion, as i.e. Render Color Equation #143
Properly introduce neural fields with an env MLP that learns the bg color
The suggested fix is to extend BaseNeuralField with the concept of background functions one could register, similar to forward ones:
classBaseNeuralField:
def_register_bg_function(self, fn, channels):
"""Registers a background function. Args: fn (function): Function to register. channels (list of str): Channel output names. """ifisinstance(channels, str):
channels= [channels]
self._bg_functions[fn] =set(channels)
@abstractmethoddefregister_background_functions(self):
passclassNeuralRadianceField:
defregister_background_functions(self):
register_background_functions(self.bg_rgb, ["rgb"])
register_background_functions(self.bg_depth, ["depth"])
defbg_rgb(self, rays: Ray):
... # Return color according to bg param, or from some env decoderdefbg_depth(self, rays: Ray):
... # Return color according to far plane value == rays.dist_max
The tracer should now be agnostic to background color - and instead fetch it from the neural field per channel, similar to how foreground color is obtained.
The premultiplied alpha flag will remain within the tracer, as it determines how blending should take place.
The text was updated successfully, but these errors were encountered:
The current
PackedRFTracer
implementation allows some control forbg_color
to the RGB channel. We're missing this flexibility for additional channels (i.e. whose "clear color" may be random or some other non-zero value).There are actually 3 entangled issues here that need to be addressed:
The suggested fix is to extend BaseNeuralField with the concept of background functions one could register, similar to forward ones:
The tracer should now be agnostic to background color - and instead fetch it from the neural field per channel, similar to how foreground color is obtained.
The premultiplied alpha flag will remain within the tracer, as it determines how blending should take place.
The text was updated successfully, but these errors were encountered: