HTTPov: A distributed
POV-Ray rendering system


What, why and where? IQ

Important Questions

From time to time, I get questions about different aspects of HTTPov. I'd lie if I said they were frequent, but I think they, and their answers, are important.

Q: I'm sure HTTPov is the best thing since sliced bread, but honestly, how do you install the server?

A: Well...
You'll need a computer, obviously, and have it run a few servers. In this case, we'll restrict ourselves to Apache with PHP, and MySQL. For simplicity, we'll do it on a CentOS 5 server.

1: Use your favorite packet manager to install Apache, PHP and MySQL. Make sure not to forget php-mysql, the PHP-to-MySQL connection.

I'm not going to bore you with detailed instructions on how to do this, but concentrate on the HTTPov specifics. Setting up a LAMP system is covered in detail at Howtoforge, anyway.

2: Configure the web server.

The HTTPov server download contain a directory structure suitable for copying into a directory the web server has access to:

$ dir -R httpov-server-0.5
httpov-server-0.5:
httpovhttpov_conf.php httpov.sql LICENSE README safe_directory

httpov-server-0.5/httpov:
httpov.php jobs

httpov-server-0.5/httpov/jobs:

httpov-server-0.5/safe_directory:

Copy the contents of httpov-server-0.5/httpov/* into /var/www/html: cp -r httpov-server-0.5/httpov/* /var/www/html
Copy httpov-server-0.5/httpov_conf.php to /var/www: cp httpov-server-0.5/httpov_conf.php /var/www/
Make sure the web server can write to safe_directory: chmod 777 /var/www/safe_directory
(To be honest, that's a bit on the generous side, as it allows anyone logged in to write there. Ideally, it should just be you and httpd.)

3: Configure the database server.

Create the HTTPov database: mysql -uroot -p <httpov.sql
Create an HTTPov user, with access to the httpov database and tables.

Edit httpov_conf.php to reflect the database configuration:

<?php
$db["server"] = "localhost";
$db["db"] = "httpov";
$db["mortal"] = "<username>";
$db["mortal_pass"] = "<password>";
?>

4: We should be set to go now.

Q: And how do I use it?

A: HTTPov doesn't have any shiny web user interface, which makes it a bit harder to use than it could have been. (I'd welcome any contributions in that area, though!) Let's try an animation!

1: Transfer animtest.zip from the download page to the httpov/jobs directory.

2: Let the archive remain compressed, but take a peek inside it:

animtest/pov.ini contain these parameters:

+Ianimtest.pov
+W640
+H480
+A0.3
-J0
+KFF125

Note the +KFF parameter. It describes the length, in frames, of the animation. We need to tell the server that information, along with a few other things.
In the mysql client, invoked with mysql httpov -u<youruser> -p, issue the following line:

INSERT INTO job SET name='animtest', frames=125, sliced=0, rows=1, count=1, issued=UNIX_TIMESTAMP();

name='animtest' is the name of the archive, minus the zip extension.
frames=125 is the number from +KFF.
sliced=0 tell the server to issue entire frames to the client.
count=1 makes the server send out one frame at a time to the client.

3: If HP_SERVER is configured with the name of your HTTPov server and you have installed POV-Ray, start the client.

$ ./httpovclient.sh

Sat Sep 26 13:28:44 CEST 2009: HTTPov client 1.0 starting.
Sat Sep 26 13:28:44 CEST 2009: Fetching data for job 1 (animtest)
Decompressing data for job 1 (animtest)
Sat Sep 26 13:28:44 CEST 2009: Fetching batch for job 1 (animtest)
Starting render job:
Batch: 1
Startframe: 0
Stopframe: 0
animtest_000.png created.

Sat Sep 26 13:28:58 CEST 2009: Compressing data for job 1 (animtest)
Sat Sep 26 13:28:58 CEST 2009: Uploading batch data

4: If you have more cores or computers, start more clients!

The result of this job will be uploaded to safe_directory in the form of zip archives, containing png files and a render log for each batch.

Q: Does HTTPov have special support for photons and/or radiosity?

A: Photons and radiosity differ from the 'normal' ray tracing mode of povray, as they consist of two steps. In the first step, photon or radiosity maps are pre-calculated, and in the second step, the actual scene is rendered. POV-Ray can cache those maps, and re-use them to speed up subsequent renders of the same scene, if the maps doesn't have to be recalculated. In theory, this could be used to speed up certain animations or stills, but in practice, HTTPov has no code for utilizing this mechanism. Not yet, anyway.