Rendering学習日記

日々、3DCGの世界は進歩しています。勉強して理解したことをまとめていきます。RenderMan互換レンダラーやグローバル・イルミネーション。いろんなことに好奇心を持って、面白くなる。目指せShader書き!!
ありがとうございます。

XRT Renderer2.5 動きました。

Windows only.
it works under Windows11.
Thank you.

C:\xrt-2.5.0>set PYTHONPATH=;C:\xrt-2.5.0\\bin
C:\xrt-2.5.0>set OIIO_LIBRARY_PATH=C:\xrt-2.5.0\\plugins
C:\xrt-2.5.0>set RENDERER=xrt
C:\xrt-2.5.0>set COMPILER=oslc
C:\xrt-2.5.0>set TEXER=maketx
C:\xrt-2.5.0>set LIB=;C:\xrt-2.5.0\\lib
C:\xrt-2.5.0>set LIBRI=libri
C:\xrt-2.5.0>set INCLUDE=;C:\xrt-2.5.0\\include
C:\xrt-2.5.0>set SHADEREXT=osl
C:\xrt-2.5.0>set COMPILEEXT=oso
C:\xrt-2.5.0>set IMAGEEXT=png
C:\xrt-2.5.0>if AMD64 == x86 (call "C:\Program Files\Microsoft Visual Studio 10.0\VC\bin"\vcvars32.bat ) else (call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin"\vcvars32.bat )
C:\xrt-2.5.0>"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio 2008 x86 tools.

Illum2.png
サイトにはつながりにくい。
pygとpythonは、32bitかな?
ImportError: DLL load failed while importing _ribclient: %1 は有効な Win32 アプリケーションではありません。
エラー解決。Python2.7.16の32bitをインストールし、pythonpathを
xrt.batを書き換えたら、python周りは動きました。
set XRT_HOME=%~dp0
set PATH=%XRT_HOME%\bin;c:\python27_32;%PATH%
set PYTHONPATH=c:\python27_32;%XRT_HOME%\bin



以下、過去記事
■2011年3月5日の記事
Structure Synthについて検索していたら、
レイトレーシング・レンダラのXRT Rendererを見つけた。
ダウンロードサイトはこちら
http://xrt.wikidot.com/
Windows Only
インストールに必要なものは、解凍ソフトの7-zip
解凍したら、C:\xrt1.0を環境変数のPathに追加しておく。
次に、Microsoft Visual Studio 10.0 Visual C++ Expressをダウンロードし、インストールしてしまう。
xrt1.0フォルダにある。xrt.bat内の最後の行を以下に書き換える。
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin"\vcvars32.bat

Python2.6.6をインストールしておく。Python2.5との共存はちょっとわからないので、2.5はアンインストールした。

XRT rendererのサイトからexampleもダウンロードしてxrt1.0フォルダに入れておく。

さて、実行方法は、コマンドプロンプトから、
C:\xrt1.0>xrt.bat
C:\xrt1.0>set RENDERER=xrt
C:\xrt1.0>set COMPILER=slc
C:\xrt1.0>set TEXER=maketx
C:\xrt1.0>set LIB=;C:\xrt1.0\\lib
C:\xrt1.0>set LIBRI=libri
C:\xrt1.0>set INCLUDE=;C:\xrt1.0\\include
C:\xrt1.0>set COMPILEEXT=shader.dll
C:\xrt1.0>set IMAGEEXT=png
C:\xrt1.0>call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin"\vcva
rs32.bat
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

続いてexampleフォルダに行き、
C:\xrt1.0\examples\quadrics>make.bat compile
metal01.cpp
ライブラリ .\metal01.shader.lib とオブジェクト .\metal01.shader.exp を作成中
コード生成しています。
コード生成が終了しました。
.\metal01.shader.dll generated !
シェーダを再コンパイルします。
レンダリングは、
C:\xrt1.0\examples\quadrics>make.bat render
フォルダ内のRIBはすべてレンダリングします。
make.bat cleanでフォルダ内の中間ファイルやレンダリング画像を削除してくれます。要は全部バッチファイル内に記述されています。

nVidia GelatoのPygファイルは、QuadroFXなどのカードがなくても、
XRT Rendererがレンダリングしてくれます。
RenderMan RIBでは、Aqsis,BMRT,jrManのサンプルファイルをレンダリングします。
そのほか、Standard Procedural Databases のNeutral File Format (NFF) もレンダリングします。

あと、Structure Synthでつくったモデルをpygで出力するエクスポータが付属しています。Structure Synthのmiscフォルダに入れておくとよいですが、Lookatモジュールが見当たらないということで、動いていません。
要検討です。
(\xrt-2.5.0\inputsフォルダに、lookat.pyがあるので、exportしたpygファイルと同じところにコピーしてレンダリングすると動きます。)2025.4.26記述


簡単なpygファイルもレンダリングしました。
spotlightシェーダも影を出すスクリプトをコンパイルしてからレンダリングしたら、きちんと影がでます。
今のところレンダリングは遅いです。マルチスレッド対応してません。
今後に期待したいところです。
シーン記述言語を学ぶ学習ツールとしてはまったりと最適かな、と思います。
ありがとうございます。
  • -
  • -

Pixar RenderMan24.4 install under Linux lite4.2

sudo apt-get -y install alien

sudo alien -cv RenderMan-InstallerNCR-24.4.0_2226589-linuxRHEL7_gcc63icc190.x86_64.rpm

sudo dpkg -i renderman-installerncr_24.4.02226589-1_amd64.deb

sudo alien -cv libicu-50.2-4.el7_7.x86_64.rpm
https://rpmfind.net/linux/rpm2html/search.php?query=libicui18n.so.50()(64bit)

sudo dpkg -i libicu_50.2-5_amd64.deb

cd /etc/ld.so.conf.d

sudo nano hoge.conf

sudo ldconfig

sudo ldconfig -p | grep libicui18n
libicui18n.so.66 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libicui18n.so.66
libicui18n.so.60 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libicui18n.so.60
libicui18n.so.55 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libicui18n.so.55
libicui18n.so.50 (libc6,x86-64) => /usr/lib64/libicui18n.so.50


sudo ./RenderManInstaller

export RMANTREE=/opt/pixar/RenderManProServer-24.4/

export PYTHONPATH=$PYTHONPATH:$RMANTREE/bin
export PYTHONPATH=$PYTHONPATH:$RMANTREE/bin/pythonbindings

Thank you
001.png
002.png
003.png
  • -
  • -

RenderMan24.4をFedora Linux 37にinstall

■RenderMan24.4をFedora Linux 37にインストール際に、出たエラー解決確認方法
インストーラは古いバージョンで動いているので、古いrpmをインストーラにコピーし、
ライブラリは、シンボリックリンクをつくってあげます。
libssl.so.1.0
libcrypto.so.1.0
libtinfo.so.5

-----------------------------------------------------------------------------------------------
sudo ./RenderManInstaller
./RenderManInstaller: error while loading shared libraries: libicui18n.so.50: cannot open shared object file: No such file or directory
-----------------------------------------------------------------------------------------------
■Fedora Linux 37にlibicui18n.so.50がない。
]$locate libicui18n.so
/usr/lib/libicui18n.so
/usr/lib/libicui18n.so.71
/usr/lib/libicui18n.so.71.1
/usr/lib64/libicui18n.so
/usr/lib64/libicui18n.so.71
/usr/lib64/libicui18n.so.71.1


■error01
-----------------------------------------------------------------------------------------------
/opt/pixar/RenderMan-Installer-ncr-24.4/bin/RenderManInstaller: error while loading shared libraries: libicui18n.so.50: cannot open shared object file: No such file or directory
-----------------------------------------------------------------------------------------------
Visit libicu-50.2-4.el7_7.x86_64.rpm package page

Download the Binary Package with given URL

libicu-50.2-4.el7_7.x86_64.rpmをダウンロードしてくる。
■Downloadsフォルダの中で解凍
In ~/Downloads/, unpack the package with

]$ rpm2cpio libicu-50.2-4.el7_7.x86_64.rpm | cpio -idmv

■コピーする。
Copy the files into RenderMan installer folder
sudo cp ~/Downloads/usr/lib64/* /opt/pixar/RenderMan-Installer-ncr-24.4/lib/3rdparty/Qt-5.12.6/lib/

■中身確認
RenderMan-Installer-ncr-24.4]$ cd lib/3rdparty/Qt-5.12.6/lib/
lib]$ ls
libQt5Core.so libQt5Svg.so.5.12
libQt5Core.so.5 libQt5Svg.so.5.12.6 libicudata.so.50
libQt5Core.so.5.12 libQt5Widgets.so libicudata.so.50.2
libQt5Core.so.5.12.6 libQt5Widgets.so.5 libicui18n.so.50
libQt5DBus.so libQt5Widgets.so.5.12 libicui18n.so.50.2
libQt5DBus.so.5 libQt5Widgets.so.5.12.6 libicuio.so.50
libQt5DBus.so.5.12 libQt5XcbQpa.so libicuio.so.50.2
libQt5DBus.so.5.12.6 libQt5XcbQpa.so.5 libicule.so.50
libQt5Gui.so libQt5XcbQpa.so.5.12 libicule.so.50.2
libQt5Gui.so.5 libQt5XcbQpa.so.5.12.6 libiculx.so.50
libQt5Gui.so.5.12 libQt5Xml.so libiculx.so.50.2
libQt5Gui.so.5.12.6 libQt5Xml.so.5 libicutest.so.50
libQt5Network.so libQt5Xml.so.5.12 libicutest.so.50.2
libQt5Network.so.5 libQt5Xml.so.5.12.6 libicutu.so.50
libQt5Network.so.5.12 libQt5XmlPatterns.so libicutu.so.50.2
libQt5Network.so.5.12.6 libQt5XmlPatterns.so.5 libicuuc.so.50
libQt5Svg.so libQt5XmlPatterns.so.5.12 libicuuc.so.50.2
libQt5Svg.so.5 libQt5XmlPatterns.so.5.12.6


■ ~]$ nano .bash_profileで以下を書き込む。
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/pixar/RenderMan-Installer-ncr-24.4/lib/3rdparty/Qt-5.12.6/lib

]$ source .bash_profile

■error02
-----------------------------------------------------------------------------------------------
Failed to get license file Failed to query serial number: an unknown network-related error was detected
-----------------------------------------------------------------------------------------------
the problem is that system has newer libssl version 1.1 (libssl.so.1.1), which is not compatible with RenderManInstaller included QT libraries.But system also has libssl version 1.0, for example libssl.so.1.0.2.

Renderman in requiring old libssl1.0-dev

The installation requested libssl.so.1.0.0 and libcrypto.so.1.0.0 which Fedora 37 does not contain.
The solution is to make symlinks as bellow:

# ln -s /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.1.0.0
# ln -s /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.1.0.0

lib64]$ sudo ln -s libssl.so.10 libssl.so.1.0
lib64]$ ls libssl*
libssl.so libssl.so.1.0.2o libssl.so.1.1.1q libssl.so.3 libssl3.so
libssl.so.1.0 libssl.so.1.1 libssl.so.10 libssl.so.3.0.5
[mac@mac-local lib64]$ ls libcry*
libcrypt.so libcrypto.so.1.0.2o libcryptsetup.so.12
libcrypt.so.1 libcrypto.so.1.1 libcryptsetup.so.12.8.0
libcrypt.so.1.1.0 libcrypto.so.1.1.1q libcryptui.so.0
libcrypt.so.2 libcrypto.so.10 libcryptui.so.0.0.0
libcrypt.so.2.0.0 libcrypto.so.3
libcrypto.so libcrypto.so.3.0.5
lib64]$ sudo ln -s libcrypto.so.10 libcrypto.so.1.0
lib64]$ ls libcry*
libcrypt.so libcrypto.so.1.0 libcrypto.so.3.0.5
libcrypt.so.1 libcrypto.so.1.0.2o libcryptsetup.so.12
libcrypt.so.1.1.0 libcrypto.so.1.1 libcryptsetup.so.12.8.0
libcrypt.so.2 libcrypto.so.1.1.1q libcryptui.so.0
libcrypt.so.2.0.0 libcrypto.so.10 libcryptui.so.0.0.0
libcrypto.so libcrypto.so.3

lib64]$ sudo ln -s libcrypto.so.10 libcrypto.so.1.0

lib64]$ ls libcrypto*
libcrypto.so libcrypto.so.1.0.2o libcrypto.so.1.1.1q libcrypto.so.3
libcrypto.so.1.0 libcrypto.so.1.1 libcrypto.so.10 libcrypto.so.3.0.5

]$ sudo ln -s /usr/lib64/libssl.so.1.0 /opt/pixar/RenderMan-Installer-ncr-24.4/lib/3rdparty/Qt-5.12.6/lib/libssl.so
]$ sudo ln -s /usr/lib64/libcrypto.so.1.0 /opt/pixar/RenderMan-Installer-ncr-24.4/lib/3rdparty/Qt-5.12.6/lib/libcrypto.so


]$ sudo ldconfig


■error03
-----------------------------------------------------------------------------------------------
~]$ prman -version
prman: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
-----------------------------------------------------------------------------------------------
]$ cd /usr/lib64
[mac@mac-local lib64]$ ls libti*
libtic.so.6 libtiff.so.5.8.0 libtimezonemap.so.1 libtirpc.so
libtic.so.6.3 libtiffxx.so libtimezonemap.so.1.0.0 libtirpc.so.3
libtiff.so libtiffxx.so.5 libtinfo.so.6 libtirpc.so.3.0.0
libtiff.so.5 libtiffxx.so.5.8.0 libtinfo.so.6.3

lib64]$ sudo ln -s libtinfo.so.6 libtinfo.so.5

lib64]$ ls libti*
libtic.so.6 libtiff.so.5.8.0 libtimezonemap.so.1 libtinfo.so.6.3
libtic.so.6.3 libtiffxx.so libtimezonemap.so.1.0.0 libtirpc.so
libtiff.so libtiffxx.so.5 libtinfo.so.5 libtirpc.so.3
libtiff.so.5 libtiffxx.so.5.8.0 libtinfo.so.6 libtirpc.so.3.0.0

]$ sudo ldconfig

]$ prman -version
Pixar PhotoRealistic RenderMan 24.4
linked Fri Apr 15 20:13:51 2022 PDT @2226585
build linuxRHEL7_x86-64_gcc63icc190_external_release
copyright (c) 1988-2022 Pixar.


■error04
-----------------------------------------------------------------------------------------------
]$ prman -d it simple.rib
RZ0000 {WARNING}: Stats Init - Stats config file not found in config search path(s): stats.ini
exec failed for /opt/pixar/RenderManProServer-24.4/bin/etc/sbrokerd: No such file or directory
RZ0000 {WARNING}: Session - Failed register live stats server with a broker. Clients will need to explicitly connect to server: 127.0.0.1:42451
R50009 {SEVERE} License location is not set in rendermn.ini - aborting.
RZ0000 {WARNING}: WebSocketStatsServer - Failed to unregister server ID PRManBegin Session_statsserver_9247
-----------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------
]$ prman -d it simple.rib
it: error while loading shared libraries: libicui18n.so.50: cannot open shared object file: No such file or directory
R90011 {SEVERE} Can't open display image simple.tif (System Error: Connection refused)
-----------------------------------------------------------------------------------------------
■nano .bash_profileで以下を書き込む。
#RenderMan
export RMANTREE=/opt/pixar/RenderManProServer-24.4
export PATH=$PATH:$RMANTREE/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/Downloads/usr/lib64

↑前で行った、Downloadsフォルダの中で解凍したlibicu-50.2-4.el7_7.x86_64.rpmの中のusr/lib64をLD_LIBRARY_PATHに追記した。libicui18n.so.50が入っている。



occlusiontest.png
occlusiontest2.png
dome2.png
dome3.png
  • -
  • -
<< 50/50