Skip to content
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

Feature Request: Continue Rendering #11

Open
philiplb opened this issue Dec 21, 2017 · 4 comments
Open

Feature Request: Continue Rendering #11

philiplb opened this issue Dec 21, 2017 · 4 comments

Comments

@philiplb
Copy link

Hi,
sometimes, I want to start a big render and pause it in between. Maybe for traveling. Or the computer shuts down (out of battery?)
So if a rendering gets stopped (unexpected), it would be awesome to just continue where it was.

@mikeycal
Copy link
Owner

This is actually a Blender limitation. Blender doesn't have a way to pause a video render. If Blender ever adds a pause render feature, I will try to add that functionality to the script.

Having said that, look into this post:
https://blender.stackexchange.com/questions/582/how-can-i-pause-a-render-in-progress-and-then-resume-it-at-a-later-time

While blender doesn't support pausing, you may be able to pause blender from running using operating system specific terminal commands.

@philiplb
Copy link
Author

philiplb commented Dec 21, 2017

Hi, thank you for your fast answer. :)
I have some time after NYE so I might try a little idea:

In your script, you control which frames to render. You spread them into N threads, one per core, and stitch the results together in one file afterwards.

This could be extended a bit into some slightly bigger concepts like this:

  • Divide the rendering into chunks
  • Initially, create N chunks, one per core
  • Spread out the chunks to worker threads
  • In each thread, keep track of the amount of rendered frames, persist this information to disk after each frame
  • If the programm gets restarted, see what's been done and what's left. Create again N chunks of work and resume
  • The result of each chunk is a rendered file
  • If no work is left, stitch all files together

I think this stuff I'm seeing here is the output of Blender:

Fra:143780 Mem:31.63M (0.00M, Peak 275.04M) | Time:00:00.13 | Sce: Ve:0 Fa:0 La:0
Fra:143780 Mem:31.63M (0.00M, Peak 275.04M) | Time:00:00.13 | Sce: Ve:0 Fa:0 La:0
Fra:337367 Mem:93.61M (0.00M, Peak 109.43M) | Time:00:00.60 | Sce: Ve:0 Fa:0 La:0
Fra:337367 Mem:93.61M (0.00M, Peak 109.43M) | Time:00:00.60 | Sce: Ve:0 Fa:0 La:0
Append frame 245944
Time: 00:01.32 (Saving: 00:01.28)

This could be easily captured and evaluated. So after each successfully rendered frame, a counter could be incremented in a local SQLite (because they do storing data fast better than I could).

What should be measured upfront a bit: How much of the total process time are spent then with the SQLite?

What should be evualeted upfront: Comes stitching with FFmpeg with a loss of quality?

There are several compromises which could/should be done: Don't store EACH frame in the SQLite. Maybe every 250 frames (made up). This would save DB performance and I think it is not desirable to stitch files each containing just one frame (worst case). Drawback: You might have to re-render up to 249 frames.

I would play around here with go as it might be faster accessing SQLite with it.
If this experiment is successful, I might release this on GitHub and I might write an UI for it. Cross platform would be possible, too.

Later, I can imagine a feature where you could re-render parts of the movie afterwards by giving a range of frames. Then you could render the credits again for example if you spot a typo.

@mikeycal
Copy link
Owner

This same process could be used to calculate render progress. If you are collecting the frame information, you can display how many frames have been processed.

The one downside to monitoring the render output is that it may cause a drop in performance a little.

Thanks for chiming in with your ideas, you have inspired me to think about additional features that would be helpful. :)

@philiplb
Copy link
Author

A progress indicator could be indeed usefull, yes. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants