<prev [index]  

RendView Manual -- Examples

Normal RendView

Finally, let's have a look at some examples. If you have nice calling examples which you find useful for a beginner and you would like to have them added here, please e-mail me.

Please have a look at how to pass arguments using the environment variables (RENDVIEWARGS,...); there is an example in quick start chapter and it is really easy to figure out.

Note that you may always pass -help to RendView no matter how many other args you pass. So, when you have written a lengthy cmd line and do not know how to go on, just append -help (or --help, that does not matter) and hit enter if you wish to get the help screen. You may use -l-help to get help about the local task source's parameters only, or -Ld-help for the LDR task driver interface, etc. Yust make sure you are not inside a section block (-xy-{ ...) when adding -help.

First you need a renderers.par file as well as a filters.par (you do not need the latter if you do not want to filter any frames); examples are distributed with RendView or you may copy the ones from the quick start or component data base chapter.
In any case you have to modify these files to fit your needs.
I will assume that you have the render descs povray3.5 and povray3.1g as well as the mysterious glowfilter filter desc.

Okay, let's first consider the following case: You have the files scene.pov, mycolors.inc (used by scene.pov as an example for an additional file, just like texture.png, etc.) as well as a lot of frame files frame-0000.pov up to frame-0200.pov which #include "scene.pov".
Say you want to render all these with POVRay 3.5 so that the output frames are frame-0000.png up to frame-0200.png. Then, you may call

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet

(-ld-r-quiet is used to suppress POVRay output on the console.)

Now, let's say we modified the frames 52, 53 and 104 (you may do that using touch(1) and we want to re-render only those. Simply execute:

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-cont

If you did not modify any pov files, RendView will launch no renderer. Do not get confused by errors telling you
Local: Access check failed on render input file "frame-0201.pov": No such file or directory
This is normal as you did not specify the number of frames and does not yield to failure.

If you want to re-render frames 30..39 you can use:

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-f0=30 -l-n=10

If you want to re-render frames 30..39 as well as 55..66 and frame 101 using one single call, you may execute:

rendview -rdfile=renderers.par -fdfile=filters.par -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-30:10-rd=povray3.5 -l-55:11-rd=povray3.5 -l-101:1-rd=povray3.5 -verbose=-all

Especially note that the option -l-rd is no longer present and hence the master frame info's action is not to render anything. Just the three specified per-frame blocks render the frames.
The oprion -verbose=-all suppresses nearly all verbose messages (two lines for each frame stay) so that you can see more easily what frames actually get rendered. (You can pass -verbose=-all -dumptask=-z to actually switch off all verbose output except one startup and one exit message but that is not recommended.)

Okay, now let's finally post-process the frames 0..29 using the glowfilter which we have to pass the arguments -recurse 2 -glowfact=0.177:

rendview -rdfile=renderers.par -fdfile=filters.par -l-r-ifpattern=frame-%04d.pov -l-fd=glowfilter -l-f-args="-recurse 2 -glowfact=0.177" -l-n=30

This will produce the files frame-0000-f.png up to frame-0029-f.png.
Alternatively, you could have used -l-r-ofpattern=frame-%04d instead of -l-r-ifpattern=frame-%04d.pov (note the missing file name extension).

Of course, you could have done that right from the beginning using

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-0:30-{ -fd=glowfilter -f-args="-recurse 2 -glowfact=0.177" -}

which renders all 200 framees and filters the ones from 0..29 just like above. (Filtering is always done right after rendering on a per-frame basis).

Now, let's say you have a 4-CPU box and you want to start 3 jobs for every CPU, hence run 12 renderers in parallel. Furthermore, these should run with nice value 15. (You can try out even on a fairly fast single-CPU box.)

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -ld-njobs=12 -ld-r-nice=15

Also, have a look at all the nice output. Running RendView in an XTerm and writing this docu at the same time when executing the above command on a single-CPU Athlon-1.4 GHz, I get the following output after the last frame:

Exiting at (local): Fri Mar 28 2003, 13:14:57.024 CET
Elapsed since start:  00:02:15.370
Load control: [disabled]; current load: 10.97
Last successfully done frames: 196 197 198 199 200
Overall CPU stats:
  RendView:      0.17% CPU  (user: 00:00:00.080; sys: 00:00:00.150)
  Local jobs:   96.31% CPU  (user: 00:02:09.280; sys: 00:00:01.100)
  Together:     96.48% CPU  (user: 00:02:09.360; sys: 00:00:01.250)
RendView used 0.17% of the CPU most of that in system time (and some of that for writing the verbose output). This is fairly good (ratio: 566:1 on single-CPU box); remember that one frame just takes less than 0.7 seconds to render. If the frame takes 10 times as long (7 seconds), RendView's influence gets smaller accordingly. (Note that these timings are queried from the system and not very accurate. I could render films with RendView 0.00% CPU, 99.9% total, but only when starting RendView on the text console.)

But who has a 4-CPU-box? For many people, rendering on 4 boxes (or more) is more likely...

LDR Client and server

Well, LDR is explained easily. We need to launch the clients and lateron the server whenever there is some work to do.

Starting the LDR clients

First, let's go to all the client boxes and start the LDR client there. Say we want to use a nice value of 15 on these clients (other people want to work there, too) and want to suppress renderer output as usual. It is probably useful to telnet/ssh to the rendering clients and let the terminal open to see the output of the clients.
We start:

rendview -rdfile=renderers.par -fdfile=filters.par -ld-r-nice=15 -ld-f-nice=15 -ld-r-quiet -opmode=ldrclient -L-password=foo -L-wdir

Firstly, you need to make sure the client has access to the render and filter desc files (which may need to get adopted to match the paths on the client box).
Note the operation mode spec -opmode=ldrclient and the option -L-wdir which tells the LDR client to create some subdirectory in /tmp and change there (putting all temp files there and removing the subdir upon exit).
I used -L-password to remind you that there is such a thing...

Now, that's all. The clients are up and should output something like
Ready to perform work: max-failed-in-seq=3
  Execution timeout: [none]
Current load average: 0.000000
  Load control: [disabled]; current load: 0.00
  Starting at (local): Fri Mar 28 2003, 15:22:45.946 CET
  Cycle timeout: [none]
Okay, waiting for work: njobs=1 (parallel tasks)
  jtype    jmax  nice   timeout  tty
  render:     1   15        --   no  (quiet)
  filter:     1   15        --   no
  todo-thresh: low=1, high=6; done-thresh: high=10
  term-kill-delay: 1000 msec
which indicates that they are ready to do work for the server. Just select a small font size for the terminal and place it on the bottom right corner of your screen to get some overwiew. (BTW, the "" in the nice column indicates -ld-r-nice-jitter.)

Using the LDR server

Now, let's do some rendering. This is pretty the same as using normal RendView; see the examples above.
Assume, the clients run on the following computers: localhost, remderslave and
First, let's render the 200 frames and filter the first 30 frames again as we did above:

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-0:30-{ -fd=glowfilter -f-args="-recurse 2 -glowfact=0.177" -} -opmode=ldrserver -Ld-clients="localhost renderslave" -Ld-password=foo

Essentially, only -opmode=ldrserver and the following options were added.
And what will we get? Lots of errors! Why? Think a moment...
Correct. Because we did not specify the additional files.
Let's add them:

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=frame-%04d.pov -ld-r-quiet -l-0:30-{ -fd=glowfilter -f-args="-recurse 2 -glowfact=0.177" -} -opmode=ldrserver -Ld-clients="localhost renderslave" -Ld-password=foo -l-r-files="scene.pov mycolors.inc"

Ah now it finally works! (...after fixing an installation problem of the glowfilter on client ;-)
Note that the LDR server only reports 0.09% CPU (on my AthlonXP 1.4GHz with 2 clients attached via loopback because unfortunately I do not have a render farm at home...).
I said "little overhead", right?
Let's compare the following two scenarios:
(1) The above example using two LDR clients connected via loopback.
(2) Normal RendView using -ld-njobs=2 doing just the same job (I just changed the -opmode)
Hence, in both cases all the work is done by a single AthlonXP. I ran both tests under X11 and did no work while testing. The result:
(1) takes 0:02:12:386
(2) takes 0:02:11.477
That's less than one percent difference although one frame takes less than 0.7 seconds and although when using LDR, all the files (a total of more than 5Mb) have to be transferred, the additional files must be requested before any work can be done and lots of networt operations have to be performed.
Obviously, the difference scales down when frame render time goes up. Expect 0.1% when the average frame takes 10 seconds.

Okay, now assume we are using the POVRay frame clock to animate our scene.pov and we want to have the clock run from -2 to 10 for a total of 120 frames. So, we have to pass the following options to POVRay: +KFI0 +KFF119 +KI-2.0 +KF10 Especially, do not forget to pass the number of frames to RendView because it can no longer be auto-detected (you get an error otherwise).
Let's further assume that we want PPM files as output instead of default PNG:

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=scene.pov -ld-r-quiet -opmode=ldrserver -Ld-clients="localhost renderslave" -Ld-password=foo -l-r-files="mycolors.inc" -l-r-args+=\"+KFI0 +KFF119 +KI-2.0 +KF10\"" -l-r-fc -l-n=120 -l-oformat=ppm

Especially note that the render input frame pattern was replaced by -l-r-ifpattern=scene.pov and consequently, scene.pov was removed from the -l-r-files. Furthermore, -l-r-fc (frame clock) was added to explicitly tell RendView (the LDR server) to use the frame clock value (this is required).
-l-oformat=ppm changes the render output format to PPM. The rendered output files look like scene-0000000.ppm, scene-0000001.ppm, etc. (To get e.g. s-000.ppm, etc, you can use -l-r-ofpattern="s-%03d", the extension .ppm is added automatically.)

Let's do the same as above but assume we want render scene.ini which contains all the +Kxy options and (important) the +Iscene.pov input file spec. We can do that simply by replacing scene.pov by scene.ini and adding scene.pov to the additional files (of course, the additional +Kxy args are no longer needed):

rendview -rdfile=renderers.par -fdfile=filters.par -l-rd=povray3.5 -l-r-ifpattern=scene.ini -ld-r-quiet -opmode=ldrserver -Ld-clients="localhost renderslave" -Ld-password=foo -l-r-files="mycolors.inc scene.pov" -l-r-fc -l-n=120 -l-oformat=ppm

Once you want to kill the LDR clients because they are no longer needed, simply send them a SIGTERM or a SIGINT (normally pressing ^C in the terminal).

Finally, Enjoy RendView...
And support me improving it.

<prev [index]  
Last modified: 2008-02-11 21:06:46 Copyright © 2003 Wolfgang Wieser