state-of-the-art / BlendNet

Make your Blender distributed!
Apache License 2.0
101 stars 9 forks source link

[BUG] Render EXR is not multilayer and issues with preview the multilayer EXR render result #57

Closed rabits closed 4 years ago

rabits commented 4 years ago

Issue description:

For some reason BlendNet is not saving the render result as multilayer EXR file - it seems like the regular one layer EXR.

Environment:

Steps to reproduce:

  1. Run Blender
  2. Open test project
  3. Run manager on any provider
  4. Run image task
  5. Check the completed result exr

Expected behavior

Seems something is wrong with the save parameters, so it should use OPEN_EXR_MULTILAYER for sure

rabits commented 4 years ago

Hmmm, not sure how that's possible - but previously it worked just fine... Maybe I'm missing something...

rabits commented 4 years ago

Still don't understand how I can miss such an issue, seems it's a known one: https://developer.blender.org/T71087

Found workaround that should work - use write_still for render call.

rabits commented 4 years ago

Ok, it's working, but now the result image is not opening in preview in Addon:

INFO: Render status: , testproject-2009040819-32-VHY: COMPLETED
INFO: Render status: Got the final render! | Task render time: 1m17s, testproject-2009040819-32-VHY: COMPLETED
Error: can't process EXR multilayer file
IMB_ibImageFromMemory: unknown fileformat (/home/user/Work/state-of-the-art/BlendNet.wiki/blendnet-test-project-2.82-v0.2/out/testproject-200904081
9-32-VHY.exr)
Traceback (most recent call last):
  File "/home/user/.config/blender/2.83/scripts/addons/blendnet/__init__.py", line 1507, in render
    result.layers[0].load_from_file(update_render)
RuntimeError: Error: RE_layer_load_from_file: failed to load '/home/user/Work/state-of-the-art/BlendNet.wiki/blendnet-test-project-2.82-v0.2/out/te
stproject-2009040819-32-VHY.exr'
rabits commented 4 years ago

If there is multilayer I need to use just result.load_from_file to load result properly. But, new interesting issue:

warning, channel with no rect set View Layer.Debug Render Time.X
warning, channel with no rect set View Layer.Denoising Albedo.B
warning, channel with no rect set View Layer.Denoising Albedo.G
warning, channel with no rect set View Layer.Denoising Albedo.R
warning, channel with no rect set View Layer.Denoising Depth.Z
warning, channel with no rect set View Layer.Denoising Intensity.X
warning, channel with no rect set View Layer.Denoising Normal.X
warning, channel with no rect set View Layer.Denoising Normal.Y
warning, channel with no rect set View Layer.Denoising Normal.Z
warning, channel with no rect set View Layer.Denoising Shadowing.X
warning, channel with no rect set View Layer.Denoising Variance.B
warning, channel with no rect set View Layer.Denoising Variance.G
warning, channel with no rect set View Layer.Denoising Variance.R
warning, channel with no rect set View Layer.Noisy Image.A
warning, channel with no rect set View Layer.Noisy Image.B
warning, channel with no rect set View Layer.Noisy Image.G
warning, channel with no rect set View Layer.Noisy Image.R

So those layers are not loading into the Render Result image... Looks like the issue: https://developer.blender.org/T21410 , but actually not so critical:

rabits commented 4 years ago

33 is covering the issue just enough to close this one.

rabits commented 4 years ago

This issue, actually, affecting the agent render process - because if it's not completed (agent is going to be terminated or just stopped) there is no way to receive the render result - it will just be not saved.