Microsoft Knowledge Base |
|
HOWTO: Converting SOFTIMAGE 3D Frames to a Quick Time Movie File |
|
|
Last reviewed: March 18, 1997
Article ID: Q165366 |
|
The information in this article applies to:
SUMMARYTo convert SOFTIMAGE 3D frames to a Quick Time movie file, you must first convert your frames to the SGI format, then use the SGI utility moviemaker to create the Quick Time movie file. With IRIX version 5.3 and up, you have the option to render movie files in SGI and Quick Time movie format. There are different compression schemes and you should be advised to perform some tests to find the one that fits its requirements.
MORE INFORMATIONYou can also write a simple shell script to automate the process. The following is an example of one that you can use and modify to its needs. However, knowledge of C shell script writing is required. #!/bin/csh -f if ($#argv == 0) goto usage set softname=$1 shift while ($#argv > 0) if ("$1" !~ \-*) break
switch ("$1")
case "-o":
set output
shift
set postname=$1
breaksw
case "-s":
set sequence
shift
set start=$1
shift
set end=$1
shift
set step=$1
breaksw
case "-e":
set extension
shift
set ext=$1
breaksw
case "-n":
set number
shift
set nmb=$1
breaksw
case "-S":
set size
shift
set xsize=$1
shift
set ysize=$1
breaksw
case "-h":
set halfsize
breaksw
case "-q":
set quartersize
breaksw
case "-v":
set verb
breaksw
default:
goto usage
breaksw
endsw
shift
end
### PRE-PROCESS CHECK ###
if ($?sequence) then else goto usageendif if ($?extension) then else set ext=picendif if (-e $softname.$start.$ext) then else echo -n "\007" inform File not found, please verify. exit 0endif if ($?number) then else set nmb=$startendif if ($?output) then if (-e $postname.000$nmb.sgi || -e $postname.00$nmb.sgi || -e$postname.0$nmb.sgi || -e $postname.$nmb.sgi) then echo -n "Output file already exist, overwrite? (yes/no)[no] : "
set answer=$<
if ($answer == "y" || $answer == "yes") then
else
exit 0
endif
endif
else
set postname=$softnameendif ### BEGINNING OF SCRIPT LOOP ### if ($?verb) then else echo "Preparing sequence for SGI movie file conversion, please wait..."endif while ($start <= $end) if (-e $softname.$start.$ext) then
if ($nmb < 10) set pad=000
if ($nmb >= 10 && $nmb < 100) set pad=00
if ($nmb >= 100 && $nmb < 1000) set pad=0
if ($nmb >= 1000) set pad
if ($?size) then
if ($ext == "pic") then
scale $softname.$start/usr/tmp/SOFT_TMP -S $xsize $ysize
else
${ext}2soft $softname.$start /usr/tmp/SCALE_TMP
scale /usr/tmp/SCALE_TMP /usr/tmp/SOFT_TMP -S $xsize $ysize
endif
else if ($?halfsize) then
if ($ext == "pic") then
scale $softname.$start /usr/tmp/SOFT_TMP -S 360 243
else
${ext}2soft $softname.$start /usr/tmp/SCALE_TMP
scale /usr/tmp/SCALE_TMP /usr/tmp/SOFT_TMP -S 360 243
endif
else if ($?quartersize) then
if ($ext == "pic") then
scale $softname.$start /usr/tmp/SOFT_TMP -S 180 121
else
${ext}2soft $softname.$start /usr/tmp/SCALE_TMP
scale /usr/tmp/SCALE_TMP /usr/tmp/SOFT_TMP -S 180 121
endif
endif
if ($?verb) echo "Converting to $postname.$pad$nmb.sgi."
if ($?size || $?halfsize || $?quartersize) then
soft2sgi /usr/tmp/SOFT_TMP $postname.$pad$nmb
else
if ($ext == "pic") then
soft2sgi $softname.$start $postname.$pad$nmb
else if ($ext == "tga") then
fromtarga $softname.$start.tga $postname.$pad$nmb.sgi
else if ($ext == "als") then
fromalias $softname.$start $postname.$pad$nmb.sgi
else
from$ext $softname.$start.$ext $postname.$pad$nmb.sgi
endif
endif
if (-e /usr/tmp/SOFT_TMP.pic) then
/sbin/rm /usr/tmp/SOFT_TMP.pic
endif
else
echo "File $softname.$start.$ext not found... SKIPPED.";goto SKIP
endif
@ nmb++
SKIP:
@ start += $step
end
if (-e /usr/tmp/SCALE_TMP.$ext) then /sbin/rm /usr/tmp/SCALE_TMP.$extendif echo "\nSequence $postname ready for SGI movie file conversion.\n" loop1: echo -n "Convert now? (y/n): " set answer1=$< if ($answer1 == "y") then loop2:
echo -n "Compression schemes; none mvc1 mvc2 rle rle24 jpeg : "
set answer2=$<
if ($answer2 == "none") then
else if ($answer2 == "mvc1") then
else if ($answer2 == "mvc2") then
else if ($answer2 == "rle") then
else if ($answer2 == "rle24") then
else if ($answer2 == "jpeg") then
else
goto loop2
endif
loop3:
echo -n "Playback option; loop swing once : "
set answer3=$<
if ($answer3 == "loop") then
else if ($answer3 == "swing") then
else if ($answer3 == "once") then
else
goto loop3
endif
echo -n "Specify frame rate (ex.: 10, 15, 30...): "
set answer4=$<
loop5:
echo -n "Resize output movie file? (y/n): "
set answer5=$<
if ($answer5 == y) then
echo -n "Specify x size: "
set answer6=$<
echo -n "Specify y size: "
set answer7=$<
echo -n "Name of output movie file (without extension): "
set answer8=$<
echo
makemovie -c $answer2 -l $answer3 -r $answer4 -s
$answer6,$answer7 -o $answer8.mv $postname.????.sgi
else if ($answer5 == "n") then
echo -n "Name of output movie file (without extension): "
set answer6=$<
echo
makemovie -c $answer2 -l $answer3 -r $answer4 -o
$answer6.mv $postname.????.sgi
else
goto loop5
endif
else if ($answer1 == "n") then
exit 0
else
goto loop1
endif
exit 0
usage: echo "\nsoft2movie V3.0 (1996)" echo "Written by Sylvain Labrosse, SOFTIMAGE Service Bureau.\n" echo "This C shell script prepares a sequence for conversion to SGI movie file" echo "format.\n" echo "Usage:_[1m soft2movie <input file> <-s <start> <end> <step>>_[0m" echo " [-e <extension>] [-o <output file>] [-n <outputstart>]" echo " [-S <xsize> <ysize>] [-h] [-q] [-v]\n" echo " <input file>: input sequence filename." echo " <-s>: <start> input sequence starting frame." echo " <end> input sequence ending frame." echo " <step> input sequence stepping factor.\n"echo "Options: e input file extension. The default is SOFTIMAGE .pic file format." echo " o specifies a different output filename from the input one." echo " n specifies a different starting number for the output sequence." echo " S scales images to x and y value." echo " h scales images to half the video resolution (360x243)." echo " q scales images to one quarter of the video resolution (180x121)." echo " v turns on the verbose mode.\n"echo " Note: When conversion is finished, this script will ask you if you want to" echo " proceed with the final conversion into movie format. Note that your" echo " system can limit the amount of frames to be processed. If so, it is" echo " preferable to do the conversion in sections and link them after.\n" exit 0
REFERENCESIf you have any questions concerning the information contained in this article, contact support@softimage.com by e-mail.
|
|
Keywords : kbgraphic si si3d
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |