[Radiance-general] Re: Looking to automate rendering process of obj2mesh etc

Peter Apian-Bennewitz info at pab-opto.de
Wed Mar 24 10:24:51 CET 2004


Greg Ward wrote:

> Hi John,
>
> The best way to do this is to create a Makefile that manages the 
> creation of auxiliary files needed during rendering (such as meshes).  
> That way, you only run obj2mesh when you really need to -- i.e., when 
> the input file has changed.  Some have used the trick of inserting 
> inline commands in their Radiance scenes that don't actually produce 
> any output, but update some file (such as a luminaire), but I don't 
> recommend this practice as it makes loading of the scene just that 
> much slower, and it generates a warning message, besides.
>
> A simple Makefile might look like the following:
>
> # John's first Makefile
>
> view:    myscene.oct
>     rad -o x11 myscene.rif

minor NB: Tradtionally, the space in front of the command ("rad -o") has 
to be a 'tab' (not 'spaces').

For those with time and interest, the GNU make manual at  
http://www.gnu.org/software/make/manual/  might be highly recommended. 
Print, bound and put it next to the K&R C-book on the shelf. Make allows 
nicely compact (thru slightly magically at first glance) ways to specify 
how to generate your Radiance results from input scenes. Very handy to 
re-understand what one had done at that (already archived) project a 
couple of months/years ago.
Technically there are other make implementations around; their core is 
compatible, while GNU's make has some nice features others don't have, 
and it should be available on all platforms. "scons" was mentioned by 
some folks as a replacement of make, - I don't know about its 
capabilities, other that it runs on Windows.

-Peter

-- 
 pab-opto, Freiburg, Germany, http://www.pab-opto.de





More information about the Radiance-general mailing list