Page MenuHome

Progressive render: use non-uniform sample chunks
Closed, ResolvedPublic

Description

Currently Flamenco uses uniform sample chunks, so if you want to have a result with only 1 sample, it has to create tasks for each individual sample. What we want is something like:

  • render with 1 sample
  • render with 9 additional samples to get 10 samples
  • render with 40 additional samples to get 50 samples
  • render wtih 50 additional samples to get 100 samples

and so on. It'll probably be okay to use some exponential distribution and pick the number of samples from that. So if the user requests 1000 samples in 5 chunks, use:

  • 1 sample
  • 6 samples
  • 32 samples
  • 178 samples
  • 1000 samples

Alternatively, a quadratic distribution would result in:

  • 1 sample
  • 63 samples
  • 251 samples
  • 563 samples
  • 1000 samples

@Andy Goralczyk (eyecandy), @venomgfx, which distribution (exponential or quadratic) would you prefer?

PS: this functionality is made possible by dr. @Sergey Sharybin (sergey)'s awesome work in rBc5dba54 and rBc44cdd5

Details

Type
Design

Event Timeline

For posterity: this is the way the exponential thingy is computed:

from math import log10

N = 1000  # nr of samples
C = 5  # nr of chunks

print([int(round(10 ** (log10(N) / (C-1) * i))) for i in range(C)])

Let me chime in with some unrequested suggestion :)

Provide the user with 2 settings:

  • Preview samples (number of samples used for the first chunk)
  • Progressive samples (samples for the remaining chunks)

In a single render at 300 samples this could be:

  • Preview samples: 10
  • Progressive samples: 30 (which will generate around 9 jobs)

Keeping the progressive samples on the low side would allow for better scheduling of high priority tasks in a busy farm.

It's now implemented as a sub-quadratic curve (power of 1.6666) with an artist-given maximum number of samples per task. As an example, 400 total samples with a maximum of 100 per task gives these render tasks (first number is "rendering and merging up to this sample count", and second number is samples in only that task):

 10   (   10 samples)
 49   (   39 samples)
133   (   84 samples)
222   (   89 samples)
311   (   89 samples)
400   (   89 samples)