Rendering in Shell Script



                                                   +:::+P~~~:
                                               ,++8888~~8888,oo#
                                              ,,,,++88888888$P@8## @
                                             ,,,$@o##888888$,,+#~#@@
                                            ,,,,@########8$$$,,ooo@@#
                                            ~~,,@########@@@$$$$:#ooo
                                             ~~8####@###@@@@@@@@:::
                                             ~~88888###@@@@@@@@:::               #o
                                              ~8888888P@@@@@@@:::                #+~
                                                88888PPPPPPP@:oo::,~#########,   ##~,
                                                  :PPPPPP@@888@@@888##########~~~,#P~+
                                                       ::###8@@@@,PP##########@P88oPP+
                                       88$$            ::$8~~~~###@@##########@oooooPPPPP8
                                      $ o8$ $       $888:##ooo88@@@@##########@@oooo$$$$$oo
                                      :o~~ooo  888~~    @@####@@@@############@@PPPPP$$$$$
                                    #@$8+++88+~#####@@@@@@$@@@@@@#############@@PPPPP#$
                               $ #P,@ooo$$~$$$::::@~@######@@$$@@###############@@#8@#o,
                                 PP$#,:8$$@@$$$$$PPP@@@@@$8+88@@$$$$#############@@@ @o:
                                      : 8888$PPPPPPP++oooooo@@###@@#@@#############@ @@8
                                       8PPPP88888$$$$$$$$$$$            ###########   ##
                                          ~~~,,,,,,,,,,,,,,::$########o~8#########
                                                         $$#$$$$##o####P888####
                                           #          $#####$$$$$$o####PPP888
                                          #P          @@@::PP$$$$$$~~::#:@@$$
                                                      @@@:+P~$88888@@~$ @@$$$
                                                       @@::$$88888 @@@@@@$$$
                                                       $$$$$$8888      ,,$$
                                                        ~~~~$888
                                                               8




                                          o:ooo+o     o++@@$$8
                                       +P:oooPPPP:o:+#~~:#~~~:::
                                      +++++PPPP88$@~~,,+::PPP,#PP8
                                      $:  8PP888$8@~,,,+++PPP~,PP+:+++:++:::~
                                    ::,,:::@P,8@o$~,,,+++PPPP~~~P+,PPPPP+oooo+++~:
                                   :~,,,:::oo,##@,+$,::::PP$$:~:~+::$$$o8 +PPPPoo+$:o
                                  :~,,,:::oooP+P8~@##::::PPPP~~~~,,@@@@@ @@P           P
                                  ~~,,:::PPPPP#P8,:@++++:::::~~~~##+@@@@@@@PP$$$$8888o88Po
                                 +~::,,:PPP$$#$~8#::++++PPPP~~~~##@@@@@@@@@@PP$$$$$$8+o888o
                                 +:::,,++++$$$~~PP#++++PPPP~~~~###@####@@@@@  $@@$$$$$ $$88P
                                o~ooo,,++++++~~PP#8#+++::PP~~~~##@########@@@88@@$$$$$  $88P
                                o~ooooPPPP++8$PP#88,@@Poo::~~~############@@@88$@$$$$$ 8$@
                                    ooPPP~P#oooPP888:@@@oo:#P###8########  #8888 888P 8+@@,P
                                P:  ,+ ~P#@, ##oPo$~$o@@@,,:###8$P P@@@@    @@@PPPoo88+888o
                                 :8$,o+++++  ,  o$#$+:,:#, ,P#P,8@@@@@@$$$88 P+++++8@@8888~
                                  88$##$,8+P+  o$#$+:  ,,++@   @@~@@$$$88PP#++++++P  888P+
                               ~#::+$$$$88#P## 8#P:      P@@@,    $$888PPP@ooooo 8   $$8
                                    +$$$$88#P+~@~  :@@@@@@++oPP   @@88PPP@ ##@:PP  #$$$$P
                                      +$$$8+#P~~   P88@@@@ P8o+     $@@##  ##8PPP  #$$$@P~
                                         o$~~P~:#  ::,P@@@#@@@@@   #$$@## @##P@##  ###@@P
                                           8P++# #$,,8+@@@#o$@@@#  @8ooo# @#:P@##  ###@@P
                                              o+,$$@$P@@@@#o$@:@# @@8ooo# @@,P@## ####$$P
                                                   :o8@@@#~o$$:@@ @@8oo8,,@8oP@@# @##$$PP
                                                   +o8@@,#~o88~@@@@@$$oo,88:o8$@# o@@88PP
                                                     8P@,@:o88~@@@@@$$Po   P,P$##,,@@88P,
                                                       +,8:o88~@#@$$$$8o      P@8,PP@PPP
                                                          ~o88,@,$$$$$88
                                                            o8@,,$PP8888@
                                                               ,PP






                                             $$$$:
                                            ~####++
                                             ~@@@+

                                   o        ~####++
                         ###PP$$$$##o       ~####++     ~PPPPPPPPPP++++      $             ,::
                         ###Po#####PPP      ~####++        :oooooo::       +$$$      o##~
                         ###Po~~   oPPPo    ~####++          P:oo        +++@@@@@    o##
                         ###Po~~   ~###     ~####++          :PP~       +++@@@@@@@   o##
                         ###PoPPPPP###       ####++       +++PPPPPP~  ::::@@@@@@@@@, o##
                         ###PP~~~~~P$        ####++       ++PPPPPPPP
                         ###PP
                         ###PP
                         ###PP
                          ###P
                          ###P
                          ###P
                          ###


Seems like every year there's a new scripting language of the week - python, Lua, Perl etc etc, but real hackers know that what holds the pipeline together is shell script - so lets have a RM binding for shell script!!!!

It turns out that with some minor sleight of hand, RIB files can be shell scripts too, so you can just run your rib files - embed shell in your ribor rib in your sh! it's all the same.

From there it's small stupid step to implement the whole rendering pipeline in shell script!! Rensh is a basic RenderMan compatable renderer written totally in shell script (with a little help from bc). It can handle all of the quadrics, and patches (including basis conversion). Of course the output is ASCII.

Downloads

You can download the Keynote presentation and Download The Code. If you've got any improvements to the code then email me and maybe we can make this thing even more crazy!

This technique was presented as a Stupid RenderMan Trick at the Pixar user group meeting in Los Angeles, August 2008.

Ian Stephenson.
DCT Systems
NCCA, Bournemouth University