Helios
Sunflow Distributed Rendering
Helios:
Helios enables the distributed rendering of 3D models building on open source technologies that are all 100% pure Java. The rendering engine is Sunflow with the distributed computations managed by the JGrid service-oriented Grid system that uses the Jini technology as its base.- First download the latest release and unzip it to an arbitrary directory (RENDER_HOME).
- Next copy the RENDER_HOME/lib-ext/jsk-policy.jar file to the JAVA_HOME/jre/lib/ext directory.
- Then go to the RENDER_HOME/bin directory and open the setenv.bat or setenv.sh file (depending on your OS) to edit. The setenv file contains many environment variables that all scripts and configuration files refer to, so it is important to set them properly. The next section describes it in more detail.
- The JAVA_HOME environment variable is used to set the Java location. This must point to your JDK installation. In the setenv.bat, be sure to out the REM before the set JAVA_HOME= statement. In setenv.bat, when you set the JAVA_HOME, make sure to remove the quotation marks even if there are spaces in the path. Also, make sure both the JAVA and JAVAW have quotation marks around the full path for example: JAVA=”%JAVA_HOME%\bin\java.exe”.
- The next variable you have to specify is JGRID_LOCALHOST which is the IP address of the current machine. All entities (compute services, client, class server etc.) running on the current machine use this IP address to start server sockets. This IP address should be reachable for anybody in the execution environment. Use inner IP address only in case when all entities use inner addresses. To avoid problems do not use localhost or 127.0.0.1 even if you start everything on one single machine.
- Files describing the 3D model (.sc files) and all depended files (like textures, bump maps, images for image base lighting etc.) are downloaded by the Compute Services via HTTP from the client. By default this HTTP server is set to be the one that is included in this bundle and used for serving classes for mobile code. However, for large files, this simple HTTP server is not adequate thus it is suggested to use a scalable HTTP server like Apache or Tomcat instead. You can configure an external HTTP server via the FILE_DOWNLOAD_ROOT_URL and FILE_DOWNLOAD_ROOT_DIR environment variables. The first must specify the root URL of your HTTP server, while the second must point to the root directory of the HTTP server in the file system. This latter is required because the grid renderer client GUI must have a file view to your files so that you can choose them in a file chooser dialog. On the other hand Compute Services require a remotely accessible URL to download the files that the user selected.For example if you have an HTTP server accessible via the URL http://foo.bar.com that serves files from the c:/documents/web directory than you have to set the variables as follows:
set FILE_DOWNLOAD_ROOT_URL=http://foo.bar.com/
set FILE_DOWNLOAD_ROOT_DIR=c:/documents/web
Note that the value of the FILE_DOWNLOAD_ROOT_URL variable must end with a “/” slash. The path of the used files will be always treated relative to these settings. - classserver: this script starts a simple HTTP server (found in the Jini bundle) on the localhost. This simple HTTP server serves the JAR files required for the mobile code. You should always start this first, as it is required by all other components running on the same host. You can configure the port on which this server starts in the setenv file by the CLASSSERVER_PORT environment variable.
- lookup: this starts a Lookup Service on the current host. This is the registry for the Compute Services and the renderer client so it should be started before them. Of course it is not a problem if you start it later, but until a Lookup Service is not running no discovery can be made, and the renderer client will not find any Compute Services.
- cs: this script starts a Compute Service on the current host. If there is Lookup Service running in the multicast range then the Compute Service will discover it and registers itself so that clients can immediately discover and use it. You should see the “Service is ready.” text in the command line if the Compute Service started successfully.
- browser: starts the JGrid service browser. This browser can discover the Jini services in the multicast range, or the ones found in the specified Lookup Services. The browser helps you to visualize the available services and view their attributes. If you started some services but you cannot see them in the browser than there is some problem in the discovery process (see the problem solving section below for more details). If you see your services in the browser than the renderer client can also discover them, so you can proceed.
- client: starts the grid renderer client GUI. If you have already set up your environment then the client will automatically discover the available Compute Service in the multicast range and you can start rendering your scenes. See the user manual for more details about how to use the client.
- Problem in discovering the services
The most usual problem when working with Jini is that the automatic discovery of service is not working. You start the browser and cannot see any services. Here are some possible reasons why the discovery do not function:- Check if you started the class server. If you did, and you have services running then in the command window (or prompt) you should see HTTP requests like : “compute-wrapper-dl.jar requested from IP_ADDRESS“. If you cannot see any requests then check if the JGRID_LOCALHOST variable was set to the correct IP address of the local machine, or if the port of the class server is not blocked by any firewall.
- The next reason is often that the multicast is not enabled on your network, or there are some services that are beyond the multicast range. In this case you should use unicast discovery and must specify the direct Jini URL of the Lookup Service to every entity that wish to discover other services. For example if you started a Lookup Service on a machine that has IP_ADDRESS then the Jini URL is: jini://IP_ADDRESS:4160 or just jini://IP_ADDRESS since the port 4160 is the default one (this can be changed in the lookup/config/transient-reggie.config Lookup Service configuration file). Instead of the IP_ADDRESS you can also specify the hostname of the machine like: jini://foo.bar.com:4160. To test unicast discovery the easiest way is to start the JGrid service browser and in the Locator field beneath the toolbar type the Jini URL and press the Go button. Then switch to the Registrars tab on the left side where your Lookup Service should appear. If it works than you should configure the Compute Services and the client to use this unicast address instead of relying on multicast discovery.To configure the Compute Service edit the computeservice/config/jeri/transient-compute.config file. Look for the net.jini.lookup.JoinManager block at the end of the file and within it the discoveryManager entry. Uncomment the line:
new LookupLocator(”jini://your_host:4160)
and replace “lookup_host” with the IP address or hostname of the machine which the Lookup Service runs on.
To configure the renderer client you have to do almost the same thing but in the client/config/client.config file. In this case you have to look for the net.jini.lookup.ServiceDiscoveryManager block at the beginning of the file and within it the discoveryManager entry. Uncomment the new LookupLocator(… line again and replace the “lookup_host” with the IP address or hostname of the machine which the Lookup Service runs on.
From now the Compute Services and the client will look for a Lookup Service specified by the Jini URL. - An other reason for the discovery not working if you forgot to copy the RENDER_HOME/lib-ext/jsk-policy.jar file to the JAVA_HOME/jre/lib/ext directory, or you copied it to the extension directory of an other JDK than you are running the applications with.
Install & Config
Prerequisites
Before installing this software kit you have to have Java SE 6 or later installed on any computer you wish to use. You must have a JDK installed, because the service JVMs run in server mode that are only available in the JDK bundle. You can get the latest release of Java SE from the official Java web site.
This page uses the terminology and concepts introduced in the introduction, if you did not read it yet than I suggest to start with it first.
Install
To install the distributed rendering software kit:
Configuring the environment
The RENDER_HOME/bin/setenv.[bat|sh] file contains all the environment variables which the user can configure the system behavior with. Note that here only those environment variables are mentioned that have to be set by all mean to start any of the components.
For a detailed description of configurable variables refer to the comments in the setenv file.
Now you are ready to start the required components like compute services or the rendering client.
Running the components
In the downloadable bundle the bin subdirectory contains all the scripts that are to start the different components. In the following listing each script is described in detail, they appear in the order as you should run them on the host computer (the extensions are .bat or .sh depending on your OS). For slave computers you only need to run the cs script:
For more details about the set up of your rendering environment please read the introduction document.