Site hosted by Angelfire.com: Build your free website today!
 


2.2 Getting Started - Files and Directories
 
Previous   Table of Contents   Home   Next

CONTENT DIRECTORY - A SCENE AND ITS SUPPORT FILES

In the last tutorial, I touched upon the 'Content Directory' and what it's used for. This tutorial will delve more deeply into the concept of folders, files, and the 'Content Directory'.

Your hard disk is arranged as folders, inside which are other folders.

If you go to your desktop and double-click with your left mouse button on the 'My Computer' icon, a window appears.



In all that mess of complex folders, Lightwave needs to know where to find the scenes, objects, and images that it'll need in order that it properly render a scene.

In my particular case, I tend to set the 'Content Directory' to D:\ drive's 'My Documents' folder.

You create folders on your hard disk by using the 'File' menu of the folder you wish to create a folder in, and choosing 'New->Folder'.




WHAT THE CONTENT DIRECTORY NEEDS

A 'Content Directory' needs to have, at the minimum, three folders in it, an 'Objects' folder, a 'Scenes' folder and an 'Images' folder.



The 'Objects' folder is where you put the pieces of your scene such as a human figure, a desk or a lamp. The 'Modeler' program is what is used to create objects.

The 'Scenes' folder is where you put your scene. A scene includes objects, lights, the camera, etc. The 'Layout' program is what is used to create scenes.

The 'Images' folder is where you put your pictures. Pictures are used as backdrops in your scene, surface textures on your objects, etc. Photoshop or a drawing program is what is used to create the images. LightWave isn't a drawing program, and thus doesn't create images, itself.


WHAT IS THE 'CONTENT DIRECTORY'?

Before we create either objects, or scenes, it's important that you understand the concept of the 'Content Directory'.

The 'Content Directory' is the default place where LightWave looks when you load scenes, objects, surfaces, images, envelopes, motions, previews, etc.

When you first start Lightwave, it points to the directory where you installed the LightWave software. The 'Content Directory' is LightWave's master directory, the place LightWave expects to find things when it needs something.

The 'Content Directory' makes it so you can create a truly portable LightWave scene. You are able to save a scene onto an external device such as a CD and then later load all associated obects and images for that scene back into LightWave without losing any of them.

It acts as a root directory. By saving every object and image files you'll need in a particular scene in subdirectories below the Content Directory, your LightWave scene and related files can be moved from drive to drive or system to system. They can even be moved platform to platform and still properly load into LightWave.


RELATIVE LINKS vs HARD-WIRED LINKS

Whenever you save a scene from the Layout program, LightWave tries to save only a relative link to the image and object files.

If you were in Tutorial 32, and were saving Leroy as an object, you might save Leroy as D:\My Documents\Leroy\Objects\Leroy.lwo

The Layout program would only save the name as \Objects\Leroy.lwo if the 'Content Directory' pointed to the D:\My Documents\ folder, and there was an Objects folder in that folder.

However, if you use objects or images which are outside of the currently set 'Content Directory', those links will be hard-coded (e.g., D:\My Documents\Leroy\Objects\Leroy.lwo)

Hard-coded links work fine until you try moving the scene and support files to another computer. However, if you move the files, LightWave will no longer be able to find those files and will ask you to search for them and find them.

IMPORTANT - If you load a scene where an object/image file cannot be found, a file requester appears, letting you manually locate the file.

So, lets say you had completed Tutorial 32 on Leroy the Hawk. To do it, you might have created a directory on your C:\ drive called Leroy. Inside that C:\Leroy\ folder you might have created three folders called C:\Leroy\Object\ , C:\Leroy\Scenes\ and C:\Leroy\Images\.

You would save the Leroy.lwo object into that C:\Leroy\Objects\ folder.

You would save the any texture images into C:\Leroy\Images\ folder (Leroy uses two images which are used to help draw him, they'd go in that Images folder).

And, the scene you'd create in Layout would be saved in C:\Leroy\Scenes\

You would have set C:\Leroy\ to be the Content Directory.

To move the project to a CD, you'd just copy the C:\Leroy\ folder to the CD.

To load the scene straight from the CD, you then just change the 'Content Directory' to point to the CD's Leroy folder and Layout would then seamlessly be able to load and render the scene.


OBJECT FILE LINKS

Like Layout's scenes, Modeler's objects might also have linked files. Modeler's linked files would generally be image maps which are used for surface textures on objects.

Thus, the 'Content Directory' is used from the Modeler program as well as from the Layout program. Always put image files in the current content directory's 'Images' folder to avoid loading problems.


SETTING THE CONTENT DIRECTORY

To set the Content Directory:

In the Layout program, you go to the 'Options' section of the 'Display' tab and click the button (or press the 'o' key, which stands for 'Options').

... and click the button.

You can see the currently set 'Content Directory' to the right of the button.



You can also change the 'Content Diretory' while you're in the Modeler program.

From the drop-down menu, select...



Or, as with the Layout program, press the 'o' key (standing for 'Options').

If the Hub is active, Layout and Modeler will sync any changes to this setting.


WAYS TO USE THE CONTENT DIRECTORY

Here are a few ways you might utilize the 'Content Directory' feature:

    Use a separate directory as the 'Content Directory' for every project.

    You'll need to create subdirectories for '\Objects', '\Images', and '\Scenes' beneath it. All corresponding files which were relevant to the project would be stored in these folders. Other folders, containing files not directly connected with being an Object, Scene or Image could have their own created folder, also, such as 'Presets'.

    In this case, as you change from one project to another, you must also change the current 'Content Directory'. In this case, any new scene that you created for that project would be saved in that folder's Scenes folder.

    This is the way that I do it.

    The other way the manual says you can do it is you "Create subdirectories called MYPROJECTS in the OBJECTS, IMAGES, and SCENES subdirectories that are created when you installed LightWave.

    (e.g., C:\LIGHTWAVE\OBJECTS\MYPROJECTS, C:\LIGHTWAVE\IMAGES \MYPROJECTS, etc.). Then, for each project, create identically named subdirectories in each of the MYPROJECTS subdirectories and store your files accordingly.



PRODUCTION DATA FILES

Subdirectories other than '\Images', '\Objects', and '\Scenes' (e.g., '\Surfaces', '\Motions', '\Presets', etc.) are generally only important when you're in the process of producing a project.

When you incorporate information from these files into the scene or object, that information is then kept inside the particular scene or object file and won't be asked for by either Layout or Modeler in the normal course of rendering a scene or loading an object.

A surface, motion, or preset would not be referred to again unless you chose to do it again, yourself.

NOTE - The generic 'Content Manager' plug-in, discussed in Chapter 38, can be used to collect a scene's support files and ensure correct compliance with your 'Content Directory'.


SCENE FILE MANAGEMENT

To load an existing scene:

1 Make sure you've set the 'Content Directory' from either the Modeler or Layout program.

2 Choose 'File->Load->Load Scene' and use the file dialog to navigate to the desired scene file. As the scene loads, a progress dialog will appear.

You may abort a load operation by clicking 'Abort'; but, the scene might not completely load if you do that.

To save a scene:
1 Ensure that you've properly set the Content Directory.

2 Choose 'File->Save->Save Scene...' to save the scene. 'Save Scene As...' lets you save the current scene using a different name.

IMPORTANT - This operation doesn't save loaded object files. You must save the object files separately.

Object files are saved in the content directory's '\Objects' folder, scenes are saved in the content directory's '\Scenes' folder.


SAVING A COPY OF A SCENE

Choosing 'File->Save->Save Scene Copy' will let you save a copy of the current scene using a different name, without affecting the current scene. It's similar to a 'Save Scene As...', but when it's done, it won't have switched your scene to the name you just saved it as, as it does when you do a 'Save Scene As...'


Previous   Table of Contents   Home   Next