Bonzai3d | Resource Manager

Resource Manager

There are a number or situations where a links to Maxwell resources (file dependencies) Bonzai3d may become unlinked, resulting in 'file not found' type errors when attempting to render:

  • When moving a Bonzai3d project between workstations
  • After relocating resources, such as MXMs or images, that a project relies upon
  • Attempting to use a collaborator's MXMs, which may contain file paths your OS cannot parse
  • Attempting to use an MXM downloaded from the internet, which contains filepaths referring to the original creator's hard disk

The Resource Manager remedies all these situations, by providing policies for re-linking missing files though the use of resource Libraries.

A Library is simply a folder that contains any number of organized subfolders, each of which is searched recursively for missing files of a given type.

  •  Add Library: Adds a library to be seached.
  •  Remove Library: The reference to the search library is deleted. (The library itself remains untouched.)
  • Library Entries List
    • Use: Enables or disables searching a particular library.
    • Lock: the library is locked by the plugin. It cannot not be deleted, but it may be disabled.
    • Library Path: The file path to the library folder.
    • mxm: Enable/disable searching for MXM files in library.
    • img: Enable/disable searching for bitmap images (jpg, tiff, etc.) in library.
    • ior: Enable/disable searching for complex IOR files in library.
    • hdr: Enable/disable searching for HDR and MXI files in library.
    • ies: Enable/disable searching for IES and LDT files in library.

Libraries may be dragged up or down to change the search order.

 

Do not add libraries within libraries; they are all searched recursively, so this will just slow down the search.

 

Do not add a 'deep' folder, such as your Documents folder, as a library. Yes, it will find everything, but it will be slow. For efficiency, libraries should contain mostly relevant files and little more.

 

The Library references set up here are project-level settings. They apply to all windows, and are saved with the project.

The Search

Missing files are identified and searched when a render is started.

Search Policy: Missing MXM, HDRI, and IES files

The locations where the Resource Manager will search for missing MXM, HDRI, and IES files, in order:

  • In a folder called 'Resources' in the same directory with your project. This project-relative path is refreshed when each render is started. Search is recursive (all sub-folders in 'Resources' will be searched for the missing file).
  • In each library (folder) as it appears in the Resource Manager list. Search is recursive (all sub-folders within the library will be searched for the missing file).

Only libraries that are active and are flagged as valid for the missing file type will be searched.

If the missing file is found, it's path will be corrected to reflect the current location. This alleviates the need to search for it upon subsequent renderings, or when the project is reopened.

Search Policy: Missing MXM dependencies

The locations where the Resource Manager will search for missing MXM dependencies (Bitmap textures, IORs, etc.), in order:

  • In the same folder with the MXM
  • In a subfolder in the same folder with the MXM called 'textures' (this folder search is not recursive).
  • In a folder called 'Resources' in the same directory with your project (e.g., this path is project-relative). Search is recursive (all sub-folders in 'Resources' will be searched for the missing file).
  • In each library (folder) as it appears in the Resource Manager list. Search is recursive (all sub-folders within the library will be searched for the missing file).

Only libraries that are active and are flagged as valid for the missing file type will be searched)

Paths to missing MXM dependencies are not corrected in the external MXM. Instead, a searchpath is added to the MXS when the scene is translated which tells the Maxwell render engine where to find the missing file.

 

 

The 'Resources' project-relative folder reference may not be deleted, but it may be disabled.

 

 

When files are still not located

If the file is not found at the existing path or an any libraries, an alert is issued, indicating that the Log should be checked for missing resources. To correct:

  • Check the Log and identify the file. It will be located just after the blue-highlighted ERROR lines.
  • If you know what library the file resides it, simply add a new search path to that library.
  • If you do not know, click on the Log entry with the filename. It will appear in copy-able form in the text box below the Log list. Select the filename here, then paste it into your preferred file-find utility and proceed to search. When found, move it to an existing library, or add a new library reference, as appropriate.

 

Using the Resource Manager Effectively

A Common (and Easy) Approach

  • Keep one general resource library on each computer, containing all your IES, MXMs, HDRs, etc. organized in folders as you see fit. This is where resources common to many projects can be kept and shared. Unless you have thousands of resources, it is not necessary to link one library to MXMs only, one to HDRs only, etc. In the screenshot above, adding a single library path to 'Modeling Resources' will suffice to fix everything.
  • Keep any project-specific resources in the project's 'Resources' folder. If you decide later that a something is best kept in the general library, just move it there; the path will be corrected on the next render (as long as there is a reference to that general library).
  • (Alternately, you could set paths to libraries designated for each project.)
Transferring projects between workstations

When moving to another workstation for the first time:

  • Copy your project, including it's 'Resources' folder.
  • Copy the entire resource library. (If you don't want to do this, use the Workstation Transfer command.)
  • Add a searchpath to the library when you first open the project on the new workstation. 

After that, you can freely move just the project (and its project-relative 'Resources' folder, if needed) back and forth, and all of your resources will be re-linked automatically. Do not delete paths to other machines, so these can be used to fix paths if the file is moved back in the future.

Server

Alternately, the main resource library may be set up on a server. (Just add a path to the server in the Resource Manager.)