Sunflow is a Java program, so you need to have Java installed in order to run it. You need Java 1.5 (sometimes called 5.0) or newer - older versions will not work. Versions of Java other than those from Sun are not supported and may not work.
You will get the best performance with Java 6.
Sunflow will run considerably faster with the so called server VM (Virtual Machine). This server VM is part of Java, but it's not included in the standard (JRE) installation of Java. The server VM starts up more slowly and uses more memory than the standard VM, but it runs a lot faster in many cases.
Sunflow's built in realtime raytracing benchmark (
-rtbench) for example runs more than twice as fast with the server VM (exact speedup depends on your hardware).
The easiest way to get the server VM is by installing the Java Development Kit (JDK). You can get it here: http://java.sun.com/javase/downloads/index.jsp. Download the plain JDK 6, you won't need the version with Java EE or NetBeans.
Note: The 64-bit version of Java already includes the server VM. OS X also ships with the server JVM by default.
After downloading the binary version of Sunflow, just unzip the file into a directory of your choice.
When running sunflow, you need to pass some parameters to Java, in order to increase performance. For this purpose, it's most convenient to create a batch or script file.
Make sure you know where your JDK is installed. By default, this will be something like
Now open notepad or the text editor of your choice and paste the following text there:
@set javadir="c:\program files\java\jdk1.6.0"
@%javadir%\bin\java -Xmx%mem% -server -jar sunflow.jar %*
@if %errorlevel% neq 0 pause
You may need to change the part which is marked, put the path of your Java installation there!
-serverswitch here. Sunflow will display a warning if you start it without using the server VM.
Save this file with the name
sunflow.bat to the directory where you unzipped Sunflow.
You can now start the Sunflow GUI (Graphical User Interface) by executing the
sunflow.bat you created.
You can also use
sunflow.bat to render from the command line, without the GUI. For example,
sunflow -rtbench will start the built-in real time raytracing benchmark.
Call Sunflow with the parameter
-h for a complete list of command line parameters and their meanings.
If you are unsure of how to access the command line and navigate around it - check out the following tutorial. This applies to OS X users only - if you are running a Linux (or similar) operating system you are probably already very familiar with this.
Most of the instructions for Windows users also apply to OS X and Linux, except that you must create a
sunflow script with the following content:
java -Xmx$mem -server -jar sunflow.jar $*
Note that this script assumes java is in your path. This should be the case by default on recent versions of OS X. Linux users should be able to find out easily where they've installed Java. As before, if when you run the script without arguments the GUI shows up without any warnings - everything is working correctly.
Don't forget to set the executabe bit on the script (
chmod +x sunflow) and to run it as:
The binary release of Sunflow doesn't include any example scenes. You can download example scenes from the homepage.
If you just want to see if it works, you can also run the built-in real time raytracing benchmark, by calling sunflow with the parameter
-rtbench on the command line.
||The path to your Java installation is wrong, check it again. Make sure there's no space around the equals sign in that line of
||There's probably a typo in your
||If you get a message like this, the memory setting in your
||This error message means that the server VM was not found. This usually means that the path you specified is not pointing to a JDK installation, or that you didn't install the server VM. Check the path again, make sure you installed the JDK, or if you really want to run without the server VM, remove the