Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!slxsys!dircon!uad1077 From: uad1077@dircon.co.uk (Ian Kemmish) Newsgroups: comp.graphics Subject: Re: Shading Language (was: AT&T Pixel machine) Message-ID: <1991AMSat.23.12400@dircon.co.uk> Date: 24 Mar 91 11:54:20 GMT References: <12303@ur-cc.UUCP> , <1991Mar18.191838.3220@pixar.com> Organization: The Direct Connection, UK Lines: 42 po0o+@andrew.cmu.edu (Paul Andrew Olbrich) writes: >An easy way to do this is to have your renderer be a big archive or >library, and then describe a scene to be rendered using a language such as C. >(With a RenderMan-ish syntax.) The scene description is then compiled and >linked to the rendering library, forming a big executable which generates >your image. >You do get the linking overhead, and wind up with a large executable, but this >far outweighs the flexibility you get from describing your scenes in C. >It is also >trivial to write shading routines (again in C) that are called by the rendering >library. >In comparison to the way most of the existing PD renderers work, this method >gives you the extreme flexibility of using a language for scene and shading >descriptions, by using an existing parser (the C language.) You avoid the >icky business about writing a compiler/loader for the shading routines that the >user writes, too. >Does this make sense? ... (I'm a little incoherant at the moment after pulling >an all-nighter... my apologies.) >Drew Olbrich >po0o@andrew.cmu.edu An alternative which maintains portability of the scene description (without recompiling:-]) is to use an interpreted language for the shaders, mingled in the same stream as the geometry information (though suitably delimited, of course!). I'm no expert at writing interpreters, but even in my humble effort, most of the optimisations that Pixar's paper at last year's SIGGRAPH mention come out in the wash. Someone who knew what he was doing could probably make the interpreter overhad disappear altogether:-). -- Ian D. Kemmish Tel. +44 767 601 361 18 Durham Close uad1077@dircon.UUCP Biggleswade ukc!dircon!uad1077 Beds SG18 8HZ United Kingdom uad1077@dircon.co.uk