http://www.not-enough.org/abe/manual/renderman/animation.html
サンプルファイルをコンパイルしてみる。
-------------------------------------------
#include
main()
{
int frame;
char filename[128];
RtColor color = {0.8, 0.0, 0.0};
RiBegin("anim_test.rib");
for(frame = 1; frame <= 10; frame++)
{
RiFrameBegin(frame);
sprintf(filename, "sphere%d.tif", frame);
RiDisplay(filename, RI_FILE, RI_RGBA, RI_NULL);
RiWorldBegin();
RiColor(color);
RiTranslate(frame*0.1 - 0.5, 0.0, 0.0);
RiSphere(1.0, -1.0, 1.0, 360.0, RI_NULL);
RiWorldEnd();
RiFrameEnd();
}
RiEnd();
}
-----------------------------------------
1. anim_test.cで保存。
2. コンパイル
>cl /I%DELIGHT%/include %DELIGHT%/lib/3delight.lib anim_test.c
3. RIBファイルの出力
>anim_test.exe 以下は出力されたRIBファイル。
-----------------------------------------
##RenderMan RIB-Structure 1.0
##Creator 3Delight
FrameBegin 1 # {
Display "sphere1.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate -0.4 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 2 # {
Display "sphere2.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate -0.3 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 3 # {
Display "sphere3.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate -0.2 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 4 # {
Display "sphere4.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate -0.1 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 5 # {
Display "sphere5.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 6 # {
Display "sphere6.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0.1 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 7 # {
Display "sphere7.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0.2 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 8 # {
Display "sphere8.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0.3 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 9 # {
Display "sphere9.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0.4 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
FrameBegin 10 # {
Display "sphere10.tif" "file" "rgba"
WorldBegin # {
Color [ 0.8 0 0 ]
Translate 0.5 0 0
Sphere 1 -1 1 360
WorldEnd # }
FrameEnd # }
-------------------------------------
- -
- -