-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: wrong backward optical flow when set output_format to OPEN_EXR #684
Comments
Hey, thanks for this bug report. What an interesting bug. The reason is really weird, so if we check out the compositor settings right before the optical flow is rendered, we can see the forward and the backward settings and an additional node at the top. This node at the top is weird it shouldn't be there, as we are not interested in the colors in this particular render call. So, if I add some code to remove it: class _FlowRendererUtility():
@staticmethod
def output_vector_field(forward_flow: bool, backward_flow: bool, output_dir: str):
"""...."""
tree = bpy.context.scene.node_tree
links = tree.links
# remove the output composite node
output_node = tree.nodes.get("Composite")
if output_node:
tree.nodes.remove(output_node) The node vanishes, but blender still rendered this color image. I have no clue why. I assume that blender has to render this data to disc, and we can not turn it off. The best fix is to name this file something different so that there is no overwriting happening even if someone changes the output format.
This needs to be replaced with: (I have no clue why it even says here # this image is only rendered as blender provides no option to turn this off
temp_flow_name = "img_flow_temp_ignore_me_"
RendererUtility.render(temp_dir, temp_flow_name, None, load_keys=set()) @cornerfarmer Do you have an idea how to turn this off? Best, |
This was fixed. |
@themasterlink Hi, I have pulled the latest code but found that the backward flow is still wrong using the above code. |
You are right, somehow this was missed. Now it should be fixed. |
General Information
Which BlenderProc version are you using?
Blender 3.1.0
On which operating system are you?
Ubuntu 18.04
To Reproduce
Add one line code in "examples/advanced/optical_flow/main.py", before "bproc.renderer.render_optical_flow"
Correct:
Wrong:
Guess for the Reason
I observed that the logs show bwd_flow twice even under normal conditions. And in a wrong condiction (that is, set output format to OPEN_EXR), the second one will override the first one, which i guess is the reason why the bwd_flow gets wrong.
The text was updated successfully, but these errors were encountered: