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

Greg Ward gward at lmi.net
Wed Mar 24 05:25:37 CET 2004


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

pics:	myscene.oct
	rad myscene.rif

myscene.oct:	myscene.rif myobject.rtm
	rad -v 0 myscene.rif

myobject.rtm:	myobject.obj
	obj2mesh myobject.obj > myobject.rtm

# End of John's first Makefile

To use the Makefile, simply type "make" followed either by "view" or 
"pics" depending on whether you want to run rview or rpict.  (If you 
just type "make" you'll get the first target -- "view" -- by default.)

I hope this isn't too confusing.  Consult the make man page if you 
really want a good time.  Just don't type "make love".

-Greg

> From: "John Sutherland" <js0754 at bris.ac.uk>
> Date: March 23, 2004 4:46:50 PM PST
>
Question : Would it be possible to automate the running of obj2mesh in 
a rif file? Or would it need to be done with C running radiance 
commands?

I want to do this so I can set up maya with some mel scripts to output 
obj files and radiance parameters, then I need to run obj2mesh on some 
models before compiling, so that any old dummy can use my maya file to 
get some radiance results.

Cheers for all the help you guys have been giving me recently…..

John Sutherland




More information about the Radiance-general mailing list