DreamLight Interactive

Mastering LW ScreamerNet

DreamLight.com

Search/Index Help
Click to view DreamLight's 3D Animation Demo Reel
20 Years of Award-winning Multimedia, 1987-2007

Utilizing LightWave’s Mac Command Line Parameters,
Mastering LightWave ScreamerNet for Mac OS X

Previous Contents 1 2 [3] 4 5 6 7 8 9 Next

LWSN cmdLine

LightWave uses command line parameters which in Windows are specified in a DOS window or a shortcut icon. For LightWave PPC, NewTek has added a simple mechanism for specifying command line parameters on the Macintosh as well. Plain text files called cmdLine files are used to store any command line parameters that you wish to pass to a LightWave PPC application when it is launched. The PPC versions of LightWave, Modeler, Hub and LWSN can all use their own cmdLine files. ScreamerNet UB is now a Unix executable that runs in the Mac OS X Terminal and as such can use its own real command line parameters. We’ve also created an Aqua GUI front end for ScreamerNet UB named DreamLight SNUB-Launcher that you may use to interactively build command lines in a Mac friendly error-free manner.

PPC cmdLine File Names

Top

LightWave PPC uses cmdLine files which are plain text files that are named exactly the same as their associated application (which must be one word), followed by a single space and the word "cmdLine". They do not (and can not) have a file extension added (not even ".txt"), or LightWave PPC will not recognize them. Only LightWave PPC uses cmdLine files, LightWave UB does not use cmdLine files. The LightWave PPC cmdLine file name format is as follows:

SingleWordAppName SPACE cmdLine NO EXTENSION

The default names of major applications and cmdLine files (not all Programs files are shown) in the LightWave 3D 9.3:Programs folder are as seen in the example below left:

Hub, Hub cmdLine, LightWave, LightWave cmdLine, LWSN, LWSN cmdLine, Modeler, Modeler cmdLineLWSN-01, LWSN-01 cmdLine, LWSN-02, LWSN-02 cmdLine, LWSN-03, LWSN-03 cmdLine

When setting up multiple instances of LWSN PPC to use in batch or network rendering, you’d make multiple copies of the LWSN application and its associated cmdLine file and rename each pair to match, typically using an incrementing number as in the above right example.

Note: The icons for the cmdLine files may change to text document icons once you edit them. The icons for different versions of LightWave may also be different.

These cmdLine files must be located in the same directory as the applications that they are associated with. Typically: YourHD:Applications:NewTek:LightWave 3D 9.3:Programs where YourHD is replaced with the name of your hard drive that holds your applications.

LightWave UB doesn’t need cmdLine text files since the command line parameters may be entered directly within the Mac OS X terminal when launching ScreamerNet UB.

Interactively Building ScreamerNet UB Command Lines with DreamLight SNUB-Launcher

Top

DLI_SNUB-Launcher is DreamLight Interactive’s ScreamerNet Universal Binary Launcher, an XCode Aqua GUI front end that interactively builds the necessary command lines to launch LightWave 3D’s ScreamerNet UB standalone, batch and network rendering command line component. DLI_SNUB-Launcher’s interactive interface makes configuring and launching LightWave 3D’s ScreamerNet UB much more user friendly and far less error prone than doing so manually. Download the FREE LITE VERSION today!

General Command Line Syntax

Top

The command line syntax is as follows, all on one line with a space separating each parameter. Do not separate a parameter from its value with a space. All parameter letters must be in lowercase. Enclose all paths with double quotes, especially if the path contains spaces. This syntax is used in a cmdLine text file for the PPC versions of LightWave or directly in the Mac OS X terminal command line for ScreamerNet UB.

[-0] [-c<config directory>] [-p<plugin config dir>]

The following general command line parameters may be used in most of the cmdLine files:

Hub Switch

Top

-0 : (dash zero) Disables the Hub

This parameter may be included in the PPC LightWave and/or Modeler cmdLine files if you wish to disable the hub. If you are experiencing problems with LightWave and/or Modeler, try disabling the hub, which is often a source of problems on the Mac. Otherwise, launching either LightWave or Modeler will also launch the Hub. The easiest way to disable the UB hub is to simply rename the UB Hub application to something like Disabled-Hub in which case it won’t automatically launch.

Command Line Path Parameters

Top

When specifying command line path parameters, the following rules of thumb will help avoid problems:

  • Type the parameter letter, such as -c or -p, in lowercase.
  • Do not put a space between the parameter letter and the associated path.
  • Enclose all paths in double quotes if the path contains any spaces or you must escape any special characters. I find it easiest to just be consistent and simply enclose all paths in double quotes. Be sure to only enclose the path, not the leading parameter.
  • Avoid using spaces in file or folder names inside the content directory, use underscore.
  • Prefix all PPC content directory relative paths with a leading colon. Such relative paths are relative to the Content Directory. For example: ":Scenes:MyScene.lws"
  • For paths on volumes other than the system volume, start PPC paths with the name of the volume such as "VolumeName:", start UB paths with "/Volumes/VolumeName/"
  • ScreamerNet UB does not currently (LW9.3) seem to work properly with content relative paths, so use full paths for ScreamerNet UB for now.
NOTE: When typing paths in the Mac OS X Terminal you can usually start a path with a tilde '~' character preceding a forward slash, as ~/ to represent "/Users/username/" where username is the current user. However ScreamerNet UB itself doesn’t currently understand this convention, so the tilde won’t work if it’s embedded in a parameter that’s passed to LightWave, for instance enclosed in double quotes, or following a parameter switch such as -c or -d, etc. It will work in a few instances if used BEFORE the first double quote for the rest of the path, in a parameter that doesn’t start with any switch, such as when passing a job, ack, or scene file path,
such as: ~/"Documents/LWContent/MyScene.lws"
which is expanded to: "/Users/username/Documents/LWContent/MyScene.lws"
by the terminal BEFORE being passed to ScreamerNet. So unless you really know what you’re doing I’d recommend just avoiding the ~/ shortcut altogether.

Config Path

-c : Optional: Path to the directory that contains the config file.

The LightWave PPC default config path is as follows:

-c"YourHD:Users:username:Library:Preferences"

The LightWave UB default config path is as follows:

-c"/Users/username/Library/Preferences/LightWave3D"

If not specified, the config directory defaults to the current user’s Preferences directory for PPC or the LightWave3D folder in the current user’s Preferences dilectory for UB, which is normally as specified above, where YourHD should be replaced with the name of your hard drive that holds your home directory and username should be replaced with your user name. Therefore, if you leave your config files in their default locations, you do not need to specify this option in your command line parameters and each individual user could have their own configs. This parameter may be used in LightWave, Modeler, Hub and/or LWSN cmdLine files or the ScreamerNet UB command line to specify a different directory for the config files.

Plug-in Database Path

-p : Optional: Path to the directory that contains the plugin database file, typically the same as the config path.

The LightWave PPC default plugin path is as follows:

-p"YourHD:Users:username:Library:Preferences"

The LightWave UB default plugin path is as follows:

-p"/Users/username/Library/Preferences/LightWave3D"

If not specified, the config directory will be used. This parameter may be used in LightWave, Modeler, Hub and/or LWSN cmdLine files or the ScreamerNet UB command line to specify a different directory for the plugin database file.

General ScreamerNet Command Line Syntax

Top

There are a few common command line parameters that are used to tell LWSN PPC or ScreamerNet UB what to do. The following general command line parameters may be used when running LWSN PPC or ScreamerNet UB in any mode. Additional mode specific command line parameters are discussed later.

The general common command line syntax is as follows, all on one line.

-<mode#> [-c<config directory>] [-d<content directory>] [-l<log file>] [-q]

Rendering Mode

Top

-<mode#> : The mode number parameter specifies which rendering mode to use.

-2 : Signifies batch or network rendering mode which may render multiple scenes on multiple nodes.

-3 : Signifies standalone rendering mode which renders a single scene on a single node.

Config Path -c

Top

-c : Optional: Path to the directory that contains the config file.

The LWSN PPC default config path is as follows:

-c"YourHD:Users:username:Library:Preferences"

The ScreamerNet UB default config path is as follows:

-c"/Users/username/Library/Preferences/LightWave3D"

This parameter is explained in more detail above under Command Line Path Parameters.

Content Path -d

Top

-d : Optional: Path to the directory that contains your content.

An LWSN PPC sample content path could be as follows:

-d"YourHD:Users:username:Documents:LWContent"

A ScreamerNet UB sample content path could be as follows:

-d"/Users/username/Documents/LWContent"

Where YourHD should be replaced with the name of your hard drive that holds your home directory and username should be replaced with your user name. This example would be to use a directory named LWContent in your Documents directory as your content directory. If this option is not specified, the content directory defaults to the content directory specified in the config file through LightWave. Therefore, if you set your content directory properly in LightWave itself, and you have LWSN PPC or ScreamerNet UB on the same machine using the same config file as LightWave (which it does by default), you do not need to specify this option in the LWSN PPC command line file or the ScreamerNet UB terminal command line, unless you wish to use a content directory that is different than the one currently set in LightWave. You would also need to specify this path if you were running LWSN PPC or ScreamerNet UB on a different machine than you are running LightWave.

Please review Config Files: Content Directory, for important information about using LightWave’s content directory properly.

Log File Path -l

Top

-l : Optional: Path to a text file to write the terminal output into.

An LWSN PPC sample log file path could be as follows:

-l"YourHD:Users:username:Documents:LWContent:ScreamerNetLog.txt"

A ScreamerNet UB sample log file path could be as follows:

-l"/Users/username/Documents/LWContent/ScreamerNetLog.txt"

Where YourHD should be replaced with the name of your hard drive that holds your home directory and username should be replaced with your user name. This example would use a log file named ScreamerNetLog.txt in a LWContent directory in your Documents directory. If this option is not specified then the text messages generated as output would appear in the LWSN PPC window or the Mac OS X terminal running ScreamerNet UB.

Quiet Mode -q

Top

-q : Optional: Suppresses terminal output during frame rendering, still reports as each frame finishes.

Normally while LWSN is busy rendering it outputs quite a bit of text information to the terminal interface. This can be useful for monitoring progress and problems such as missing plug-ins, etc. Once everything is up and running however, all this text writing to the terminal may be unnecessary and may slightly slow down the rendering. The -q parameter turns off all the output during the rendering of an individual frame. You’ll still get text output between frames, but not during frame rendering. This may slightly speed up rendering but will also make LWSN less responsive to user input, such as if you wish to save the log or quit LWSN.

Here’s what the output for one frame looks like normally, without the -q parameter:

LightWave PowerMac ScreamerNet Module (Build 690)
CPU number: 774
Current directory is now "HD:Samples:Content:".
Loading ":Scenes:Toys:ToysTest.lws".
Clearing scene
Loading settings
Loading "Objects/Toys/Ball.lwo"
Loading "Objects/Toys/Blocks.lwo"
Loading "Objects/Toys/Floor.lwo"
Validating scene
Scene loaded.
Allocating frame buffers.
Allocating segment buffers.
Updating geometry.
Moving Ball.
Moving Blocks.
Moving Floor.
Optimizing Ball.
Optimizing Blocks.
Optimizing Floor.
Computing shadow map for Light.
Transforming coordinates.
Removing hidden polygons.
Computing polygon distances.
Sorting polygons.
Rendering frame 1, segment 1/1, pass 1/5.
Rendering transparent polygons.
Integrating pixels.
Rendering frame 1, segment 1/1, pass 2/5.
Rendering transparent polygons.
Integrating pixels.
Rendering frame 1, segment 1/1, pass 3/5.
Rendering transparent polygons.
Integrating pixels.
Rendering frame 1, segment 1/1, pass 4/5.
Rendering transparent polygons.
Integrating pixels.
Rendering frame 1, segment 1/1, pass 5/5.
Rendering transparent polygons.
Integrating pixels.
Freeing segment buffers.
Allocating filter buffer.
Applying soft filter.
Freeing filter buffer.
Allocating segment buffers.
Writing RGB image to HD:Content:Images:TESTS:Toys0001.tga.
Frame completed.
Last Frame Rendered: 1.
Rendering Time: 0.0 seconds.
Freeing segment buffers.
Freeing frame buffers.

Here’s what the output looks like with the -q parameter included:

LightWave PowerMac ScreamerNet Module (Build 690)
CPU number: 774
Current directory is now "HD:Samples:Content:".
Loading ":Scenes:Toys:ToysTest.lws".
Scene loaded.
Last Frame Rendered: 1.

Standalone Mode (-3) Command Line Syntax

Top

The standalone mode (-3) specific command line syntax is as follows, all on one line.

-3 [-c<config directory>] [-d<content directory>] [-l<log file>] [-q] <scene file> <first frame> <last frame> [<frame step>]

The first five parameters are explained above under General ScreamerNet Command Line Syntax.

Scene File Path

Top

<scene file>: Path to the scene file. May be a full or a relative path, enclosed in quotes.

Full paths specify the entire path to the scene file.

An LWSN PPC sample full scene path could be as follows:

"YourHD:Users:username:Documents:LWContent:Scenes:MyScene.lws"

A ScreamerNet UB sample full scene path could be as follows:

"/Users/username/Documents/LWContent/Scenes/MyScene.lws"

Relative paths are relative to the current Content directory specified in the command line itself, or from within LightWave’s config file. Relative paths must start with a leading file separator.

An LWSN PPC sample relative scene path could be as follows:

":Scenes:MyScene.lws"

At this time LW 9.3 ScreamerNet UB does not appear to work with content relative paths.

Frames to Render

Top

<first frame>: First frame to render, may be higher than last frame if step is negative.

<last frame>: Last frame to render, may be lower than first frame if step is negative.

[<frame step>]: Optional: defaults to 1, may be positive or negative.

This specifies which frames to render between the first and last frame. When set to 1, ScreamerNet would render every frame from the first frame, up to the last frame. When set to 2, ScreamerNet would render every other frame from the first frame up to the last frame. If set to -1, ScreamerNet would render every frame from the first frame, down to the last frame and in this case the first frame should be higher than the last frame to render in reverse order.

Batch/Network Mode (-2) Command Line Syntax

Top

The batch & network mode (-2) specific cmdLine syntax is as follows, all on one line.

-2 [-c<config directory>] [-d<content directory>] [-l<log file>] [-q]
[-t<check interval>] <job command file> <acknowledgment file>

The first five parameters are explained above under General ScreamerNet Command Line Syntax.

Job File Path

Top

<job command file> : job# File & node number for ScreamerNet to read commands from.

LWSN PPC job file sample paths could be as follows:

"job1" or ":job1" Reads the job1 file in the top level of the Content directory.

":Commands:job1" Reads the job1 file in a Commands directory in the Content directory.

"YourHD:Applications:NewTek:LightWave 3D 9.3:Programs:job1"

Reads the job1 file in the Programs directory in the LightWave 3D 9.3 directory, where YourHD should be replaced with the name of your hard drive where your applications are stored.

A ScreamerNet UB job file sample path could be as follows:

"/Users/username/Documents/LWContent/Commands/job1"

Reads the job1 file in a Commands directory in a LWContent directory in the user’s Documents folder, where username should be replaced with your actual username.

At this time ScreamerNet UB doesn’t appear to work with content folder relative paths, use full paths.

The number should immediately follow the word "job" without any spaces and there must be no file extension added to the end of the path.

Make sure that both your job# and ack# both use the same number. This number is what actually determines the CPU number of the ScreamerNet node, not any number that you may also be using in the LWSN PPC, ScreamerNet UB, or cmdLine file names. Though to keep things from getting confusing I suggest using the same numbers for the LWSN PPC, ScreamerNet UB, and cmdLine names as well as for the job# and ack# in the cmdLine file itself.

For example:

Application name: LWSN-1

cmdLine Name: LWSN-1 cmdLine

cmdLine Contents: -2 "job1" "ack1"

For additional information please review Config Files: Command Directory.

Acknowledgement File Path

Top

<acknowledgement file> : ack# File & node number for ScreamerNet to write replies to.

LWSN PPC ack file sample paths could be as follows:

"ack1" or ":ack1" Writes the ack1 file in the top level of the Content directory.

":Commands:ack1" Writes the ack1 file in a Commands directory in the Content directory.

"YourHD:Applications:NewTek:LightWave 3D 9.3:Programs:ack1"

Writes the ack1 file in the Programs directory in the LightWave 3D 9.3 directory, where YourHD should be replaced with the name of your hard drive where your applications are stored.

A ScreamerNet UB job file sample path could be as follows:

"/Users/username/Documents/LWContent/Commands/ack1"

Reads the ack1 file in a Commands directory in a LWContent directory in the user’s Documents folder, where username should be replaced with your actual username.

At this time ScreamerNet UB doesn’t appear to work with content folder relative paths, use full paths.

For additional information please review Job File Path & Config Files: Command Directory above.

Time Check Interval -t

Top

-t : Optional: Time check interval in seconds. For instance as follows:

-t60

This would have ScreamerNet attempt to check the job file every 60 seconds during rendering for status or abort commands. Other commands are ignored.

Normally, once ScreamerNet begins rendering a frame, it does not check the job file for any further instructions until the frame finishes rendering. During the initial setup and testing of your render farm or when testing a new scene, it may be useful to allow ScreamerNet to check the job file for abort commands. Particularly if individual frames take a long time to render. This way, if you notice a problem right off the bat (a missing plug-in for instance), you can abort the rendering without having to wait for all your nodes to finish rendering an entire frame each or force quitting each node.

For instance, if your frames use ray tracing, area lights, radiosity, caustics, high antialiasing levels, motion blur and/or depth of field, they may take a long time to render. In this case you could set -t to 60 seconds, then ScreamerNet would try to check the job file every 60 seconds to see if the job should be aborted or not. During certain processing, ScreamerNet may take longer than 60 seconds before it can check, but it doesn’t have to wait for an entire frame to render before being able to stop. Once you are sure everything is running smoothly, it is best to remove this option, so that no extra time is taken checking the job file unnecessarily, especially if you are network rendering many frames.

Unfortunately, the -t parameter for time check interval still does not appear to work on ScreamerNet Mac (Tested from LW7.5 through LW9.3.1). I was unable to get it to actually allow an abort of a frame during rendering... Using the built-in Network Rendering controller and clicking the Cancel Render button to abort a scene rendering in progress now issues an abort command into the job files, but ScreamerNet fails to abort the render in progress until after the current frame finishes renedring, in which case the -t parameter isn’t needed anyway.

LWSN PPC Mac Command Line Dialog Interface

Top

In addition to running LWSN PPC with a cmdLine file, you can also run it using the default command line dialog interface. If you launch LWSN without a cmdLine file, it will open an input dialog which allows you to type in the command line arguments.

LWSN Command Line Dialog

On Mac OS X you can’t paste any text into the dialog the way you used to be able to on Mac OS 9, so this method is rather obsolete. It’s sometimes useful for quick tests though.

To use the command line dialog simply follow these steps.

  1. Move or rename the LWSN cmdLine file, so that LWSN won’t find it.
  2. Launch LWSN which will open the command line dialog.
  3. Type in your command line parameters, just like in a cmdLine file.
  4. Click on LWSN.out and select a save location when prompted if you wish to save the log.

Previous Contents 1 2 [3] 4 5 6 7 8 9 Next

To view this site properly, please upgrade to a browser that supports current Web standards.

BlastOff! Wins a Silver W3 Award in the Pioneering Category of Web Video - 3D Animation

BlastOff! Wins an Official Honoree Webby Award in the category of 3D Animation

DreamLight Incorporated, 14 Union Street, Suite 2R, Woburn, MA 01801 USA, Telephone: 781-932-6333
Search/Index Top Help