概括
要启动Katana并使用各种可用的渲染器插件,您需要确保正确设置一些环境变量。目前管理这些环境变量的最简单方法是使用启动器 shell 脚本来启动Katana 。
本文提供了一个示例脚本,涵盖了所有各种渲染器插件,可供使用。它得到了很好的评论,您只需删除对工作流程中不需要的渲染器插件的引用即可。
注意:如果此脚本中使用的各个组件的路径不同,则必须将这些路径更新到系统上的正确位置。
如果您尚未在 Linux 上安装Katana并获得许可,请查看《 在 Linux 上安装用户指南》。
配置启动器脚本
有关如何修改和使用此脚本的说明,请按照以下步骤操作:
- 将以下脚本的内容(示例启动器 shell 脚本)复制并粘贴到文本编辑器中,例如 gedit。还附上了一个示例文件。您可以下载附加的脚本并使用您喜欢的文本编辑器打开它。
- 仔细阅读脚本,检查指定的路径在您的计算机上是否相同。如果没有,请更新它们,以便它们指向正确的位置。
- 删除特定于您不使用的工具的部分,例如渲染器或自定义脚本。
- 将文件另存为Katana 6.0v2Launcher.sh并关闭它。
- 现在,通过导航到保存该文件的文件夹来在终端中执行该文件。输入
./ Katana 6.0v2Launcher.sh
应运行命令并启动Katana ,并设置所有必要的环境变量。
您可以通过在Katana的 Python 选项卡中运行以下命令来检查它们是否已正确设置:import os
print (os.environ['KATANA_RESOURCES'])
这应该打印您在启动器脚本中添加到KATANA _RESOURCES 的路径。 - 如果您想要一个更短的命令来启动Katana ,您可以通过以下方式添加:
- 找到 .bashrc 文件(通常位于主目录中),然后在 gedit 等文本编辑器中打开它。
- 在底部添加一行,将别名与您创建的可执行脚本的路径相关联:
alias k602='~/Documents/ Katana 6.0v2Launcher.sh'
现在在终端中输入k602
应该运行脚本并启动设置了所有环境变量的Katana 。
KATANA启动脚本
关键Katana环境变量
KATANA _ROOT应指向您的Katana安装目录。
PATH是一个系统变量,指定可执行程序所在的目录。
KATANA _RESOURCES提供了一个路径列表,可在其中查找插件和其他自定义项(例如着色器)。有关更多信息,请参阅Katana资源安装指南。
一些脚本命令解释
' # ' 标记注释;运行脚本时将忽略以此命令开头的行。
export是设置环境变量的命令。多个路径可以用冒号(' : ')分隔。
最后一行 ( $KATANA_ROOT/ katana ) 运行Katana可执行文件。确保KATANA _ROOT 与Katana安装目录的文件夹路径匹配。
示例启动器 shell 脚本
#!/bin/bash
# --------------------------------------------
# -------- How to use this script ------------
# --------------------------------------------
# -- The KATANA Specific section shows some examples for how you can use the KATANA _RESOURCES environment variable --
# -- KATANA _ROOT should point to your Katana installation directory. --
# -- 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 --
# -- DEFAULT_RENDERER is the environment variable that drives which renderer plug-in is expected by default in a Renderexporttings node. --
# -- Delete the settings for the renderers that you do not have installed or do not want to use at the same time. --
# -- The different renderer plug-ins' requirements for environment variables may change. Please refer to the installation instructions for each particular render plug-in for the most up to date information --
# --------------------------------------------
# ------------ KATANA Specific ---------------
# https://learn.foundry.com/ katana /dev-guide/EnvironmentVariables.html
# --------------------------------------------
export KATANA _TAGLINE="Foundry Support"
export KATANA _ROOT=/opt/ Katana 6.0v2
# -- This line loads the example resources that ships with Katana --
export KATANA _RESOURCES=$KATANA_RESOURCES:$KATANA_ROOT/plugins/Resources/Examples
# -- This line is a simple example of how custom shelf scripts can be sourced --
# https://learn.foundry.com/ katana /current/Content/tg/shelf_item_scripts/shelf_item_scripts.html
export KATANA _RESOURCES=$KATANA_RESOURCES:/path/to/ katana _shelves
export KATANA _RESOURCES=$KATANA_RESOURCES:/path/to/ katana _tools
# -- Change this to match the renderer you want to use by default. (arnold, prman, vray, dl) --
export DEFAULT_RENDERER=dl
# !!!!!!!!!!!!! Delete the tools you do not use from the section below !!!!!!!!!!!!!
# --------------------------------------------
# ----------- 3Delight Specific --------------
# https://www.3delight.com/documentation/display/3DFK/Installation
# --------------------------------------------
# -- Please note that 3Delight comes bundled with Katana 3.0+ and can be set up to run without
# -- a specific launcher script at install time --
# -- Source the .3delight_bash or .3delight_csh file from the location where the main 3Delight package is installed--
# -- Please note that 3Delight requires gcc 4.8.3 or higher to run --
# source /usr/local/3delight-2.1.24/.3delight_bash
# --------------------------------------------
# ------------- Arnold Specific --------------
# https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_katana_getting_started_ka_Installation_html
# --------------------------------------------
# -- Where you have installed the KtoA plug-in --
export KTOA_ROOT=/Autodesk/ktoa/ktoa-4.2.2.1-kat6.0-linux
# -- Without these KtoA will not function --
export solidangle_LICENSE=5053@your-server
export ARNOLD_PLUGIN_PATH=$KTOA_ROOT/Plugins
export KATANA _RESOURCES=$KATANA_RESOURCES:$KTOA_ROOT
export PATH=$PATH:$KTOA_ROOT/bin
# -- Optional Environment variables --
#export MAYA_PATH=/usr/autodesk/maya2023
#export MTOA_PATH=/opt/solidangle/mtoa/2023
#export PATH=$ARNOLD_PLUGIN_PATH:/path/to/Yeti/bin:${PATH}
#export ARNOLD_PLUGIN_PATH=/path/to/Yeti/bin:$ARNOLD_PLUGIN_PATH
#export KTOA_LOAD_VERBOSITY=debug
# --------------------------------------------
# --------- RenderMan 25 Specific ------------
# https://rmanwiki.pixar.com/display/RFK25/Configuring+Katana
# https://rmanwiki.pixar.com/display/RFK25/Environment+Variables+in+Katana
# --------------------------------------------
# --This is the location of the RenderMan Pro Server installation--
export RMANTREE=/opt/pixar/RenderManProServer-25.1
# --This is the location of the PRman plugin for KATANA --
export RFKTREE=/opt/pixar/RenderManForKatana-25.1/plugins/ katana 6.0
# --These make sure that the programs can be found, shaders loaded, and all components used--
export PATH=$PATH:$RMANTREE/lib:$RMANTREE/bin
# --This is what is required to load the RfK plugin--
export KATANA _RESOURCES=$KATANA_RESOURCES:$RFKTREE/Resources/PRMan25
# --This points to the Asset Library for examples of certain shaders --
export RMAN_ASSET_LIBRARY = %RMANTREE%/lib/RenderManAssetLibrary
# --This points to the render delegates and allows rendering inside the viewer --
export RMAN_SHADERPATH=$RMANTREE/lib/shaders
export RMAN_RIXPLUGINPATH=$RMANTREE/lib/plugins
# --------------------------------------------
# ----------- Redshift Specific --------------
# --------------------------------------------
export LD_LIBRARY_PATH="/usr/redshift/bin:${LD_LIBRARY_PATH}"
export KATANA _RESOURCES=$KATANA_RESOURCES:/usr/redshift/redshift4katana/ katana 6.0v2
# By default, Redshift "local data" path is set to ~/redshift.
#export REDSHIFT_LOCALDATAPATH=
# !!!!!!!!!!!!! Stop deleting parts of the script. Leave the rest of this script alone !!!!!!!!!!!!!
# --------------------------------------------
# --------------- Start Katana ---------------
# https://learn.foundry.com/ katana /Content/tg/launch_modes/ katana _launch_modes.html
# --------------------------------------------
$KATANA_ROOT/ katana
有关启动Katana和可用的不同启动模式的更多信息,请参阅Katana文档的“在 Linux 上启动”部分。
附件
我们很遗憾听到
请告诉我们