Q100272: Linux용 런처 스크립트를 사용하여 타사 렌더러 플러그인으로 Katana 시작하는 방법

팔로우

요약

Katana 시작하고 사용 가능한 다양한 렌더러 플러그인을 사용하려면 몇 가지 환경 변수가 올바르게 설정되었는지 확인해야 합니다. 현재 이러한 환경 변수를 관리하는 가장 쉬운 방법은 시작 프로그램 쉘 스크립트를 사용하여 Katana 시작하는 것입니다.

이 문서에서는 다양한 렌더러 플러그인을 모두 다루고 바로 사용할 수 있는 예제 스크립트를 아래에 제공합니다. 주석이 잘 설명되어 있으며 작업 흐름에 필요 하지 않은 렌더러 플러그인에 대한 참조만 삭제하면 됩니다.

참고: 이 스크립트에 사용된 다양한 구성 요소에 대한 경로가 다른 경우 해당 경로를 시스템의 올바른 위치로 업데이트해야 합니다.

아직 Linux에 Katana 설치하고 라이센스를 부여하지 않은 경우 Linux에 설치 사용자 가이드를 참조하세요.

런처 스크립트 구성

이 스크립트를 수정하고 사용하는 방법에 대한 지침을 보려면 다음 단계를 따르세요.

  1. 아래 스크립트(예제 실행 프로그램 셸 스크립트)의 내용을 복사하여 텍스트 편집기(예: gedit)에 붙여넣습니다. 예제 파일도 첨부되어 있습니다 . 첨부된 스크립트를 다운로드하고 원하는 텍스트 편집기로 열 있습니다.
  2. 스크립트를 주의 깊게 읽으면서 지정된 경로가 컴퓨터에서 동일한지 확인하세요. 그렇지 않은 경우 올바른 위치를 가리키도록 업데이트하세요.
  3. 렌더러나 사용자 정의 스크립트 등 사용하지 않는 도구와 관련된 섹션을 삭제하세요.
  4. 파일을 Katana 6.0v2Launcher.sh 로 저장하고 닫습니다.
  5. 이제 파일이 저장된 폴더로 이동하여 터미널에서 파일을 실행하세요. ./ Katana 6.0v2Launcher.sh 입력하면 명령이 실행되고 필요한 모든 환경 변수가 설정된 Katana 시작됩니다.

    Katana 의 Python 탭에서 다음 명령을 실행하여 올바르게 설정되었는지 확인할 수 있습니다.

    import os
    print (os.environ['KATANA_RESOURCES'])

    그러면 실행 프로그램 스크립트의 KATANA _RESOURCES에 추가한 경로가 인쇄됩니다.
  6. Katana 시작하는 더 짧은 명령을 원할 경우 다음과 같은 방법으로 추가할 수 있습니다.
  • 일반적으로 홈 디렉터리에 있는 .bashrc 파일을 찾아 gedit와 같은 텍스트 편집기에서 엽니다.
  • 맨 아래에 줄을 추가하여 생성한 실행 가능한 스크립트의 경로와 별칭을 연결합니다.

    alias k602='~/Documents/ Katana 6.0v2Launcher.sh'

    이제 터미널에 k602 입력하면 스크립트가 실행되고 모든 환경 변수가 설정된 Katana 시작됩니다.

KATANA 런처 스크립트

주요 Katana 환경 변수

KATANA _ROOT는 Katana 설치 디렉터리를 가리켜야 합니다.
PATH 는 실행 가능한 프로그램이 위치한 디렉토리를 지정하는 시스템 변수입니다.
KATANA _RESOURCES는 플러그인 및 기타 사용자 정의(예: 셰이더)를 찾을 경로 목록을 제공합니다. 자세한 내용은 Katana 리소스 설치 가이드를 참조하세요.

일부 스크립트 명령 설명

' # '은 주석을 표시합니다. 이 명령으로 시작하는 줄은 스크립트가 실행될 때 무시됩니다.
내보내기는 환경 변수를 설정하는 명령입니다. 여러 경로는 콜론(' : ')으로 구분할 수 있습니다.

마지막 줄( $KATANA_ROOT/ katana )은 Katana 실행 파일을 실행합니다. KATANA _ROOT가 폴더 경로와 Katana 설치 디렉터리와 일치하는지 확인하세요.

런처 쉘 스크립트 예시

#!/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에서 실행 섹션을 참조하세요.

첨부 파일

우리는 문제로 불편을 끼쳐 드려 죄송합니다

이유를 알려주세요