Occasionally I’m asked whether there is some way to limit XSI/xsibatch to just one CPU, so that while a rendering is going on, the user can use the other CPUs for something else.
XSI does have a -thread command-line switch that limits the number of threads created by mental ray for rendering.
For example, if you turn on Progress diagnostics for a scene and then render from the command line:
xsibatch -thread 1 -render "%XSI_HOME%\Data\XSI_SAMPLES\Scenes\red_jaiqua.scn" -verbose on -frames 1-3
Then you will see progress messages like this:
//.. // INFO : JOB 0.5 progr: 91.0% rendered on EXAMPLE.3 // INFO : JOB 0.7 progr: 91.3% rendered on EXAMPLE.3 // INFO : JOB 0.4 progr: 91.5% rendered on EXAMPLE.3 // INFO : JOB 0.5 progr: 91.8% rendered on EXAMPLE.3 // INFO : JOB 0.6 progr: 92.1% rendered on EXAMPLE.3 //...
In those progress messages, EXAMPLE is the computer name, and 3 is the thread number. So you can see that the render is using just one thread.
If you were to use -thread 4, then four threads are created:
// INFO : JOB 0.5 progr: 91.0% rendered on MTL-P1917.5 // INFO : JOB 0.7 progr: 91.3% rendered on MTL-P1917.7 // INFO : JOB 0.4 progr: 91.5% rendered on MTL-P1917.4 // INFO : JOB 0.5 progr: 91.8% rendered on MTL-P1917.5 // INFO : JOB 0.6 progr: 92.1% rendered on MTL-P1917.6
This is great info! Is there a way to set up the number of threads when starting Softimage from the icon?
Right-click the icon and click Properties. On the Shortcut tab, add
” -threads 1″ so that the shortcut is “XSI.bat -threads 1”.
XSI.bat passes any arguments directly to xsi.exe