I have added the new option to build PhotonGI cache over an arbitrary animation time length (instead of the default camera shutter open/close time):
Code: Select all
path.photongi.photon.time.start = 0.0
path.photongi.photon.time.end = 1.0
path.photongi.persistent.file = cornell.pgi
The above properties will sample the time between [0.0, 1.0] and use an persistent file cache named "cornell.pgi".
The .scn file will look like:
Code: Select all
scene.camera.lookat = -2.78 -8. 2.73 -2.78 2. 2.73
scene.camera.fieldofview = 39.1463
scene.camera.shutteropen = 0.5
scene.camera.shutterclose = 0.5
scene.camera.motion.0.time = 0.0
scene.camera.motion.0.transformation = 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 -6.0 0.0 0.0 1.0
scene.camera.motion.1.time = 1.0
scene.camera.motion.1.transformation = 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 6.0 0.0 0.0 1.0
Defining camera animation from -6 X to 6 X.
I have added a new command line option to pyluxcoretools console to be able to overwrite camera shutter open/close time from command line (i.e. "-t <shutter open> <shutter close>").
And use this script to render a first test animation:
Code: Select all
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
# To avoid .pyc files
sys.dont_write_bytecode = True
# For the develop environment and Linux workaround for https://github.com/LuxCoreRender/LuxCore/issues/80
sys.path.append(".")
sys.path.append("./lib")
sys.path.append("./lib/pyluxcoretools.zip")
import pyluxcoretools.pyluxcoreconsole.cmd as consoleCmd
if __name__ == '__main__':
imageWidth = "512"
imageHeight = "512"
haltSpp = "256"
framesCount = 5 * 30
frameTime = 1.0 / framesCount
for frame in range(framesCount):
frameFileName = "frame{:03d}.png".format(frame)
print("Rendering frame: {}".format(frameFileName))
shutterOpen = frame * frameTime
shutterClose = shutterOpen + frameTime
cmdArgv = ["cornell-anum.py", "scenes/cornell/cornell-anim.cfg", \
"-D", "renderengine.type", "PATHOCL", \
"-D", "sampler.type", "SOBOL", \
"-w", imageWidth, \
"-e", imageHeight, \
"-D", "batch.haltspp", haltSpp, \
"-t", str(shutterOpen), str(shutterClose)]
consoleCmd.main(cmdArgv)
os.rename("denoised.png", frameFileName)
The resulting animation is:
https://drive.google.com/file/d/1fFW4Uu ... sp=sharing
Each frame is rendered using the same cache (and the same scene files) making the pre-processing time 0 and the rendering time is less than 1 second given the simplicity of the scene.
P.S. I'm investigating the strange color outside left and right wall.