Distributed Rendering: Introduction |
||
|
Introduction The distributed rendering program that is packaged with LightWave is called ScreamerNet. It uses Layout’s Network Rendering panel (Render > Network Render) to control submitting scenes to networked computers running the ScreamerNet process. ScreamerNet can control up to 1,000 CPUs. Each CPU takes a frame, renders it, and then grabs the next available frame in the animation until the scene is complete. If you're familiar with NewTek lore, you'll remember the speedy (for its day) computer prototype called Screamer. This is back in the Seaquest and Babylon 5 years when LightWave studios were cranking out TV visual effects on render farms of Amiga 4000's. It was from these days that ScreamerNet was born. Though many who have toiled to set up ScreamerNet would swear (as in curse) that the title has more to do with the resulting mental state. Honestly, the set up of ScreamerNet can be tedious and the command lines sound a bit like a cat coughing up a hairball; but when you have ScreamerNet running and you're churning through frames in record time, you'll be screaming for joy. Note: ScreamerNet is limited in its features. If you are a serious studio or just need more features and flexibility when rendering scenes, you should check out third party rendering programs that are more powerful and feature laden. Are
You Talking to Me? Hint: Since ScreamerNet communicates by writing files. NetBEUI and TCP/IP are not required. As long as each machine can see each other and write files across the network, ScreamerNet should function properly. Note: If you are network deprived, you still can use ScreamerNet to batch-render multiple scenes on a single computer. See the Batch Rendering on One Computer section near the end of this chapter. Share
and Share Alike |
|
|
In a ScreamerNet
setup, you designate one of the computers as the control or host machine.
It hands out the rendering assignments, (called jobs), to the nodes (the
CPUs on the network used for rendering). The host must have LightWave
installed on it. In this scenario, Pig will be the control machine. Node
machines do not need any NewTek software or hardware on them. |
|
|
For ScreamerNet to work, all the nodes need to access specific files. Of course, all the nodes need to share the scene file and all its accompanying data including object and image files. If you’re organized, all these will be tucked away in your LightWave Content directory. Also, the nodes need to save the rendered frames to a shared directory. Each node must be able to load a plug-in configuration file (LWEXT8.CFG) that has the plug-in files mapped with a path that the node can access. Finally, the ScreamerNet command program, (LWSN.EXE), needs to be visible to all the nodes. Perhaps some of the confusion about setting up a ScreamerNet system arises because there is more than one way to organize a sharing scheme and you may have read tutorials that herald one method over another. If set up properly, all the schemes will work. So depending on your situation and disposition, you should choose the most suitable one for you. Note: The following instructions refer specifically to setting up ScreamerNet on a Windows based system. You also can use ScreamerNet on Mac and Linux computers. You can find helpful tutorials for those systems on Scott Cameron’s LightWave tutorial website, http://members.shaw.ca/lightwavetutorials/. Drive
Mapping The solution
is to map a unique network drive (or drives) that contains all the necessary
LightWave files. Normally, these files will be on the host computer. If
that is your case, go to your host computer and on your Windows screen,
right click on the Network Places
icon and choose Map Network Drive… |
|
|
|
|
|
|
|
|
Both of the above methods assume that all the necessary files are in your mapped drive. If you’re organized, then all of your objects and images will be in your Content folder. Back in the old days of the 20th Century when humongous hard drives were nine gigabytes and drive space was scarce, often you would store your rendered frames on another drive. If your scene accesses any data from other drives or stores frames elsewhere, then those folders must be accessible to the network nodes. That means that you will need to map more drives. For another way of sharing folders, Matt Gorner, (in an exhaustive, informative ScreamerNet tutorial), shuns the drive mapping technique. In his method, (which you should read about directly), he simply sets up network sharing access of his LightWave folder. Matt goes into great detail about the whole process. Since all the computers on your network need to share files with this mapped drive, you will need to map that drive on all your computers. After you have, you can test the connection by copying files into that drive from the node computers. Organizing
Configuration Files The next steps
involve changing certain LightWave configuration files so that they are
ScreamerNet friendly. Before you do, you should get those files where
you can see them. Start by creating a new folder in your LightWave directory
called Config. Now, click on the My Computer
icon and do a search for LWEXT8.cfg,
(the plug-in configuration file), and move it to the Config folder. (Often
it is buried in the Documents and Settings directory.) Do the same for
the LW8.cfg file. |
|
|
C:\Lightwave8\Programs\lightwav.exe This points to Layout’s program file. If you have set up the Config folder, change this line to read: C:\LightWave\Programs\lightwav.exe -cc:\LightWave\config The first part
is unchanged. The second part, ( -cc:\LightWave\config), tells LightWave
where to look for the configuration files. The -c is the config cue. The
rest (c:\LightWave\config) is simply the path. |
|
|
S:\LightWave\Programs\lightwav.exe -cS:\LightWave\config Please notice that there is no space between the -c and path name. Command
Directory |
|
|
A message pops
up that says, “ScreamerNet must be reinitialized whenever the command
directory is changed. Initialize now?” Click, Yes.
You can close the Network Render panel. |
|
|
Finally, you need to remap your plug-ins. And again, there are two methods. The search and replace technique involves opening the LWEXT8.cfg file in a text editor. The lines would originally look like this: { Entry You would search for C: and replace it with your mapped drive letter. In our case, it would be S:. Save your changes and you’re done. This method is great if you like to dig in there, get your hands dirty and see exactly what you are doing. In Matt Gorner’s solution, you click on the Utilities tab in Layout and select Edit Plug-ins. In the panel, choose Scan Directory. Browse to your mapped drive and highlight the Plug-ins folder. Hit OK and an Add Plug-ins window will pop up. Next, if the lscripts folder is not in the plug-ins folder, then choose Scan Directory again, highlight the lscripts folder and click OK. Now, if you open the LWEXT8.cfg file in a text editor, you should see that all of the plug-ins have been remapped to the network drive. To save the changes to the configuration files, you need to Quit LightWave. When you start it up again, the new configurations will be loaded. Yackety,
yak Note: Since being the Host computer is not too taxing, you probably also will want to use it as a rendering node. To initialize a node for ScreamerNet, you need to create a separate file that you will store and run on each node. To assist you, in the LightWave\Programs directory, you can find a file called startlwsn_node.bat. Open it up in a text editor. It should read: cd S:\Lightwave\Programs LWSN.exe -2 -cS:\Lightwave\Config S:\Lightwave\Command\job1 S:\Lightwave\Command\ack1 You can use this file as a guide. It consists of two lines. (Everything from LWSN.exe to ack1 is the second line.) Edit it to fit your specific setup and save it with a new name. Each computer that is a rendering node needs this file on it. You can call it whatever you want, just remember to keep the .bat extension. Be creative – YouScreamIScream.bat or SpeedKills.bat. The first line indicates where to find the lwsn.exe program. The second line begins by running the ScreamerNet program in –2 mode. (There is a –3 mode that is explained later.) Simply, leave this part of the line as it is. Next is a –c command, which indicates where to find the configuration program. If you have been following along, you will have set up a Config folder and moved your LW8.cfg and LWEXT8.cfg files there. If it is located elsewhere, change this path. The next path tells ScreamerNet where to find the job commands. Again, if you have been following along, you have created a Command folder and changed the Command Directory path in Layout. The last path simply indicates where the acknowledgement (ack) files are located. The numbers after job and ack indicate the node that is running this batch file. Each node has a unique number. Usually, if you are using the host computer as a rendering node, you assign it number 1. So, its batch file would read job1 and ack1. In our case, Pig would be node 1. You then number the other nodes. For example, Horse would be 2, Cow would be 3, and Chicken would be 4. Each of the computers on your network needs a copy of this node initialization batch file customized to it. For example Horse’s file would read: cd S:\Lightwave\Programs Cow’s would say: cd S:\Lightwave\Programs If any of the computers have multiprocessors, then it would need two batch files. Let’s say Chicken is a dual processor machine. You would create one file for each processor. The first might read: cd S:\Lightwave\Programs The other would say: cd S:\Lightwave\Programs Obviously, you would have to name the batch files differently, such as StartNode4.bat and StartNode5.bat. When you have all the batch files placed on the node computers, create a shortcut for them on your desktop. ShowTime Under the Render tab, open up the Render Options panel. Sometimes, you may not want to render all the frames in the scene. What you can do is set the Render First Frame and Render Last Frame fields to the desired range of frames. Make sure that you have Auto Frame Advance checked. Also, check Save RGB. Remember, ScreamerNet only renders individual frames. It will not render animation files. In the RGB Files field, indicate the network-mapped path of where you are saving files. For example, S:\LightWave\Frames. Save the scene. Hint: You can batch render scenes in ScreamerNet. So you could save a scene and then go back and change it (for example, to render a different range of frames) and then save the scene with another name. Once the scene(s) are saved, click on the Render tab and Network Render. In the Network Rendering Method, choose ScreamerNet II, (which is probably the only choice you have). The number that you enter in the Maximum Number CPU field should be the highest number node that you will be using. For example, if we would be using just node 1 (Pig) and node 2 (Horse), you would enter 2. But let’s say that Horse wasn’t available but Cow was. Even though, you are still using only two nodes, you would enter 3 so that ScreamerNet would look for node number 3, which is Cow. Now go to the
node computers and click on the batch file icons that you created. A black
MS-DOS window will open up and before you can start reading what it says,
a continuous flow of repeating messages will probably begin. Depending
on your exact setup, the message will read like: |
|
|
This will be
normal until LightWave initializes ScreamerNet. Once you have started
all your nodes, return to Layout and click on the Screamer Init button.
|
|
|
|
|
|
|
|
|
If you added a scene by mistake, highlight it and click Remove Scene. If you want to remove all the scenes, click Clear List. When the list is complete, click on Screamer Render. The job commands will be sent to the nodes, which are waiting in line. Node 1 receives the first frame, node 2 will take the second, and so on down the queue. If you look back at the node’s window, you will see it document its progress in the render. As soon as a node finishes a frame, it receives the job to render the next available frame in the scene. When the scene is completed, ScreamerNet jumps to the next scene in the list. Note: You may wish to check some of the first frames in a photo editing program to see if they are what you expect. If you are having problems, please read the Troubleshooting section below. When you are finished rendering all the scenes and are ready to close ScreamerNet, click the Screamer Shutdown button. A panel will pop up that says, “Are you sure you want to shut down the ScreamerNet CPUs?” If you choose Yes, the nodes are closed and their MS-DOS windows disappear. Now, if you wish to start a new session, you must restart ScreamerNet on each CPU and re-initialize the CPUs from the host machine. If you want to stop rendering before ScreamerNet is finished, press the Esc key to abort the session. A message will appear in the Screamer Init window saying, “Waiting for CPUs to finish rendering.” If the scene is complex or one of your nodes is slow, waiting could take a quite a while. Hint: If you are impatient, there is no elegant way to force the nodes to quit in mid render. If you can’t wait, you can close LightWave by hitting Ctrl + Alt + Del, clicking the Task Manager button, highlighting LightWave and selecting End Task. Then, you can stop each node by closing its MS-DOS window. It’s brutal, but it works. WARNING: If you close the MS-DOS window on any of the render nodes, you may have to restart all nodes and re-initialize them. Batch
Rendering on One Computer Rendering
Without LightWave LWSN -3 [-c<config dir>] [-d<content dir>] <scene file> <first frame> <last frame> [<frame step>] As you can see, you supply the program with the basic information needed to render a scene. An example would be: LWSN -3 -cS:\Lightwave\Config -dS:\Lightwave\Content oldmacdonald.lws 1 900 1 In the example, the program would render frames 1 through 900 of the oldmacdonald.lws scene using the config files stored in the S:\Lightwave\Config and using S:\Lightwave\Content as the Content Directory. HINT: You can get the syntax for ScreamerNet by simply typing LWSN with no arguments. Troubleshooting and limitations: The most common cause of ScreamerNet crashing is when too many nodes try to write or read their information to or from the Host computer while the host renders. If that seems to be the case, try saving the frames to a mapped network drive on another computer. You will have to go back to your scene and redirect the path for saving frames. Of course, make sure that the new drive has enough space to store the frames. If that doesn’t solve your crashing problems, do not use the host machine as a render node. Use it only as a server where the hard drives are found. ScreamerNet can be finicky about how filenames and directories are composed. Putting spaces in a name, for example, old macdonald.lws, might cause a problem. Try using a dash, -, or an underscore, _, instead of spaces, old_macdonald.lws. Some plug-ins don’t like running with more than one thread. For ScreamerNet scenes, go to the Render Options panel, (Render > Options > Render Options). In the Multithreading drop-down menu, change to 1Thread, and save the scene. Quit LightWave and start it again. This will update the configuration files. You then will need to restart all the nodes so they will read the updated configuration files. Matt Gormer also lists other possible problems and solutions in his tutorial. With his permission, they are excerpted below. Hopefully everything is running smoothly, but problems can occur, usually because something is setup wrong. Some of the main problems that arise are listed here along with possible remedies. The biggest limitation to ScreamerNet are plug-ins that are not written to take advantage of it. I’m not aware of a definitive list of all the ones which do and don’t work. If in doubt read the documentation that came with the plug-in, it should say whether it has problems or not. If it doesn’t say but the plug-in still doesn’t seem to be work, re-scan your plug-ins to update the LWEXT8.cfg file. If it still doesn’t work then chances are it’s not compatible with ScreamerNet. If your scene uses procedural textures (fractal noise etc.) you may experience differences in the pattern if you render on machines with different processors. Mixing old and new processors, AMD and Intel, could lead to problems. This is really only a problem with animations as textures could suddenly change from frame to frame, if in doubt run a test or use all computers with the same processor type. Another known problem with ScreamerNet (correct as of v7.5c of LightWave) is its dislike for scenes that have had a Spreadsheet used on them. Plug-ins like Spreadsheet save data to the scene file, which causes ScreamerNet to hang. The only way around this is to remove the entry in the scene file made by Spreadsheet. Open your scene files in a text editor. Near the top you will find an entry that says: Plug-in MasterHandler 1 .SpreadsheetStandardBanks followed by: EndPlug-in There will be another right after that entry that starts with: Plug-in MasterHandler 2 SpreadsheetSceneManager and if you scroll down there will be another: EndPlug-in Highlight all the text between the first Plug-in MasterHandler and the last EndPlug-in, delete it, then save the file, it should now render okay. Problem: Possible
solution: Also check that all the render node computers have access to read and write to the folder. Problem: Possible
solution: Problem: Possible
solution: Next, make sure your scene file is saving RGB FILES and not an animation (.MOV / .AVI etc.) in the Output tab of the Render Options panel. ScreamerNet can ONLY save individual frames. Finally, check that your plug-ins (LWEXT8.cfg) file is up to date by re-scanning them using the pathname all the nodes will be using to find them on the network. Problem: Possible
solution: The second reason is that that the render node that saved the file ran out of memory to load the saver plug-in so, as a last-resort, it used the built in FLX saver. If you have a whole scene’s worth of FLX images, you can use LightWave to convert them into your desired format. Simply load the series as a sequence of images for the Backdrop in a blank scene and render in the proper format. If you only need to convert a few FLX images, load them into the Image Editor panel. Highlight the name of an image and double-click on the preview, (or just double-click on the name), to open it up in the Image Viewer. Now, click on File > Save RGBA, and pick your format. Problem: Possible
solution: Problem: Possible
solution: |
|
|