3 posts / 0 new
Last post
ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
command to render a k3d file into a jpeg?

Hi,
I'm looking for a batch command to render a k3d file. This is to automate an animation.
I intend to use sed command to automate editing the k3d file, render it, and mail the result. The one thing I don't know how to do is the batch command to generate the image.
Suppose the file is called myscene.k3d, and I want to render it into myscene.jpg or any other image file, what is the command I should use?
FYI, I run fedora 13 Linux
Thanks a lot!!!

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
command to render a k3d file into a jpeg?

16pide:
The way I'd handle this is via Python scripting ... K-3D 0.8 includes a script, /share/k3d/scripts/shell/batch_render.py that could be modified to suit your needs. A simple (and untested) example would be to create a script "myscript.py" along the lines of
#python
import k3d
document = k3d.open_document(k3d.filesystem.native_path("/path/to/myscene.k3d"))
output = k3d.filesystem.native_path("/path/to/myscene.tiff")
camera = k3d.node.lookup_one(document, "Camera")
render_engine = k3d.node.lookup_one(document, "RenderMan Engine")
render_engine.render_camera_frame(camera, output, False)
and run it with
$ k3d --ui=none --script-file=/path/to/myscript.py --batch --exit
Cheers,
Tim

ForumImport
Offline
Last seen: 9 years 10 months ago
Joined: 09/22/2009 - 18:47
command to render a k3d file into a jpeg?

thanks, works perfectly!

Log in or register to post comments