Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-03-30 16:55:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-03-30 17:02:27 +0300
commitf8b9f4e9bbc10675de9bbc3088f2841381e23f78 (patch)
treeb03a144fc66280350a72fc856c69ff59dfc763bb /intern/cycles/blender/blender_session.h
parentee364b63582c606977cc7dc54435d02fb9e1981c (diff)
Cycles: Resumable render implementation for Cycles
This feature is also known by the name Samples Offset, which allows artists to render animation with given amount of samples N, but then render more samples, starting from N and ending with M (where M > N) and merge renders together as if they rendered exactly M samples. Surely such effect could be achieved by changing Seed variable, but that has possible issues with correlation artifacts and requiring to manually deal with per render layer samples and such. While we can't support all possible renderfarm-related features in Cycles it's nice to support really commonly used stuff. Here's a command how to run Blender with the new feature enabled: blender -- --cycles-resumable-num-chunks 24 --cycles-resumable-current-chunk 2 This command will divide samples range in 24 parts and render range #2 (chunk number is 1-based). This feature might be changed a bit after we'll do some tests here in the studio with it.
Diffstat (limited to 'intern/cycles/blender/blender_session.h')
-rw-r--r--intern/cycles/blender/blender_session.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_session.h b/intern/cycles/blender/blender_session.h
index 8492d9f2c6b..66a6945cbc1 100644
--- a/intern/cycles/blender/blender_session.h
+++ b/intern/cycles/blender/blender_session.h
@@ -95,7 +95,6 @@ public:
void update_bake_progress();
bool background;
- static bool headless;
Session *session;
Scene *scene;
BlenderSync *sync;
@@ -120,6 +119,24 @@ public:
void *python_thread_state;
+ /* Global state which is common for all render sessions created from Blender.
+ * Usually denotes command line arguments.
+ */
+
+ /* Blender is running from the command line, no windows are shown and some
+ * extra render optimization is possible (possible to free draw-only data and
+ * so on.
+ */
+ static bool headless;
+
+ /* ** Resumable render ** */
+
+ /* Overall number of chunks in which the sample range is to be devided. */
+ static int num_resumable_chunks;
+
+ /* Current resumable chunk index to render. */
+ static int current_resumable_chunk;
+
protected:
void do_write_update_render_result(BL::RenderResult& b_rr,
BL::RenderLayer& b_rlay,
@@ -131,6 +148,9 @@ protected:
void builtin_image_info(const string &builtin_name, void *builtin_data, bool &is_float, int &width, int &height, int &depth, int &channels);
bool builtin_image_pixels(const string &builtin_name, void *builtin_data, unsigned char *pixels);
bool builtin_image_float_pixels(const string &builtin_name, void *builtin_data, float *pixels);
+
+ /* Update tile manager to reflect resumable render settings. */
+ void update_resumable_tile_manager(int num_samples);
};
CCL_NAMESPACE_END