1/56 >>

3Delight nsi viewTransformation

■以下はMayaのPerspのチャンネルボックスのデフォルト位置を例として
Translate X: 28
Translate Y: 21
Translate Z: 28
Rotate X: -27.938
Rotate Y: 45
Rotate Z: 0
Scale X: 1
Scale Y: 1
Scale Z: 1

3Delight nsiでは、
SetAttributeAtTime "|persp" -0.20000000000000001
"transformationmatrix" "doublematrix" 1 [ 0.70710678118654791 0 -0.70710678118654713 0 -0.33129457822453973 0.88345220859877216 -0.33129457822454006 0 0.62469504755442384 0.46852128566581852 0.6246950475544244 0 28 21 28 1 ]

これをpython cgkitで計算してみました。
python cgkitで求めてみます。インタラクティブモードを起動
$ python
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cgkit.all import *
移動位置を入力
>>> tr=mat4(1).translation(vec3(28,21,28))
>>> import math
x軸回転を入力
>>> rx=mat4(1).rotate(-27.938*math.pi/180,vec3(1,0,0))
>>> rx
[1, 0, 0, 0]
[0, 0.883455, 0.468516, 0]
[0, -0.468516, 0.883455, 0]
[0, 0, 0, 1]
y軸回転を入力
>>> ry=mat4(1).rotate(45*math.pi/180,vec3(0,1,0))
>>> ry
[0.707107, 0, 0.707107, 0]
[0, 1, 0, 0]
[-0.707107, 0, 0.707107, 0]
[0, 0, 0, 1]
移動、x軸回転、y軸回転の順で積を求める
>>> v=tr*ry*rx
>>> v
[-0.707107, -0.331291, 0.624697, 28]
[0, 0.883455, 0.468516, 21]
[-0.707107, 0.331291, -0.624697, 28]
[0, 0, 0, 1]
転置行列を求める。
>>> v.transpose()
[0.707107, 0, -0.707107, 0]
[-0.331291, 0.883455, -0.331291, 0]
[0.624697, 0.468516, 0.624697, 0]
[28, 21, 28, 1]
できあがり!


■posとtargetから求めるとしたら、RenderManでのplacecam.cをもとに計算してみます。
----------------------------------------
python placecam.py 3 3 3 0 0 0
position: 3.00, 3.00, 3.00
aim: 0.00, 0.00, 0.00
coneangle: 0.0000
roll: 0.00

RIBでのx軸、y軸の角度がわかります。
Rotate -35.26 1.00 0.00 0.00
Rotate 135.00 0.00 1.00 0.00
Translate -3.00 -3.00 -3.00

Translateの行列は、TX,TX,-TZで求めます。python cgkitで計算します。
インタラクティブモードを起動
>>> from cgkit.all import *
>>> tr=mat4(1).translation(vec3(3,3,-3))
>>> import math
>>> rx=mat4(1).rotate(-35*math.pi/180,vec3(1,0,0))
>>> rx
[1, 0, 0, 0]
[0, 0.819152, 0.573576, 0]
[0, -0.573576, 0.819152, 0]
[0, 0, 0, 1]
>>> ry=mat4(1).rotate(135*math.pi/180,vec3(0,1,0))
>>> ry
[-0.707107, 0, 0.707107, 0]
[0, 1, 0, 0]
[-0.707107, 0, -0.707107, 0]
[0, 0, 0, 1]
>>> v=tr*ry*rx
>>> v
[-0.707107, -0.40558, 0.579228, 3]
[0, 0.819152, 0.573576, 3]
[-0.707107, 0.40558, -0.579228, 3]
[0, 0, 0, 1]
>>> v.transpose()
[-0.707107, 0, -0.707107, 0]
[-0.40558, 0.819152, 0.40558, 0]
[0.579228, 0.573576, -0.579228, 0]
[3, 3, 3, 1]

>>> s2=mat4(1).scaling(vec3(-1,1,1))
>>> s3=mat4(1).scaling(vec3(1,1,-1))
>>> s2*v.transpose()*s3
[0.707107, 0, -0.707107, 0]
[-0.40558, 0.819152, -0.40558, 0]
[0.579228, 0.573576, 0.579228, 0]
[3, 3, 3, 1]
>>>
できあがり!
[0.707107 0 -0.707107 0
-0.40558 0.819152 -0.40558 0
0.579228 0.573576 0.579228 0
3 3 3 1]


■視野変換をする。3Delight nsiでは、
-----------------------------------------------------------------------
SetAttributeAtTime "|persp" -0.20000000000000001
"transformationmatrix" "doublematrix" 1 [ 0.57928117234268439 -5.5511151231257827e-17 -0.81512779572855032 0 -0.59748736723752183 0.68023036589218888 -0.42461217046824468 0 0.55447467873732514 0.73299839653179255 0.39404464381712034 0 3.2762530755722121 4.6062003801361309 2.8864228342103333 1 ]

MayaのPerspの位置
Translate X: 3.276
Translate Y: 4.606
Translate Z: 2.886
Rotate X: -47.138
Rotate Y: 54.6
Rotate Z: 0
Scale X: 1
Scale Y: 1
Scale Z: 1

python cgkitで求めてみます。
tr=mat4(1).translation(vec3(3.276,4.606,2.886))
rx=mat4(1).rotate(-47.138*math.pi/180,vec3(1,0,0))
ry=mat4(1).rotate(54.6*math.pi/180,vec3(0,1,0))
v=tr*ry*rx
v.transpose()

インタラクティブモードを起動
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cgkit.all import *
>>> import math
>>> tr=mat4(1).translation(vec3(3.276,4.606,2.886))
>>> tr
[1, 0, 0, 3.276]
[0, 1, 0, 4.606]
[0, 0, 1, 2.886]
[0, 0, 0, 1]
>>> rx=mat4(1).rotate(-47.138*math.pi/180,vec3(1,0,0))
>>> rx
[1, 0, 0, 0]
[0, 0.680235, 0.732994, 0]
[0, -0.732994, 0.680235, 0]
[0, 0, 0, 1]
>>> ry=mat4(1).rotate(54.6*math.pi/180,vec3(0,1,0))
>>> ry
[0.579281, 0, 0.815128, 0]
[0, 1, 0, 0]
[-0.815128, 0, 0.579281, 0]
[0, 0, 0, 1]
>>> v=tr*ry*rx
>>> v
[0.579281, -0.597484, 0.554478, 3.276]
[0, 0.680235, 0.732994, 4.606]
[-0.815128, -0.42461, 0.394047, 2.886]
[0, 0, 0, 1]
>>> v.transpose()
[0.579281, 0, -0.815128, 0]
[-0.597484, 0.680235, -0.42461, 0]
[0.554478, 0.732994, 0.394047, 0]
[3.276, 4.606, 2.886, 1]
>>>


■directionalLightを求める
--------------------------------------------------------------
SetAttributeAtTime "|directionalLight1" 0.20000000000000001
"transformationmatrix" "doublematrix" 1 [ 0.70710678118654746 5.5511151231257827e-17 0.70710678118654746 0 0.5 0.70710678118654746 -0.49999999999999994 0 -0.49999999999999994 0.70710678118654746 0.49999999999999989 0 0 0 0 1 ]

Translate X: 0
Translate Y: 0
Translate Z: 0
Rotate X: -45
Rotate Y: -45
Rotate Z: 0
Scale X: 1
Scale Y: 1
Scale Z: 1

>>> rx2=mat4(1).rotate(-45*math.pi/180,vec3(1,0,0))
>>> rx2
[1, 0, 0, 0]
[0, 0.707107, 0.707107, 0]
[0, -0.707107, 0.707107, 0]
[0, 0, 0, 1]
>>> ry2=mat4(1).rotate(-45*math.pi/180,vec3(0,1,0))
>>> ry2
[0.707107, 0, -0.707107, 0]
[0, 1, 0, 0]
[0.707107, 0, 0.707107, 0]
[0, 0, 0, 1]
>>> v2=ry2*rx2
>>> v2
[0.707107, 0.5, -0.5, 0]
[0, 0.707107, 0.707107, 0]
[0.707107, -0.5, 0.5, 0]
[0, 0, 0, 1]
>>>
>>> v2.transpose()
[0.707107, 0, 0.707107, 0]
[0.5, 0.707107, -0.5, 0]
[-0.5, 0.707107, 0.5, 0]
[0, 0, 0, 1]

ren05_dlRenderSettings1_0001.jpg
  • -
  • -

Installed python cgkit on Mx Linux21.3 using python2.7

LANG=C xdg-user-dirs-gtk-update
sudo apt update
sudo apt upgrade
sudo apt install build-essential

sudo apt install python-is-python2
sudo apt install python2-dev
sudo apt install libode-dev
sudo apt install lib3ds-dev
sudo apt install freeglut3-dev
sudo apt install libboost-all-dev

■Download cgkit.
https://sourceforge.net/p/cgkit/code/ci/master/tree/


glmaterial.py, line 141, in _passPILImage
self.texData(w, h, format, GL_UNSIGNED_BYTE, img.tostring())

replaced tostring() with tobytes().

self.texData(w, h, format, GL_UNSIGNED_BYTE, img.tobytes())

■Download PyProtocol.
http://peak.telecommunity.com/dist/

■Download get-pip.py for 2.7.
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
# python get-pip.py


mak@mx:~/.local/bin
$ ./pip install pygame
$ ./pip install pyopengl
$ ./pip install serial
$ ./pip install pyode
$ ./pip install pillow
$ ./pip install scons

$ unzip PyProtocols-0.9.3.zip
$ sudo python setup.py --without-speedups install

$ ./pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Package Version
----------- -------
future 0.18.3
iso8601 0.1.16
Pillow 6.2.2
pip 20.3.4
pygame 2.0.3
PyODE 1.2.1
PyOpenGL 3.1.7
PyProtocols 0.9.3
PyYAML 5.4.1
scons 3.1.2
serial 0.0.97
setuptools 44.1.1
wheel 0.37.1




$ cd ~/Downloads/cgkit-code/utilities/
mak@mx:~/Downloads/cgkit-code/utilities
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed

The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.

cgkit (all)................... failed


$ ls /usr/lib/x86_64-linux-gnu/libboost_python*.*
/usr/lib/x86_64-linux-gnu/libboost_python39.a
/usr/lib/x86_64-linux-gnu/libboost_python39.so
/usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0

■Download following:
libboost-python1.67.0_1.67.0-17ubuntu8_amd64.deb
libboost-python1.67-dev_1.67.0-17ubuntu8_amd64.deb

$ dpkg -x libboost-python1.67.0_1.67.0-17ubuntu8_amd64.deb usr
$ dpkg -x libboost-python1.67-dev_1.67.0-17ubuntu8_amd64.deb usr

■Copy following:
libboost_python27.so
libboost_python27.so.1.67.0
libboost_python27.a


$ sudo cp libboost_python27*.* /usr/lib/x86_64-linux-gnu/

$ ls /usr/lib/x86_64-linux-gnu/libboost_python*.*
/usr/lib/x86_64-linux-gnu/libboost_python27.a
/usr/lib/x86_64-linux-gnu/libboost_python27.so
/usr/lib/x86_64-linux-gnu/libboost_python27.so.1.67.0
/usr/lib/x86_64-linux-gnu/libboost_python39.a
/usr/lib/x86_64-linux-gnu/libboost_python39.so
/usr/lib/x86_64-linux-gnu/libboost_python39.so.1.74.0

$ ls /usr/lib/x86_64-linux-gnu/lib3ds*.*
/usr/lib/x86_64-linux-gnu/lib3ds-1.so
/usr/lib/x86_64-linux-gnu/lib3ds-1.so.3.0.0
/usr/lib/x86_64-linux-gnu/lib3ds-1.so.3
/usr/lib/x86_64-linux-gnu/lib3ds.so

■scons
$ /home/mak/.local/bin/scons

■changed config.cfg
######################################################################
# Boost.Python settings
######################################################################

# Name of the Boost.Python library to link with
BOOST_LIB = "boost_python27"


####### Libd3DS #######

LIB3DS_AVAILABLE = True
LIB3DS_PATH = r"/usr/lib/x86_64-linux-gnu/"

#LIB3DS_LIBNAME = "lib3ds-120s"


■Build cgkit.
$ python setup.py build


1.Build error;

wrappers/py_arrayslots1.cpp: In function ‘void class_ArraySlots()’:
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
| ^~~~~~~~~~~
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
43 | #define ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
|


1.Build error;

[solved]
py_slot.h,line:43, Put blank spaces on both sides of sname.

>("_" sname "_Iterator",



2.Build error;

wrappers/py_geoms1.cpp: In member function ‘boost::python::api::object _VariableIterator::next()’:
wrappers/py_geoms1.cpp:145:24: error: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string, std::allocator >&, const support3d::VarStorage&, const support3d::VarType&, const int&}](info.support3d::PrimVarInfo::storage, info.support3d::PrimVarInfo::type, info.support3d::PrimVarInfo::multiplicity)’ from ‘std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>’ to ‘boost::python::api::object’
145 | return make_tuple(name, info.storage, info.type, info.multiplicity);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>
wrappers/py_geoms1.cpp: In function ‘boost::python::api::object findVariable(support3d::GeomObject*, std::string)’:
wrappers/py_geoms1.cpp:166:22: error: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string, std::allocator >&, support3d::VarStorage&, support3d::VarType&, int&}](info->support3d::PrimVarInfo::storage, info->support3d::PrimVarInfo::type, info->support3d::PrimVarInfo::multiplicity)’ from ‘std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>’ to ‘boost::python::api::object’
166 | return make_tuple(name, info->storage, info->type, info->multiplicity);
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

2.Build error;
[solved]
py_geoms1.cpp,line:145 and line:166 boost::python::make_tuple

replaced make_tuple with boost::python::make_tuple.

---------------------------------------------------------------------------

■Install cgkit.
sudo python setup.py install --record files.txt

if you uninstall cgkit...
cat files.txt | sudo xargs rm -rf

mak@mx:~/Downloads/cgkit-code/utilities
$ python checkenv.py
-------------------------------------------------do ---------------------
Python 2.7.18 (default, Jul 14 2021, 08:11:37)
[GCC 10.2.1 20210110]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Aug 12 2023)
cgkit (C++ lib)............... OK
cgkit (all)................... OK


$ viewer.py -N softimage demo1.py

$ viewer.py -N softimage demo4.py
pygame 2.0.3 (SDL 2.0.16, Python 2.7.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Texname: 1
Loading "maps/uvmap.png"...

texturing is ok.
It is light and fun.

but pyode1.2.1 is old?
$ viewer.py -N softimage piddemo1.py
The ball moves freely.

Thank you for your support.
  • -
  • -

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

Linux Lite4.2 update and python cgkit error

■cgkit_sample $ viewer.py demo1.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/usr/local/bin/viewer.py", line 63, in
from cgkit.all import *
File "/usr/local/lib/python2.7/dist-packages/cgkit/all/__init__.py", line 46, in
from cgkit import _core
ImportError: libboost_python-py27.so.1.65.1: cannot open shared object file: No such file or directory

■cgkit_sample $ sudo ldconfig -p | grep libboost_python
libboost_python38.so.1.67.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python38.so.1.67.0
libboost_python38.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python38.so
libboost_python27.so.1.67.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python27.so.1.67.0
libboost_python27.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python27.so
■ cgkit_sample $ cd /usr/lib/x86_64-linux-gnu/
■ /usr/lib/x86_64-linux-gnu $ ls libboost*.*
libboost_date_time.so.1.71.0 libboost_python27.so.1.67.0
libboost_filesystem.so.1.71.0 libboost_python3-py38.a
libboost_iostreams.so.1.71.0 libboost_python3-py38.so
libboost_locale.so.1.71.0 libboost_python3.a
libboost_python.a libboost_python3.so
libboost_python.so libboost_python38.a
libboost_python2.so libboost_python38.so
libboost_python27.a libboost_python38.so.1.67.0
libboost_python27.so libboost_thread.so.1.71.0
■ /usr/lib/x86_64-linux-gnu $ sudo ln -s libboost_python27.so.1.67.0 libboost_python-py27.so.1.65.1
■ /usr/lib/x86_64-linux-gnu $ ls libboost*.*
libboost_date_time.so.1.71.0 libboost_python27.so.1.67.0
libboost_filesystem.so.1.71.0 libboost_python3-py38.a
libboost_iostreams.so.1.71.0 libboost_python3-py38.so
libboost_locale.so.1.71.0 libboost_python3.a
libboost_python-py27.so.1.65.1 libboost_python3.so
libboost_python.a libboost_python38.a
libboost_python.so libboost_python38.so
libboost_python2.so libboost_python38.so.1.67.0
libboost_python27.a libboost_thread.so.1.71.0
libboost_python27.so
■ /usr/lib/x86_64-linux-gnu $ sudo ldconfig

■cgkit_sample $ viewer.py demo3.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html

■cgkit-2.0.0/utilities $ python checkenv.py
----------------------------------------------------------------------
Python 2.7.18 (default, Jul 1 2022, 12:27:04)
[GCC 9.4.0]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Nov 26 2018)
cgkit (C++ lib)............... OK
cgkit (all)................... OK

It works.
Thank you.
  • -
  • -

Fedora Linux 37でpython cgkit pyODE install

Fedora30以降、pyODEはパッケージでないので、以下インストールしてみました。
■Download PyODE-snapshot-2010-03-22.tar.gz

■PyODE-snapshot-2010-03-22]$ python setup.py build
INFO: found in /usr/include
INFO: Creating ode_trimesh.c
pyrexc -o ode_trimesh.c -I. -Isrc src/ode.pyx
sh: 行 1: pyrexc: コマンドが見つかりません
ERROR: An error occured while generating the C source file.

■Download Pyrex-0.9.9.tar.gz
$ sudo python setup.py install
copying build/scripts-2.7/pyrexc -> /usr/bin
changing mode of /usr/bin/pyrexc to 755
running install_data
copying Pyrex/Compiler/Lexicon.pickle -> /usr/lib/python2.7/site-packages/Pyrex/Compiler
running install_egg_info
Writing /usr/lib/python2.7/site-packages/Pyrex-0.9.9-py2.7.egg-info

■pyODEのbuild
PyODE-snapshot-2010-03-22]$ python setup.py build
INFO: found in /usr/include
INFO: Creating ode_trimesh.c
pyrexc -o ode_trimesh.c -I. -Isrc src/ode.pyx
/home/mac/Downloads/PyODE-snapshot-2010-03-22/src/mass.pyx:263:18: Warning: 'not None' will become the default in a future version of Pyrex. Use 'or None' to allow passing None.
INFO: Creating ode_notrimesh.c
pyrexc -o ode_notrimesh.c -I. -Isrc src/ode.pyx
/home/mac/Downloads/PyODE-snapshot-2010-03-22/src/mass.pyx:263:18: Warning: 'not None' will become the default in a future version of Pyrex. Use 'or None' to allow passing None.
INFO: Installing with trimesh support.
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/xode
copying xode/errors.py -> build/lib.linux-x86_64-2.7/xode
copying xode/body.py -> build/lib.linux-x86_64-2.7/xode
copying xode/parser.py -> build/lib.linux-x86_64-2.7/xode
copying xode/transform.py -> build/lib.linux-x86_64-2.7/xode
copying xode/geom.py -> build/lib.linux-x86_64-2.7/xode
copying xode/node.py -> build/lib.linux-x86_64-2.7/xode
copying xode/__init__.py -> build/lib.linux-x86_64-2.7/xode
copying xode/joint.py -> build/lib.linux-x86_64-2.7/xode
running build_ext
building 'ode' extension
creating build/temp.linux-x86_64-2.7
gcc -fno-strict-aliasing -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include -I/usr/local/include -I/opt/local/include -I/usr/include/python2.7 -c ode_trimesh.c -o build/temp.linux-x86_64-2.7/ode_trimesh.o
ode_trimesh.c: 関数 ‘__pyx_f_3ode_4Mass_setCappedCylinder’ 内:
ode_trimesh.c:907:3: 警告: ‘dMassSetCappedCylinder’ is deprecated [-Wdeprecated-declarations]
907 | dMassSetCappedCylinder((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4);
| ^~~~~~~~~~~~~~~~~~~~~~
次のファイルから読み込み: /usr/include/ode/ode.h:40,
次から読み込み: ode_trimesh.c:32:
/usr/include/ode/mass.h:84:33: 備考: ここで宣言されています
84 | ODE_API_DEPRECATED ODE_API void dMassSetCappedCylinder(dMass *a, dReal b, int c, dReal d, dReal e);
| ^~~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_4Mass_setCappedCylinderTotal’ 内:
ode_trimesh.c:946:3: 警告: ‘dMassSetCappedCylinderTotal’ is deprecated [-Wdeprecated-declarations]
946 | dMassSetCappedCylinderTotal((&((struct __pyx_obj_3ode_Mass *)__pyx_v_self)->_mass),__pyx_1,__pyx_2,__pyx_3,__pyx_4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ode/mass.h:85:33: 備考: ここで宣言されています
85 | ODE_API_DEPRECATED ODE_API void dMassSetCappedCylinderTotal(dMass *a, dReal b, int c, dReal d, dReal e);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_11Hinge2Joint_setAxis1’ 内:
ode_trimesh.c:8143:3: 警告: ‘dJointSetHinge2Axis1’ is deprecated [-Wdeprecated-declarations]
8143 | dJointSetHinge2Axis1(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5);
| ^~~~~~~~~~~~~~~~~~~~
次のファイルから読み込み: /usr/include/ode/ode.h:42:
/usr/include/ode/objects.h:1986:33: 備考: ここで宣言されています
1986 | ODE_API_DEPRECATED ODE_API void dJointSetHinge2Axis1 (dJointID j, dReal x, dReal y, dReal z);
| ^~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_11Hinge2Joint_setAxis2’ 内:
ode_trimesh.c:8232:3: 警告: ‘dJointSetHinge2Axis2’ is deprecated [-Wdeprecated-declarations]
8232 | dJointSetHinge2Axis2(((struct __pyx_obj_3ode_Hinge2Joint *)__pyx_v_self)->__pyx_base.jid,__pyx_3,__pyx_4,__pyx_5);
| ^~~~~~~~~~~~~~~~~~~~
/usr/include/ode/objects.h:1996:33: 備考: ここで宣言されています
1996 | ODE_API_DEPRECATED ODE_API void dJointSetHinge2Axis2 (dJointID j, dReal x, dReal y, dReal z);
| ^~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_13GeomTransform___cinit__’ 内:
ode_trimesh.c:13433:12: 警告: ‘dCreateGeomTransform’ is deprecated [-Wdeprecated-declarations]
13433 | ((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid = dCreateGeomTransform(__pyx_v_sid);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
次のファイルから読み込み: /usr/include/ode/ode.h:44:
/usr/include/ode/collision.h:1089:36: 備考: ここで宣言されています
1089 | ODE_API_DEPRECATED ODE_API dGeomID dCreateGeomTransform (dSpaceID space);
| ^~~~~~~~~~~~~~~~~~~~
ode_trimesh.c:13436:3: 警告: ‘dGeomTransformSetCleanup’ is deprecated [-Wdeprecated-declarations]
13436 | dGeomTransformSetCleanup(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,0);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/ode/collision.h:1092:33: 備考: ここで宣言されています
1092 | ODE_API_DEPRECATED ODE_API void dGeomTransformSetCleanup (dGeomID g, int mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_13GeomTransform_setGeom’ 内:
ode_trimesh.c:13606:3: 警告: ‘dGeomTransformSetGeom’ is deprecated [-Wdeprecated-declarations]
13606 | dGeomTransformSetGeom(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,((dGeomID)__pyx_v_id));
| ^~~~~~~~~~~~~~~~~~~~~
/usr/include/ode/collision.h:1090:33: 備考: ここで宣言されています
1090 | ODE_API_DEPRECATED ODE_API void dGeomTransformSetGeom (dGeomID g, dGeomID obj);
| ^~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_13GeomTransform_setInfo’ 内:
ode_trimesh.c:13672:3: 警告: ‘dGeomTransformSetInfo’ is deprecated [-Wdeprecated-declarations]
13672 | dGeomTransformSetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid,__pyx_v_mode);
| ^~~~~~~~~~~~~~~~~~~~~
/usr/include/ode/collision.h:1094:33: 備考: ここで宣言されています
1094 | ODE_API_DEPRECATED ODE_API void dGeomTransformSetInfo (dGeomID g, int mode);
| ^~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_13GeomTransform_getInfo’ 内:
ode_trimesh.c:13694:3: 警告: ‘dGeomTransformGetInfo’ is deprecated [-Wdeprecated-declarations]
13694 | __pyx_1 = PyInt_FromLong(dGeomTransformGetInfo(((struct __pyx_obj_3ode_GeomTransform *)__pyx_v_self)->__pyx_base.gid)); if (!__pyx_1) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 521; goto __pyx_L1;}
| ^~~~~~~
/usr/include/ode/collision.h:1095:32: 備考: ここで宣言されています
1095 | ODE_API_DEPRECATED ODE_API int dGeomTransformGetInfo (dGeomID g);
| ^~~~~~~~~~~~~~~~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_11TriMeshData_build’ 内:
ode_trimesh.c:13931:225: 警告: 4 番目の ‘dGeomTriMeshDataBuildSimple’ の引数を渡すときのポインタの先の符号が異なります [-Wpointer-sign]
13931 | dGeomTriMeshDataBuildSimple(((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->tmdid,((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->vertex_buffer,__pyx_v_numverts,((struct __pyx_obj_3ode_TriMeshData *)__pyx_v_self)->face_buffer,(__pyx_v_numfaces * 3));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
| |
| int *
次のファイルから読み込み: /usr/include/ode/collision.h:1087:
/usr/include/ode/collision_trimesh.h:145:51: 備考: expected ‘const dTriIndex *’ {aka ‘const unsigned int *’} but argument is of type ‘int *’
145 | const dTriIndex* Indices, int IndexCount);
| ~~~~~~~~~~~~~~~~~^~~~~~~
ode_trimesh.c: 関数 ‘__pyx_f_3ode_15GeomHeightfield___cinit__’ 内:
ode_trimesh.c:14456:129: 警告: ポインタから異なるサイズの整数へのキャストです [-Wpointer-to-int-cast]
14456 | ((struct __pyx_obj_3ode_GeomHeightfield *)__pyx_v_self)->__pyx_base.gid = dCreateHeightfield(__pyx_v_sid,__pyx_v_data->hfdid,((int)__pyx_v_placeable));
| ^
gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 build/temp.linux-x86_64-2.7/ode_trimesh.o -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/usr/lib64 -lode -lstdc++ -lpython2.7 -o build/lib.linux-x86_64-2.7/ode.so -lode
/usr/bin/ld: 互換性のないを /usr/lib/libc.so スキップしました (-lc を探索している時)

■できたような、buildフォルダにできてます。
■pyODEのインストール
PyODE-snapshot-2010-03-22]$ sudo python setup.py install --record files.txt

INFO: found in /usr/include
INFO: ode_trimesh.c is up to date
INFO: ode_notrimesh.c is up to date
INFO: Installing with trimesh support.
running install
running build
running build_py
running build_ext
running install_lib
copying build/lib.linux-x86_64-2.7/ode.so -> /usr/lib64/python2.7/site-packages
running install_egg_info
Writing /usr/lib64/python2.7/site-packages/PyODE-1.2.0-py2.7.egg-info
writing list of installed files to 'files.txt'
[mac@mac-local PyODE-snapshot-2010-03-22]$

■cgkitでの確認
cgkit-2.0.0]$ cd utilities/
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.18 (default, Aug 22 2022, 00:00:00)
[GCC 12.2.1 20220819 (Red Hat 12.2.1-1)]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (May 04 2020)
cgkit (C++ lib)............... OK
cgkit (all)................... OK
PyODEが入ってます。

■python cgkitで動作確認しました。
$ viewer.py newton-ball.py
Screenshot from 2022-12-31 13-12-10.png
ありがとうございます。
  • -
  • -

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

Fedora Linux 37でpythonの切り替え

■ヘルプ
$ alternatives --help
alternatives バージョン 1.21 - Copyright (C) 2001 Red Hat, Inc.
これは GNU 一般公有使用許諾書の規定の元で自由に再配布することができます。

使用法: alternatives --install <リンク> <名前> <パス> <優先度>
[--initscript <サービス>]

[--family ]
[--follower ]*
alternatives --remove <名前> <パス>
alternatives --auto <名前>
alternatives --config <名前>
alternatives --display <名前>
alternatives --set
alternatives --list
alternatives --remove-all
alternatives --add-follower
alternatives --remove-follower
ーーーーーーーーーーーーーーーーーーーーー
■確認
$ alternatives --config python

3 プログラムがあり 'python' を提供します。

選択 コマンド
-----------------------------------------------
* 1 /usr/bin/python3.8
2 /usr/bin/python2.7
+ 3 /usr/bin/python3.11

ーーーーーーーーーーーーーーーーーーーーー
■アップグレードで削除されたバージョンのpython3.8のパスを削除する。
$ sudo alternatives --remove python /usr/bin/python3.8

ーーーーーーーーーーーーーーーーーーーーー
■確認
$ alternatives --config python

2 プログラムがあり 'python' を提供します。

選択 コマンド
-----------------------------------------------
*+ 1 /usr/bin/python3.11
2 /usr/bin/python2.7

■使用感
1400円で買った、外付け2.5インチSSDケースに、Fedora32からFedora37までにアップグレード。32--->34--->36--->37
5時間かかりました。ありがとうございます。
  • -
  • -

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モジュールが見当たらないということで、動いていません。
要検討です。

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

Structure Synthのtriangle

Structure Synthのtriangleは、templateでの出力には、対応していない。

triangleを使って、pyramidを作る。x軸周りに-90回転、y軸方向に8倍したruleを定義。



// Write EisenScript code here...
rule pyramid {
triangle[0,0,0;1,0,0;0.5,0.5,0.5]
triangle[1,0,0;1,1,0;0.5,0.5,0.5]
triangle[1,1,0;0,1,0;0.5,0.5,0.5]
triangle[0,1,0;0,0,0;0.5,0.5,0.5]
}


rule p2 { { y 4 s 3 8 3 rx -90 color green} pyramid
}
p2
5 * { x 5 }p2

{y -1 s 100 1 100 color white }box

pyramid.png
template出力した。RIBを編集する。
いろいろ、工夫次第です。

ObjectBegin "bbox"
Polygon "P" [0 0 0 1 0 0 0.5 0.5 0.5]
Polygon "P" [1 0 0 1 1 0 0.5 0.5 0.5]
Polygon "P" [1 1 0 0 1 0 0.5 0.5 0.5]
Polygon "P" [0 1 0 0 0 0 0.5 0.5 0.5]
ObjectEnd

Bxdf "PxrDisney" "obj1_mat1" "color baseColor" [0.1 0.4 0.6]
TransformBegin
ConcatTransform[ 3 0 0 0 0 0 -3 0 0 8 0 0 19 0.5 18 1]
ObjectInstance "bbox"
TransformEnd

ありがとうございます。
prmanからの出力、4つのPxrRectLight使用。
structuresynth06.jpg

Structure Synth and RenderMan24.3
structuresynth04.jpg
  • -
  • -

Structure Synth

オープンソースのStructure SynthからRenderMan RIBを出せるようにちょっとやってみた。
http://structuresynth.sourceforge.net/

市松模様づくり参考に試してみました。
http://kyle-in-jp.blogspot.com/2009/07/structure-synth_10.html
RenderMan RIBも出力できるようにテンプレート調整してみた。
structuresynth_.jpg

こちらの記事も参考にしてみた。
http://shin-ishimaru.cocolog-nifty.com/blog/2009/03/structure-syn-1.html
structuresynth2.jpg
地面のレンダリングがずれてしまうので、RIBのTransformをいじってみた。
TransformBegin
Translate 0 -1 0
Scale 300 1 300
#ConcatTransform[ 300 0 0 0 0 1 0 0 0 0 300 0 -149.5 -1 -149.5 1]
ObjectInstance "box"
TransformEnd

RenderMan24.4でレンダリングしました。
ライトは4つ。
Light "PxrRectLight" "light4" "color lightColor" [1 1 1] "float intensity" [3] "float exposure" [0.5] "int traceLightPaths" [1]
ishimaru2.jpg


デフォルトのデータは、こんな感じ
structuresynth.jpg

ということで、カメラ周りは逆行列を求めないといけないので、
python cgkitを使って、ConcatTransformを求めてみました。
以下は、テンプレート抜粋

#placecam.py {CamPosX} {CamPosY} {CamPosZ} {CamTargetX} {CamTargetY} {CamTargetZ}
#up {CamUpX} {CamUpY} {CamUpZ}
# cgkit commandline
# V=mat4(1).lookAt(pos=({CamPosX}, {CamPosY}, {CamPosZ}),target=({CamTargetX}, {CamTargetY}, {CamTargetZ}),up=({CamUpX}, {CamUpY}, {CamUpZ}))
# vt=(V.inverse()).transpose()
# fov {fov}
Scale -1 1 1
ConcatTransform [{CamColumnMatrix}]


ConcatTransform [{CamColumnMatrix}]部分は逆行列にしないとダメなんで、Structure SynthからExportした後、
以下python2.7のインタラクティブモードで、

from cgkit.all import *
V=mat4(1).lookAt(pos=(7.83552, 12.4411, 18.2554),target=(7.92488, -46.149, -34.0976),up=(-0.170831, 0.656364, -0.734849))
vt=V.inverse()
print("ConcatTransform ["+'{:.6f}'.format(vt[0][0])+' '+'{:.6f}'.format(vt[1][0])+' '+'{:.6f}'.format(vt[2][0])+' '+'{:.6f}'.format(vt[3][0])+' '+'{:.6f}'.format(vt[0][1])+' '+'{:.6f}'.format(vt[1][1])+' '+'{:.6f}'.format(vt[2][1])+' '+'{:.6f}'.format(vt[3][1])+' '+'{:.6f}'.format(vt[0][2])+' '+'{:.6f}'.format(vt[1][2])+' '+'{:.6f}'.format(vt[2][2])+' '+'{:.6f}'.format(vt[3][2])+' '+'{:.6f}'.format(vt[0][3])+' '+'{:.6f}'.format(vt[1][3])+' '+'{:.6f}'.format(vt[2][3])+' '+'{:.6f}'.format(vt[3][3])+' '+"]")

求めてみた。
以前、出力の順番を間違えていたので修正しました。ありがとうございます。
structuresynth0.jpg
  • -
  • -

<< RenderMan24.4をFedora Linux 37にinstall 戻る 3Delight nsi viewTransformation >>

1/56 >>