Open yejr0229 opened 2 months ago
You need to find in the code where you construct a BlendParams
instance, and set the value you want there. It may be explicit, or it may be defaulted somewhere. Can you paste the code where you call the renderer?
and the BlendParams:
To avoid modifying pytorch3d but change the background color, you can change the blend_params=BlendParams()
in your code to blend_params=BlendParams(background_color=(0.4,0.5,0.6))
or whatever.
EDIT: This isn't the real question.
The image that looks "wrong" seems to have the background color applied to the foreground. I wonder if there's a problem with the znear or zfar values: you want the object to be between them. You can add znear
and zfar
as float inputs to the shader, or use ones in the camera.
I want to change the background color of the rendering image form image1 to image2:
and I try to modify th parameters here:
But the results looks wrong: How to do it correctly?