Back
to Index
Screamernet Mode 2 and Command Lines Under
OSX
26th February 2002
As I've said repeatedly, the definitive guide to getting Screamernet running is
David Todman's 6.5 tutorial here.
All of the basic principles are valid for LW7 and LW7 OSX. This article seeks
to flesh out in more detail exactly how LWSN interacts with cmdline files and/or
the text strings you input. The idea is that if you understand the general principles
at work, you'll have better luck troubleshooting or debugging issues you might
experience - rather than trying to slavishly follow a total step by step guide.
Let me know if this just confuses things, further!
For LWSN to render correctly it needs to 'know' the following things:
Where is the Lightwave Layout 3 Preference File?
Where is the Lightwave Extensions 3 Preference File?
Where is the Content Directory?
Where is the Command Directory?
Where is the Scene File?
Where are the Objects?
Where is the Output Destination?
The real question is:
How do the Node (LWSN )and the Render Controller (Layout) know where to find all
this information?
Let's take a look at the simplest mode 2 scenario - where you control an instance
of LWSN on the same machine as Layout.
If you type this simple argument into the LWSN console:
-2 job1 ack1
Then that's all you need to get LWSN to behave as a render node on your host machine.
Here's how:
The -2 lets LWSN know that you're running a job controlled by a Render
Controller (usually Layout itself) in Mode 2.
job1 ack1 tells LWSN to look for a text file in the Command Directory called
'job1' - this file is placed there by the Render Controller (Layout) when you
hit Screamer Init.
In it's crudest form, when you use Layout as a Render Controller (by activating
Network Rendering) it initialises Nodes by placing job(x) text files in the Command
Directory - if LWSN finds a job(x) file that corresponds to its number it writes
back an ack(x) text file that lets Layout know there is a node present. This is
the only way Layout communicates with Nodes - there's no involvement for
TCP/IP, The Hub or any other communication device.
Here's how the Node (LWSN) knows where to look for stuff:
Unless you tell it otherwise LWSN will always look in the
HostHardDrive:Users:You:Library:Preferences
folder on the machine that it's launched from for the Lightwave Layout 3 Prefs
file. By default, it will also look in whatever directory the Lightwave Layout
3 Prefs file sits for the Lightwave Extensions 3 Prefs File.
It will then use the Content Directory specified in the Lightwave Layout 3 Prefs
File as it's Content Directory and will automatically assume that the Command
Directory is the same as the Content Directory. You do not need to fill in the
Command Directory in Layout (especially as LWSN ignores anything input into that
field anyway).
Provided you have setup a valid Content Directory in the Lightwave Layout 3 Prefs
file by specifying it and then quitting out of Layout (which triggers a save of
the Preference file) then this default setup is ready to go.
When you load the scene file itself into the render controller and the scene gets
passed to LWSN to render, the scene file contains the data for the whereabouts
of the objects, the destination and file type for the output files.
The object files contain the data for the whereabouts of any image maps used with
the objects.
The simplest test, therefore, of LWSN Mode 2 is a straightforward:
-2 job1 ack1
If everything's working fine you should see the following appear in the LWSN window:
LightWave PowerMac ScreamerNet Module (Build 543)
CPU number: 1
Current directory is now "HostHardDrive:WhereverYourContentDirectoryIs".
Can't open job file "job1".
All that remains to be done is for you to hit Screamer Init in the Network Render
panel and add scenes to the render queue.
Now, that's all fine and dandy on single machine but it's not so useful when you're
using a remote machine as a node. Here's the detail..
This is a bit of a misnomer since the physical location of the LWSN application
is still on the Host machine, it's simply launched from the remote machine. This
model, outlined in David Todman's excellent Screamer tutorial for 6.5, is the
basis for all that follows i.e. that the Host machine contains everything required
for the whole farm and that the nodes load the Host's volume(s). No Lightwave
component sits on any of the node machines. The applications that sit on the Host
are launched remotely.
To do that, you need to load the volume upon which the application sits onto your
remote machine's Desktop. You can do that by logging onto your Host machine from
the remote machine using your administrator password either via TCP/IP or via
Appletalk.
In this scenario, the same questions are asked:
Where is the Lightwave Layout 3 Preference File?
Where is the Lightwave Extensions 3 Preference File?
Where is the Content Directory?
Where is the Command Directory?
Where is the Scene File?
Where are the Objects?
Where is the Output Destination?
But the places where the Node (LWSN) looks are different. When LWSN was launched
directly on the host machine it knew by default to look in the:
HostHardDrive:Users:You:Library:Preferences
folder on the machine that launched it. On the remote machine, however, if it
looks in its own local Hard Drive for Preference files it won't find any
since they only exist on the Host.
Therefore, you need to add a simple path to the text string for the Node to tell
it where your Lightwave Layout 3 Prefs File and, as a consequence, the Lightwave
Extensions 3 Prefs file exist. Thus, the string you type in becomes:
-2 -c"HostHardDrive:Users:You:Library:Preferences" job1 ack1
Where the -c"path" string is used to explicitly tell the LWSN
that you launched remotely where those particular preference files sit.
Obviously, you need to have the HostHardDrive mounted as a volume on the node,
otherwise the above step is useless. If it is mounted, then LWSN on the node knows
where the relevant preference files are, can locate the Content Directory (because
it reads it from the Lightwave Layout 3 Preferences file on the Host) and thus
knows where to look for the 'jobx' text files i.e. in the Content Directory on
the Host.
In it's very simplest form, this is all you need to understand to get one remotely-activated
Node up and talking to a Host. Provided LWSN knows where to find all of the above
components and can physically see the relevant directories, you're home and dry.
Firstly, you'll probably want to use more than one remotely-activated Node. Secondly,
in many instances you might want to override the default Preferences or Content
Directories. A good example is with the default location for your Preference Files.
Because I run 7b, 7 and 6.5b on one machine it is essential that I keep my Preference
files out of the default location:
HostHardDrive:Users:You:Library:Preferences
Because they would all overwrite one another each time I opened a different version
of Lightwave. For that reason, I use the Lightwave cmdline and Modeler
cmdline text files in the Programs Folder to redirect my Preference file locations.
I always redirect my main Preferences to the Programs folder itself so that each
version of Lightwave is effectively self-contained.
The Lightwave cmdline text string itself is simple:
-c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs"
So, now, even if I'm running a single Node on the same machine as the Host, the
default standby:
-2 job1 ack1
will not work - it looks in the default location for Prefs files but can't find
them there since I've redirected them to my Programs folder.
Thus, in this scenario, I always have to explicitly tell LWSN where the Prefs
files sit.
This is what I type into the LWSN application:
-2 -c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs" job1
ack1
Obviously, typing these strings directly into the LWSN application is a bit of
a chore. There is an easier way. Just as with the Lightwave and Modeler cmdline
text files, you can create a LWSN cmdline text file.
If you place the string that you would normally type directly into LWSN into that
file (provided the LWSN cmdline file sits in exactly the same folder as the LWSN
application) then the results are the same:
-2 -c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs" job1
ack1
typed in directly or entered into the LWSN cmdline text file have exactly the
same result.
When it comes to running multiple nodes remotely - say 3 nodes - then using cmdlines
seems to present a problem since if you've typed job1 ack1 into the LWSN
cmdline text file then each separate node will fire up LWSN and start looking
for a job1 text file in the Command Directory - each remote instance of
LWSN will be given the same job by Layout (even if it doesn't crash).
Alternatively, you could remove the LWSN cmdline text file completely and then
go around to each remote machine and manually type in the appropriate string remembering
to increment the job1 ack1 entry on each machine e.g
Node 1
-2 -c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs" job1
ack1
Node 2
-2 -c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs" job2
ack2
Node 3
-2 -c"HostHardDrive:Applications:Lightwave 3D 7.0:Programs" job3
ack3
But that's even more of a chore. In the past, the answer was to create a duplicate
of your Programs folder for each node and create LWSN cmdlines in each one with
the job and ack numbers incremented.
Thankfully, there's an even easier method. Simply duplicate LWSN in the Programs
folder for as many Nodes as you intend to run. Rename each LWSN to something like:
LWSN1, LWSN2, LWSN3 and create corresponding LWSN cmdline text files for each
one: LWSN1 cmdline, LWSN2 cmdline, LWSN3 cmdline and place the incremented jobx
ackx string in each one. Launch LWSN1 from remote machine 1, LWSN2 from remote
machine 2 and...you get the picture.
It's quite possible to override many of the default locations that LWSN looks
for prefs files. We've seen how you can make it look in an alternative location
for the Lightwave Layout 3 Prefs file by using the -c entry. You can do
the same for the location of the Lightwave Extensions 3 Prefs file by using -p
and you can also do the same for the Content Directory using -d. Whilst
being able to specify the specific set of plugins to use via the -p command is
relatively new, the ability to specify a Content Directory other than the one
you're currently using is often useful.
None of this is strictly necessary, however, if you keep your preference files
in their default location and have a valid Content Directory set there.
?
1. It's very easy to mis-type the strings or miss out spaces.
More often than not, a simple syntax error in the strings will throw the whole
render out. Forgetting to put in spaces between job1 and ack1 or forgetting to
enclose the paths in quote marks are common mistakes.
2. Failing to Set RGB Save Options Each Time You Open the Scene
This may have been changed in 7b, but in the past every time you opened a scene
in Layout, the RGB save checkbox was automatically unchecked. When you tried to
render the scene, LWSN would render each frame but not save it.
3. Failing to mount all the relevant volumes on the Node
Often, you may have scenes or objects or even output file paths that reference
a volume other than the one which holds your LWSN and Lightwave applications.
If you fail to mount *all* of the volumes that are involved in a specfic scene
on the remote computer, the render will fail - either because it can't find an
important component, like an image map that an Object references, or the file
output path..
4. Failing to Save Preferences
Lightwave only updates Content Directory information when you quit out of it -
at which point it dumps a lot of data out of RAM into the Prefs file. Up until
that point, even though you might be working in a new Content Directory, as far
as the Prefs file is concerned you are still using the one you had when you first
launched Layout. If you don't 'seal' your current Content Directory by quitting
Layout and allowing it to write Prefs then LWSN may pick up an older one from
the Prefs file.
1. You can't have spaces in any of your path names.
You can. Just enclose path names in quote marks.
Here's the kind of internal monlogue that LWSN undertakes when you enter different
strings into the LWSN application:
String 1
-2 job1 ack1
Q. Where Is the Lightwave Layout 3 Prefs File?
A. Since nothing is specified in the string, I'll look in default:
YourHardDriveName:Users:You:Library:Preferences:
Q. Where is the Lightwave 3 Extensions Prefs File?
A. Since nothing is specified in the string, I'll look in the same folder
as Lightwave Layout 3 Prefs:
YourHardDriveName:Users:You:Library:Preferences:
Q. Where is the Content Directory?
A. Since nothing is specified in the string, I'll look in the Lightwave
Layout 3 Prefs file where the user has stored this information by entering a Content
Directory in Layout and quitting the application.
Q. Where is the Command Directory?
A. I really should look in the Lightwave Layout 3 Prefs file to see if
one has been specified by the user, but I can't be bothered. If the Command Directory
is blank, I'll look in the Content Directory. Even if something has been specified,
I'll ignore it and look in the Content Directory. (I think this is a bug :-/)
Once this part of the conversation is complete and satisfactory, LWSN will then
communicate back to the user:
LightWave PowerMac ScreamerNet Module (Build 543)
CPU number: 1
Current directory is now "HostHardDrive:WhereverYourContentDirectoryIs".
Can't open job file "job1"
It will then wait for someone to hit the Initialise button in the Network Rendering
panel in Layout. As soon as that happens, Layout will write a job1 text file into
the Command Directory, LWSN will see it in there and will send back an ack1 text
file and recognise it as a request to get initialised.
The LWSN readout will then display:
LightWave command: init
LightWave command: wait
As soon as you add a scene to the Render Queue and hit Screamer Render, LWSN will
load the scene and then gather the objects and associated image maps according
to the paths specified by the scene (be they within the Content Directory or absolute
paths outside of it) along with the destination for the output files.
The LWSN readout will display the render process.
String 2
-2 -c"YourHardDriveName:Applications:Lightwave 3D 7.0:Programs" job1
ack1
Q. Where Is the Lightwave Layout 3 Prefs File?
A. Aha! I see you've specifed a location for it by cleverly using the -c
command:
YourHardDriveName:Applications:Lightwave 3D 7.0:Programs
Q. Where is the Lightwave 3 Extensions Prefs File?
A. Since you've specified a destination for Lightwave Layout 3 Prefs, and
you haven't explicitly specified a -p path for the plugins, I'm going to assume
that Lightwave Extensions 3 Prefs is in the same folder:
YourHardDriveName:Applications:Lightwave 3D 7.0:Programs
Q. Where is the Content Directory?
A. Since nothing is specified in the string, I'll look in the Lightwave
Layout 3 Prefs file where the user has stored this information by entering a Content
Directory in Layout and quitting the application.
Q. Where is the Command Directory?
A. I really should look in the Lightwave Layout 3 Prefs file to see if
one has been specified by the user, but I can't be bothered. If the Command Directory
is blank, I'll look in the Content Directory. Even if something has been specified,
I'll ignore it and look in the Content Directory.
Once this part of the conversation is complete and satisfactory, LWSN will then
communicate back to the user:
LightWave PowerMac ScreamerNet Module (Build 543)
CPU number: 1
Current directory is now "HostHardDrive:WhereverYourContentDirectoryIs".
Can't open job file "job1"
It will then wait for someone to hit the Initialise button in the Network Rendering
panel in Layout. As soon as that happens, Layout will write a job1 text file into
the Command Directory, LWSN will see it in there and will recognise it as a request
to get initialised.
The LWSN readout will display:
LightWave command: init
LightWave command: wait
As soon as you add a scene to the Render Queue and hit Screamer Render, LWSN will
load the scene and then gather the objects and associated image maps according
to the paths specfied by the scene (be they within the Content Directory or absolute
paths outside of it) along with the destination for the output files.
The LWSN readout will display the render process.
String 3
-2 -c"YourHardDriveName:Applications:Lightwave 3D 7.0:Programs:" -d"YourHardDriveName:Content:"
-p"YourHardDriveName:Users:You:Library:Preferences:" job1 ack1
[All on one line]
Q. Where Is the Lightwave Layout 3 Prefs File?
A. Aha! I see you've specifed a location for it by cleverly using the -c
command:
YourHardDriveName:Applications:Lightwave 3D 7.0:Programs
Q. Where is the Lightwave 3 Extensions Prefs File?
A. Aha! I see you've specifed a location for it by cleverly using the -p
command:
YourHardDriveName:Users:You:Library:Preferences:
Q. Where is the Content Directory?
A. Aha! I see you've specified a location for it by cleverly using the
-d command:
YourHardDriveName:Content:
Q. Where is the Command Directory?
A. I really should look in the Lightwave Layout 3 Prefs file to see if
one has been specified by the user, but I can't be bothered. If the Command Directory
is blank, I'll look in the Content Directory. Even if something has been specified,
I'll ignore it and look in the Content Directory.
Once this part of the conversation is complete and satisfactory, LWSN will then
communicate back to the user:
LightWave PowerMac ScreamerNet Module (Build 543)
CPU number: 1
Current directory is now "HostHardDrive:WhereverYourContentDirectoryIs".
Can't open job file "job1"
It will then wait for someone to hit the Initialise button in the Network Rendering
panel in Layout. As soon as that happens, Layout will write a job1 text file into
the Command Directory, LWSN will see it in there and will recognise it as a request
to get initialised.
The LWSN readout will display:
LightWave command: init
LightWave command: wait
As soon as you add a scene to the Render Queue and hit Screamer Render, LWSN will
load the scene and then gather the objects and associated image maps according
to the paths specfied by the scene (be they within the Content Directory or absolute
paths outside of it) along with the destination for the output files.
The LWSN readout will display the render process.
|
|