Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

[FEATURE] Automatically save result in the user-defined output format #33

Closed
rabits opened this issue Jun 13, 2020 · 18 comments · Fixed by #60
Closed

[FEATURE] Automatically save result in the user-defined output format #33

rabits opened this issue Jun 13, 2020 · 18 comments · Fixed by #60
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rabits
Copy link
Member

rabits commented Jun 13, 2020

Is your feature request related to a problem? Please describe.

Users expecting the result in some specified format (png, jpg...), right now the user need to convert exr manually using blender.

Describe the solution you'd like

Probably it's possible to save the images if the output is set to supported image format, unfortunately I see no way to use some movie formats right now.

Affect to previous release

Users of 0.2 will be affected by this task, because instead of just storing the results as multilayer exr render files to user-defined format in the specified directory with the actual path.

@rabits rabits added the enhancement New feature or request label Jun 13, 2020
@rabits rabits added this to the v0.3.0 milestone Jun 13, 2020
@rabits rabits self-assigned this Sep 4, 2020
@rabits
Copy link
Member Author

rabits commented Sep 4, 2020

So here is the thing - the complete image should be processed by compositor... Probably it will be better to do on the Manager and prepare the composite result as a part of the task results. But also this could be done on the Addon side, which looks not so great idea, because the rendering automation should not require the Addon at all.

@rabits
Copy link
Member Author

rabits commented Sep 5, 2020

Now Manager processing the task rendered EXR image and move it through the compositing process of the original scene blend project. It replaces RenderLayer node with Image node, switching it to "View Layer", relinking the RenderLayer outputs to the render image and removes the RenderLayer to render only composition. After that the compose result placed to the required image format and available as result/compose.

@rabits
Copy link
Member Author

rabits commented Sep 5, 2020

Unfortunately if the compositing is disabled for the scene and the required format is set to exr multilayer (with some low quality settings) - there is no way to convert produced render exr (top quality settings) due to the blender bug with saving (https://developer.blender.org/T71087, related to #57). So for now it will be just copy of the rendered exr to the compose one.

@rabits
Copy link
Member Author

rabits commented Sep 6, 2020

Now the preview button operates with temp directory (which is removed with content when preview is closed). The results are downloading directly to the output path of the scene. When there is multiple tasks for the same frame - Addon uses the latest created task result to store the frame data.

@rabits
Copy link
Member Author

rabits commented Sep 6, 2020

Testing on the clouds with minimum of resources showed inconsistency in the merging process, need to figure out what's heppening there.

@rabits
Copy link
Member Author

rabits commented Sep 7, 2020

Bumped in some issues with the manager execution issues on aws, so had to rewrite the render merge process (now it's happening only when all the samples are received).

  • Also found some deadlock issues during loading the broken tasks, also fixed that.
  • Also added agents save/load for local provider - just easier to debug stuff this way:)
  • Also reworked the classes init way for Manager/Agents to use provider overrides on top of the BaseTaskExecutor and not provide the the raw configs inside.

@rabits
Copy link
Member Author

rabits commented Sep 7, 2020

The issue with AWS looks like related to delay in loading the blend file:

Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   DEBUG: Disabled stdout/stderr buffering
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Loading project file "test-project.blend"
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Checking existance of the dependencies
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Found an additional fluid cache file to upload: cache_fluid/config/config_0032.uni
...
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Found an additional fluid cache file to upload: cache_fluid_smoke_2/data/vel_0032.vdb
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Compose filepath: //out0032.png
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Reconnecting <bpy_struct, CompositorNodeRLayers("Render Layers")> links to render image
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   INFO: Removing <bpy_struct, CompositorNodeRLayers("Render Layers")>
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Blender 2.83.5 (hash c2b144df395f built 2020-08-19 06:05:02)
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   found bundled python: /srv/blender/2.83/python
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Read blend: test-project.blend
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Fra:32 Mem:41.96M (0.00M, Peak 41.96M) | Time:00:00.00 | Compositing
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Fra:32 Mem:41.96M (0.00M, Peak 41.96M) | Time:00:00.01 | Compositing | Determining resolution
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Fra:32 Mem:41.96M (0.00M, Peak 41.96M) | Time:00:00.01 | Compositing | Initializing execution
Sep 07 21:02:57 ip-172-31-20-196 blender[575]:   Fra:32 Mem:59.60M (0.00M, Peak 64.60M) | Time:00:00.04 | Compositing | Tile 1-15

That is leading to black screen instead of actual composed image (which is also weird, because at least the image should be rendered...)

@rabits
Copy link
Member Author

rabits commented Sep 7, 2020

Hmm, also in the cache not much big exr files - only previews... Maybe rendering is working not well.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Yeah, the agent is producing the weird 750KB black render scenes... But if I run the same process manually - it's fine 15M...

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Looks like it's not about the timings, this is a complete image here, not a part of it.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

And looks like it's not about not loaded blend file, seems it's just the way the process is running.

Was able to reproduce from the agent, will near down to a minimal implementation.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Seems the issue is not about the available memory.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Closely look into the render file I see it's the same as preview - means probably the settings are not changing back from the preview properly... Maybe they are just stuck and not allowing the agent to save the full exr file...

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Yep, that was it) And the black screen I've got only because the test-project composition don't use image output, which is only existing on the one-layer exr...

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Even with the fixed render images it's still black on composing output... Checking the logic.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Yep, there was an issue with providing the image path and blender can't load the render image for composing.

After that I run into the issue with OOM on the manager and this is quite bad for the BlendNet architecture. Created the new ticket for that: #65 . For the current v0.3.0 the current solution should be just enough.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Looks like the Manager is not moving error task away from the running loop. The next tasks are not going to be executed and stay in pending state, that should be fixed.

@rabits
Copy link
Member Author

rabits commented Sep 8, 2020

Ok, the test-project denoising compose node requires > 1GB, so resulting with OOM. Skipping this node (use just glare node in between works well). If the OOM happening it's producing task info (available from UI) with the proper message for the user to use the bigger Manager VM.

@rabits rabits closed this as completed in #60 Sep 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant