Beispiel #1
0
    if len(sys.argv) > 2:
        src = sys.argv[1]
        out_image = sys.argv[2]
    else:
        src = 'c:/work/scenes/vray/test/cubes.vrscene'
        out_image = 'c:/work/images/test.png'

    sdk.enableFrameBuffer(True)

    print "Render {0} -> {1}".format(src, out_image)

    r = Renderer(renderMode='production')
    r.load(src)

    r.setOnBucketReady(onBucketReady)
    r.setOnImageReady(onImageReady)
    r.setOnDumpMessage(onDumpMessage)

    r.outputImage = out_image

    res = r.resolution
    res[0] = int(res[0] / 10)
    res[1] = int(res[1] / 10)

    r.resolution = res

    r.start()
    r.waitForImageReady()
    r.stop()
    # r.close()
Beispiel #2
0
def main():
    r = Renderer(renderMode='production')
    r.load('C:\\work\\vray3sdk\\scenes\\car.vrscene')
    r.outputImage = 'C:/work/test.png'
    r.resolution = [320, 200]
    r.renderSync()