Microsoft Knowledge Base

Batch Rendering with mental ray on NT Platforms

Last reviewed: December 23, 1996
Article ID: Q161383
The information in this article applies to:
  • Softimage 3D for Windows NT, versions 3.01, 3.51

SUMMARY

Batch Rendering

There are two methods for batch rendering with mental ray on NT platforms:

  • The soft -R command is used to render .pic or .mi files from .dsc files saved in the SCENES chapter of your database.
  • The ray command renders .pic files from .mi files. By default, .mi files are rendered to your user directory. To render them to another location, enter the explicit path when naming the .mi file in the Options window of Render Setup. For example, naming the file C:\TEMP\my.mi will create my.mi in the C:\TEMP directory.

Rendering With soft -R

  1. Before saving your scene and exiting SOFTIMAGE, select mental ray as the Rendering Type.

  2. From the SOFTIMAGE v3.51 window, double-click on the SI3D Command Prompt icon.

  3. Enter the command: soft -R and hit enter. You will see the usage for this command. Further information on this command is provided on pages 24 and 30 of the Rendering guide.

Depending on the Render Setup Options that you set for your saved scene, rendering with the command soft -R will give you one of three results:
  • If you have saved your scene without selecting the Output to File option, the process for rendering .pic files with mental ray begins when you execute the soft -R command.
  • If you selected Output to File, the process creates a single .mi file including all the frames to be rendered (as specified in the saved scene unless the -s option with soft -R is used).
  • If you selected Output to File per Frame, a single .mi file for each frame (again, as specified in the saved scene unless the -s option with soft -R is used) will be created.

To determine the optimal method for rendering your scene, you need to take the following into consideration:
  • How much memory do you have? Because "soft" must be running when you render a .pic file, you require more memory and swap space than rendering a .mi file. Consequently, a .mi file requires less time to render than a. pic file.
  • How much hard disk space do you have? Depending on the size of your scene, an .mi file that includes your entire scene may require more disk space than you have. However, if disk space is an issue, you can generate a .mi file for groups of frames from your scene, render them, and then delete them before generating the next group.

Batch Rendering With ray

To batch render .mi files, you must create and run a .bat file that contains a list of files that you want rendered:

  1. Open the SI_3D Prompt window and cd to the directory where your .mi files are located.

  2. Enter the command: dir /b *.mi > render_me.bat. This command creates a file named render_me.bat that contains a listing of all the .mi files in the directory. When the process is finished, close the window.

  3. From the Accessories group, double-click the WRITE icon and in the message box that appears, click the No Conversion button.

  4. Open the render_me.bat file and insert the ray command in front of each .mi file. The following example gives a quick method for inserting this command in front of a series of files named myfile:

    myfile.1.mi myfile.2.mi myfile.3.mi

         .
         .
         .
    

    Choose Replace from the Find menu. In the Find What field, type myfile and in the Replace With field, type ray myfile. Click 'Replace All,' and then click Close to accept the changes.

  5. At the top of the file, add the command line: call c:\soft_3.51\3D\bin\setenv.bat

  6. Save and close the file.

  7. Open the SI_3D Prompt window and enter the command: render_me.bat. Press Enter to start the batch render process.

Combining soft -R and ray

If you do not have enough ram or hard drive space to render a single .mi file for your entire scene, use the following method that creates a .mi file for a portion of your scene, renders the final .pic files from this .mi file, then repeats this process for the next portion of your scene:

  1. Open Notepad and create a script consisting of two line groups. The first line of each group runs the soft -R process using the -s option to render only a portion of the scene. The second line of each group runs the ray command, rendering the .mi file created in the first line to a .pic file.

    The following is an example of three groups rendering a total of 30 frames from a scene named example in a database named test. It assumes that you have a standard SOFTIMAGE 3D installation and that your scene was saved with at least 30 frames:

    C:\soft\bin\soft C:\soft\bin\rsrc - R example -d test -s 1 10 1 C:\soft\mental_ray\bin\ray example.mi C:\soft\bin\soft C:\soft\bin\rsrc - R example -d test -s 11 20 1 C:\soft\mental_ray\bin\ray example.mi C:\soft\bin\soft C:\soft\bin\rsrc - R example -d test -s 21 30 1 C:\soft\mental_ray\bin\ray example.mi

    Repeat the above script as many times as necessary to complete your job, then complete the following steps.

  2. Save your script as a text file (ie: example.bat) and close Notepad.

  3. From the 351RC2 (common) group, double-click the SI_3D Prompt icon.

  4. Cd to the directory where your .bat file is located.

  5. To run the script, enter its name on the command line and press Enter. In this case you would enter: example.bat.

REFERENCES

If you have any questions concerning the information contain in this article, contact support@softimage.com by e-mail.


KBCategory: kbgraphic kbhowto
KBSubcategory:
Additional reference words: 3.01 3.51 si si3d si3dren



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 23, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.