Follow these instructions to render a stillframe image of all viewpoints of a selected camera track into a folder. Use this to also render an image sequence for flying between viewpoints.
Render one stillframe image per camera track viewpoint using the following example script. It auto-creates a folder with the name of the camera track at the given path. For example, in the example below, the path used is C:\vred-snapshots\test\MyTrack\
.
setRenderView("MyTrack")
setRenderFilename(r"C:\vred-snapshots\test\#.png")
overwriteFiles = True
startRenderToFile(overwriteFiles)
Render an image sequence for the camera track animation that flies to all viewpoints. In this script, no folder is auto-created. The images are saved to the path set by setRenderFilename
. Here is the code for setting track animation parameters; however, this can also be done through the UI, beforehand.
setRenderView("MyTrack")
setRenderFilename(r"C:\vred-snapshots\trackAnim\frame.png")
setRenderAnimation(True)
# jump to first viewpoint of the selected track to start camera animation from there,
# otherwise, it will first fly from the current view to the first viewpoint
trackNode = vrNodeService.findNode("MyTrack", root=vrCameraService.getCameraRoot())
vp0 = trackNode.getChild(0)
vp0.activate(True) # jump to first viewpoint
# configure the track animation settings
vp0.setTrackTransitionDurationOverride(0.0) # disables transition for first viewpoint, as we have already jumped there
vp0.setTrackPauseDurationOverride(0.5)
vp0.setTrackFadeInDurationOverride(0.0)
vp0.setOverrideTrackSettings(True)
trackNode.setTransitionDuration(1.0) # time in seconds to fly from one viewpoint to the next
trackNode.setPauseDuration(0.5) # time in seconds the camera stays still at each viewpoint
trackNode.setFadeInDuration(0.0)
overwriteFiles = True
startRenderToFile(overwriteFiles)