Create a ticket

Q100242: Creating a Katana launcher script for Windows


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 and example script below that covers all the various renderer plugins, and is ready for usage. It is well commented and you only need 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.



For instructions on how to modify and use this script, please follow these steps:

  1. 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'. 
  2. 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.
  3. Delete the sections specific to tools that you do not use, for example renderers or custom scripts.
  4. Save the file as Katana3.6v2.bat and close it.
  5. 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. 
  6. 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.



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. 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 --------------------------------------------

set "KATANA_TAGLINE=Foundry Support"

rem -- Define the install location for KATANA and add binaries to the PATH --
set "KATANA_ROOT=C:\Program Files\Katana3.6v2"
set "PATH=%PATH%;%DELIGHT%\bin"

rem -- Make the example projects like the PyMock asset plugins available in KATANA

rem -- This line is a simple example of how custom shelf scripts can be sourced --
set "KATANA_RESOURCES=%KATANA_RESOURCES%;C:\path\to\katana_shelves"
set "KATANA_RESOURCES=%KATANA_RESOURCES%;C:\path\to\katana_tools"

rem -- Change this to match the renderer you want to use by default. (arnold, prman, vray, dl) --

rem !!!!!!!!!!!!! Delete the tools you do not use from the section below !!!!!!!!!!!!!

rem --------------------------------------------
rem ----------- 3Delight Specific --------------
rem --------------------------------------------

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 --

rem --------------------------------------------
rem ------------- Arnold Specific --------------
rem --------------------------------------------

rem -- Where you have installed the KtoA plug-in --
set "KTOA_HOME=C:\Program Files\ktoa\ktoa-"

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 --

rem --------------------------------------------
rem --------- RenderMan 23 Specific ------------
rem --------------------------------------------

rem -- Location of the RenderMan Pro Server installation --
set "RMANTREE=C:\Program Files\Pixar\RenderManProServer-23.4"

rem -- Location of the PRman plugin for KATANA --
set "RFKTREE=C:\Program Files\Pixar\RenderManForKatana-23.4-katana3.6"

rem -- This is what is required to load the RfK plugin --

rem --------------------------------------------
rem ----------- Redshift Specific --------------
rem C:\ProgramData\Redshift\Plugins\Katana\3.5v1\launchRedshift4Katana.bat
rem --------------------------------------------

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\3.5v1"

rem -- This is what is required to load the RedshiftForKatana plugin --

rem --------------------------------------------
rem -------------- V-Ray Specific --------------
rem --------------------------------------------

rem -- Location of the V-Ray for KATANA install directory. --
set "VRAY_HOME=C:\Program Files\VRay\vray_adv_41002_katana3.0_x64"

rem -- Specific location to call out the plug-in to itsef --
set "VRAY_FOR_KATANA_PLUGINS_x64=%VRAY_HOME%\vrayplugins"

rem -- This is required to access the tools that parse all the shaders --
set "PATH=%PATH%;%VRAY_HOME%\RenderBin"

rem -- This is how the V-Ray plugin gets loaded --

rem --------------------------------------------
rem ------------ Deadline Specific -------------
rem --------------------------------------------

rem -- Location containing Tabs\ from [Repository]\submission\Katana\Client\

rem !!!!!!!!!!!!! Stop deleting parts of the script. Leave the rest of this script alone !!!!!!!!!!!!!

rem --------------------------------------------
rem --------------- Start Katana ---------------
rem rem -------------------------------------------- "%KATANA_ROOT%\bin\katanaBin.exe"



Was this article helpful?

We're sorry to hear that

Please tell us why
9 out of 13 found this helpful


  • Avatar
    Chainarong Wanachaisong

    I have 3 folder content for arnold, katana and alShader but I have no idea after spend a long day to set enviroument varaible to work at all

    katana content

    arnold content

    /opt/solidangle/mtoa/shader/alShaders-linux-1.0.0rc19-ai4.2.12.2/bin (included Args folder)

    CentOS 6.8

    I add more line to /usr/local/Katana2.5v4/katana shell script

    export ARNOLD_PLUGIN_PATH=/opt/solidangle/ktoa/KtoA-1.1-kat2.5-linux/Plugins:/opt/solidangle/mtoa/shader/alShaders-linux-1.0.0rc19-ai4.2.12.2/bin
    export KATANA_HOME=/usr/local/Katana2.5v4
    export KTOA_HOME=/opt/solidangle/ktoa/KtoA-1.1-kat2.5-linux
    export DEFAULT_RENDERER=arnold
    export KATANA_TAGLINE="With KtoA 1.1 and Arnold"
    export PATH=$KTOA_HOME/bin:$PATH

  • Avatar
    Elisabeth Wetchy


    could you please try setting ALSHADER_PATH as a separate environment variable?

    It should look like this:

    export ARNOLD_PLUGIN_PATH=/opt/solidangle/ktoa/KtoA-1.1-kat2.5-linux/Plugins
    export ALSHADER_PATH=/opt/solidangle/mtoa/shader/alShaders-linux-1.0.0rc19-ai4.2.12.2/bin

    [... rest of your shell script goes here...]

    If this doesn't help, please raise a support ticket as described here: Q100064: Using the Support Portal.

  • Avatar
    Chainarong Wanachaisong


    solved I just download new update KtoA-1.1.2-kat2.5-linux from solid angle website (my previous KtoA-1.1.-kat2.5-linux) now it work very well 


    thank for support

    Edited by Chainarong Wanachaisong