|
Post by linuxdeveloper on Jan 21, 2021 20:14:11 GMT
I find it really nice to estimate the remaining render time when doing renders. Here is the code I wrote to do so in Python which prints in place the percent complete, remaining time and elapsed time. It tends to be pretty accurate:
def render(camera, world): image = canvas(camera.hsize, camera.vsize)
start = time.time() for y in range(camera.vsize): current = time.time() elapsed = round(current - start, 2) percent = round(y / camera.vsize * 100, 2) if y != 0: t = round((1 / (y / camera.vsize)) * elapsed - elapsed, 2) print("\r" + str(percent).rjust(5) + "% : " + str(t) + "s left : " + str(elapsed) + "s elapsed", end = " ", flush = True) for x in range(camera.hsize): ray = ray_for_pixel(camera, x, y) color = color_at(world, ray) write_pixel(image, x, y, color) print() return image Curious what other people have done in other languages?
|
|
|
Post by signal11 on Feb 3, 2021 5:45:54 GMT
for my c++ implementation, rendering work is disseminated among cpu-core number of threads, and have been approx. of the order of upto 1500ms or thereabouts (on a approx. decade old intel-i7, 8 cores @ 2.67ghz) for a 1280x1024 image. haven't had a need for doing this sort of estimation, yet... for example, just yesterday, i got the basics of chapter-11 i.e. reflection done, for attached image rendering stats look like this : benchmark details : {mean (ms): '01379', standard-deviation (ms): '00057'}
this is with perlin-noise (gradient-perlin-noise to be exact) for both the 'planet' and the 'watery-thingy' that you see Attachments:
|
|