SUMMARY
To launch Katana and work with the various renderer plugins available, you need to make sure that a few environment variables are set up correctly. The easiest way to manage these environment variables at present is to use a launcher batch script to start Katana.
This article provides an example script below that covers all the various renderer plugins, and is ready for usage. It is well commented, and you only need to delete the references to the renderer plugins you don't require in your workflow.
NOTE: If your paths are different for the various components used in this script, then you have to update those paths to the correct location on your system.
If you are yet to install and license Katana on Windows, please view the Installing on Windows User Guide.
CONFIGURING THE LAUNCHER SCRIPT
For instructions on how to modify and use this script, please follow these steps:
- Copy and paste the contents of the script below (Example launcher batch script) into a text editor, for example Notepad.
An example file is also attached, so alternatively download the attached batch script. To edit the .bat file, right-click on the file and choose 'Edit'. - Carefully read through the script, checking if the paths specified are the same on your machine. If not, update them so that they point to the right locations.
- Delete the sections specific to tools that you do not use, for example renderers or custom scripts.
- Save the file as Katana6.0v2.bat and close it.
- Now double-clicking the .bat file or right-click > Open should run the commands and launch Katana with all the necessary environment variables set.
You can check if they have been set correctly, for example, by running these commands in the Python tab:
import os
print(os.environ['KATANA_RESOURCES'])
This should print the paths you have added to KATANA_RESOURCES in the launcher script. - If you would like a desktop icon to click and launch Katana from, you can add this in the following way:
- Right-click on the .bat file > Create shortcut.
- Place the shortcut that is created on your Desktop.
- Right-click the shortcut > Properties > Shortcut tab > Change Icon…
- You may now see a warning saying the .bat file contains no icons. Click okay and you will get the option to choose an icon from a different location.
- Click Browse… and browse to your Katana installation directory (KATANA_ROOT). Select the file WindowsIcon.ico and click Open. Click OK to close the Change Icon dialog and OK to close the Properties window.
You should now have the Katana launcher script shortcut showing the Katana icon available on your Desktop.
KATANA LAUNCHER SCRIPT
Key KATANA environment variables
KATANA_ROOT should point to your Katana installation directory.
PATH is a Windows system variable specifying directories where executable programs are located.
KATANA_RESOURCES provides a list of paths under which to look for plug-ins and other customizations, for example shaders. For more information, please see the Katana Resources Install Guide.
Some batch file commands explained
rem marks a comment; lines beginning with this command will be ignored when Windows runs the script.
@echo off disables the display of the executed commands in a command prompt.
set is the command to set an environment variable. Multiple paths can be separated by a semicolon(;).
The final line, "%KATANA_ROOT%\bin\katanaBin.exe", runs the Katana executable. Once the batch file has reached this line, a command prompt will appear echoing the commands executed by Katana.
Example launcher batch script
@echo off rem -------------------------------------------- rem -------- How to use this script ------------ rem -------------------------------------------- rem -- The KATANA Specific section shows some examples for how you can use the KATANA_RESOURCES environment variable -- rem -- KATANA_ROOT should point to your Katana installation directory. -- rem -- KATANA_RESOURCES drives what gets loaded at startup for KATANA. --
rem -- This is how you load tools and plug-ins, both custom and non-custom ones like commercial renderer plug-ins -- rem -- DEFAULT_RENDERER is the environment variable that drives which renderer plug-in is expected by default in a Renderexporttings node. -- rem -- Delete the settings for the renderers that you do not have installed or do not want to use at the same time. -- rem -- The different renderer plug-ins' requirements for environment variables may change. -- rem -- Please refer to the installation instructions for each particular render plug-in for the most up to date information --
rem -------------------------------------------- rem ------------ KATANA Specific --------------- rem https://learn.foundry.com/katana/dev-guide/EnvironmentVariables.html rem -------------------------------------------- set "KATANA_TAGLINE=Foundry Support" rem -- Define the install location for KATANA -- set "KATANA_ROOT=C:\Program Files\Katana6.0v2"
rem -- Make the example projects like the PyMock asset plugins available in KATANA set "KATANA_RESOURCES=%KATANA_RESOURCES%;%KATANA_ROOT%\plugins\Resources\Examples"
rem !!!!!!!!!!!!! Delete the tools you do not use from the section below !!!!!!!!!!!!!
rem -------------------------------------------- rem ----------- 3Delight Specific -------------- rem https://www.3delight.com/documentation/display/3DFK/Installation rem --------------------------------------------
set "DEFAULT_RENDERER=dl"
rem -- Location of where the main 3Delight package is installed -- set "DELIGHT=C:\Program Files\3Delight" rem -- The 3Delight bin folder is needed in PATH -- set "PATH=%PATH%;%DELIGHT%\bin" rem -- Location of the 3Delight for KATANA plug-in -- set "KATANA_RESOURCES=%KATANA_RESOURCES%;%DELIGHT%\3DelightForKatana" rem -------------------------------------------- rem ------------- Arnold Specific -------------- rem https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_katana_getting_started_ka_Installation_html rem --------------------------------------------
set "DEFAULT_RENDERER=arnold"
rem -- Where you have installed the KtoA plug-in -- set "KTOA_HOME=C:\Program Files\ktoa\ktoa-4.2.2.1-kat6.0-windows" rem -- The KtoA bin folder is needed in PATH -- set "PATH=%PATH%;%KTOA_HOME%\bin" rem -- This is how to load the KtoA plug-in -- set "KATANA_RESOURCES=%KATANA_RESOURCES%;%KTOA_HOME%" rem -------------------------------------------- rem --------- RenderMan 25 Specific ------------ rem https://rmanwiki.pixar.com/display/RFK25/Configuring+Katana rem --------------------------------------------
set "DEFAULT_RENDERER=prman"
rem -- Location of the RenderMan Pro Server installation -- set "RMANTREE=C:\Program Files\Pixar\RenderManProServer-25.1" rem -- Location of the PRman plugin for KATANA -- set "RFKTREE=C:\Program Files\Pixar\RenderManForKatana-25.1\plugins\katana6.0" rem -- This is what is required to load the RfK plugin -- set "KATANA_RESOURCES=%KATANA_RESOURCES%;%RFKTREE%"
rem -- This is a workaround to prevent ImportError with KatanaQueue -- set "PATH=%PATH%;%KATANA_ROOT%\bin" rem -------------------------------------------- rem ----------- Redshift Specific -------------- rem C:\ProgramData\Redshift\Plugins\Katana\6.0v1\launchRedshift4Katana.bat rem --------------------------------------------
set "DEFAULT_RENDERER=redshift"
rem -- Location of the RedShift bin folder -- set "REDSHIFT_HOME=C:\ProgramData\Redshift\bin" rem -- Location of the RedShift plugin for KATANA -- set "REDSHIFT4KATANA_HOME=C:\ProgramData\Redshift\Plugins\Katana\6.0v1" rem -- This is what is required to load the RedshiftForKatana plugin -- set "PATH=%PATH%;%REDSHIFT_HOME%" set "KATANA_RESOURCES=%KATANA_RESOURCES%;%REDSHIFT4KATANA_HOME%" rem !!!!!!!!!!!!! Stop deleting parts of the script. Leave the rest of this script alone !!!!!!!!!!!!! rem -------------------------------------------- rem --------------- Start Katana ---------------
rem https://learn.foundry.com/katana/Content/tg/launch_modes/katana_launch_modes.html rem -------------------------------------------- "%KATANA_ROOT%\bin\katanaBin.exe"
For further reading on launching Katana and the different launch modes available, please refer to the Launching on Windows section of the Katana documentation.
ATTACHMENTS
We're sorry to hear that
Please tell us why