Skip to content
Paul Stahr edited this page Aug 30, 2022 · 6 revisions

Arguments

The program can be started by

./Multiview (-s "<script> ... ") (-p " ... ") (-c "command1;...;commandn")

This will open the gui and run the commands of the script line by line if specified. Control can be done either by command line or by the gui.

Variables

You will have some predefined variables, which are:

  • ${sdir} -> always extends to the directory of the currently active script
  • ${n} -> The n-th argument given to the program or script

Commands

object myobject ${sdir}/../../meshes/sphere.obj pos 0 0 0 scale 1 1 0.5 #Reads a wavefront-file, names it myoobject and performs transformations (from left to right)

id myobject 255 #Assigns an id, which can be rendered into an exported image for further computation

camera mycamera #Creates a new camera

anim "anim.csv" myobject pos myobject rot mycamera pos mycamera rot #each label indicates how to interpret the representing column <rot/pos>, rotations are fetched in quaternions, columns can be skipped by scip.

exit #Exit program

help # Get a longer list of possible commands.

Synchronization

Putting an & at the end of the line results of running the command in background, which is recommended to increase overall performance. Because the program works as a state-machine, parallel running tasks might influence each other. To synchronize you can use the command "join" together with the following arguments:

  • sread Waits until no background operation will influenced the scene
  • swrite Waits until no background operation will change the scene
  • fread Waits until no background operation will read from a file
  • fwrite Waits until no background operation will write to a file
  • all Waits until no background operation is running

Export

As a start we recommend to have a look at an example python-script which can be used as a generator for exporting frames over a range and handle the synchronization. export_frames.py

Clone this wiki locally