8.23.2005

Testing MentalRay Renders

Testing command line mental ray renders can be tough at times, but here are a couple of tips to help smooth out the process.

1. Using imf_disp


imf_disp is a great little application bundled with mental ray to allow you to view rendered images. It updates as renders complete, so you can rerender to the same image and watch the progress of the render. If you want to see the output on the command line as tiles come in it is super convenient to use.

2. Render a region


ray3 has a command line argument (-window XL YL XU YU) to render only a portion of the rendered image. If you only want to render a section of a 2K image, this is perfect. Note: (0,0) is the lower left hand corner, which is different from Photoshop, which use the upper left hand corner. (Thanks Adam)

3. Other ray3 arguments


Some other useful ray3 command line arguments are -verbose (turns on more logging), -memory (set max memory in MB), -threads (set max # of threads) and -file_name (specify output, default is tga). If you want to test memory management or threading issues, these are what you should use.

8.07.2005

Test your network Apps with this PHP Daemon

Doing a little work on a distributed computing application I needed to script a simple TCP server that listen to a specified port. I came up with a little solution in php.

To run it you must have php installed with support for sockets. Here is the command to run it:

php simple_server.php -port 2021 -message "got your message"

The default port is 2020 and the default message is "message received", but they can be overridden as shown above. There is also a constant defined for the EOP. Anyways, go ahead and have fun. Take this script and change as much as you would like.

The script is available here: simple_server_code.php