pytorch3d icon indicating copy to clipboard operation
pytorch3d copied to clipboard

Pulsar render with background image

Open Kiord opened this issue 2 years ago • 0 comments

Hello thank you for this great library

I am trying to create a composite image with a render from Pulsar renderer and a background image. As far as I know such a feature is not implemented in the Pulsar renderer.

I tried to render the foreground object with 4 channels where the forth one is only ones. This way I get the 3 channels color plus an alpha color. However the gamma parameter does a blurring effect on both the color and the alpha.

When I interpolate the foreground color with the background image using the alpha, I do this :

composite = alpha * rendered_color + (1 - alpha) * background_image.

The problem is that the color is blurred with the background color (black) so it is darkened on the sides : image

Is there a way to get a perfect blending between a rendered set of spheres and a background image ?

Thank you for your help

EDIT : I need the blending to be differentiable

Kiord avatar Jul 06 '23 17:07 Kiord