The Photon Soup 2 Project By Richard keene rkeene@mwutah.com http://www.cpjava.net Last Update: April 20, 2004 Install: UnZip the tracer_1_1.zip file in some directory. I use C:\tracer. You need to have Java installed on your machine and in your PATH. Simple Instructions: The program will not run without a window system running. X11 or Windows or MAC OS are fine. To run this project, simply run soup.bat To submit your results click on the 'Try to send to server (20 MB)' button. You can send in your results multiple times, but just once conserves bandwith. It is fine to submit every other week. The final deadline is June 1 but if everyone sends the results on the same day the server will be swampped. So, please submit on the day of the month in June that matches the first letter of your last name. A=1, B=2, etc. This is not a strict rule but will spread out the load. Other Setups: If your name starts with W,X,Y,or Z please run prismonly.bat That is another scene. The Buttons: Next Camera - There are three cameras, front, side, and above. Quit(NoSave) - Just that. Save and Quit - Dumps to cache and quits. Fast - If this button says Fast then you use 100% of the CPU. If it says Slow then you use about 50% of the CPU. This lets you do things like browse the web and such. During a dump to cache the machine gets rather slow. Try send to server (20 MB) - This sends your results to the server. Brightness - This changes the screen brightness. It does not effect the result data. If You Kill the Program: If you kill Tracer while it is doing a dump to cache, it will recover when it runs again. The cache gets copied to a backup, then the dump happens, then the backup is deleted. Doing this twice in a row before the recovery is complete will corrupt your results. If this happens, delete the cache directory and the backup, then re-run. (ouch) Cache Dumps: Every half hour Tracer dumps its state to cache. If you hit Save and Quit it dumps to cache. After the first minute of running it dumps to cache. A typical cache is about 20 MB. If You Want Your Name Published: The default user name is anonymous. You can leave it at that, or run soup.bat and kill it after it gets started. Then edit the config.txt file and put in your name. NO SPACES or other weird characters. My config.txt has RichardKeene in it. Do not change the User= line of the config file. What is the program Doing: The progam is generating a scene by brute force. It simulates photons bouncing around the room. IF a photon happens to hit a camera aperature, it is focused and summed to the film. When you first run the program there are very few photons so you get a screen with a few specks. After a day or so you have a pretty good image but it will be very grainy. The results of everyone running the program are summed up and will make up a nice smooth picture. The picture will have all of the secondary lighting effects, called caustics. The results-so-far will be published every few days on www.cpjava.net. Why: Why do this? Because it's there. No one else is stupid enough to do it this way. Most graphics techniques use shortcuts to get a pretty good scene. I'm trying for a perfect scene. MultiProcess: To run in multiprocess, look at the soup2.bat file. It specifies a different config.txt file and a different cache directory. If you want to run two threads like on a dual CPU machine simply run soup.bat and soup2.bat. It is very important that no two instances of Tracer start within the same millisecond time frame. If you use a script to start multiple copies of Tracer, make sure there is a bit of a delay between invocations. You can have the same user name in multiple config.txt files. This multiprocessor instructions also applies to multiple machines with a single network shared directory. Linux Notes: (I developed and tested on Windows XP) I found that with Java, if you have the umask set wrong then the cache file directory is readonly and won't save correctly. Could someone convert the .bat files to .sh for Linux and send them to me? Who Will Own the Resulting Image: The results will be Copyright 2004, Richard Keene of Park City Utah. You may feel free to use the image for any non-commercial purpose. Otherwise, get written permission. Combining Submissions: If you have lots of servers and want to submit results just once you can use the -M merge flag. see the soupMerge.bat script for an example. ONLY MERGE ONCE. Then clean out the other cache directories if you want to keep running. After merging, run soup.bat and submit the results. Do not submit the results for the other instances. On Sun Machines: ---------------------------------------- > Richard, > > When using the 1.4.2 line of Sun JVM's, I'm getting a significant > performance boost when running with "java -server". It makes use of a > lot > of the P3 and P4 instruction sets for Floating Point and other > mathematically intensive operations. I've seen an average improvement on > 4 > different machines of around 40% faster with -server, than without. > > The caveat is that you need to download a JDK, because the -server option > is > not available in standalone JREs. > > Thanks, > Brian Conneen ------------------------------------------ Please email me with suggestions or questions so I can extend this FAQ for the www.cpjava.net web site.