proposal: switching executables from within rad?

Hi folks,

this is something that was first proposed by Carsten in his Radzilla documentation:

"'radz' has one additonal option: you can set the name of the executable to call. This is very helpful in case you have several RADIANCE versions in parallel. The option name is '-x', example:

$> radz -x rzvu -o x11 test.oct /or/
$> radz -x rpict_xyz25_b test.oct /or whatever/...

If -x is not set, the RADZILLA execs will be run (either 'rzpict' or 'rzvu', dependent on the additional setting of -o x11)."

Obviously noone ever cared about it later. Still, I think it may be useful, so I try to describe...

Radzilla provides a radz-tool, compareable to rad, which controls the rendering and filtering processes. As Radzilla heavily depends on Radiance, Carsten spent some time on integrating both, and one thing he did was adding an x-option to radz, which specifies the renderer to use.

E.g. radz -x rpict will use rpict, radz -x rzpict would run rzpict, radz -x rvu would open the preview.

I think this is a very elegant solution, even better then using the -o devices, as it allows e.g. combining binaries from different releases, or alternative projects such as radzilla, or patched tools, and still control all by rad without a need of symlinks, PATHs and so on.

While I like the solution in Radzilla, I guess it would become even better if these options would not be set as a command line option, but either as a optional variable in the rif-file or as an environment variable. I would also propose this to be a general mechanism for all tools that are called from inside rad. So my proposal would add optional xrpict, xmkillum, xoconv, xrvu, ... variables, which by default would be the radiance distribution's (that rad came witch) binaries, overwritten by environment variables, overridden by rif-file variables.

So... I could use all filters e.g. from the most recent radiance release, and combine with a pmap-extended rpict. Or I could run my renderings using radiance's rad, and by setting an environment variable xrpict=rzpict could re-run all using rzpict to compare.

The reason I would like to have this is that I am currently processing the same scene, views using radiance classic, and older radiance+pmap and radzilla. I could go with scripts setting PATHs, doing symlinks and all that - but this is errorprone and not very transparent. I also think that these variables would be both helpful for folks having different radiance-releases installed (but only on is called from the PATH) or for debugging and development. So what do you think, would this be a reasonable addition to the already crowded rad-world of options and variables?

CU Lars.

Hi Lars,

This is an interesting proposal. One way to do this would be to allow an executable to be named before options with the oconv, mkillum, and pfilt variables. Variables could likewise be added for rpict and rvu, with the render variable used for both. This with offer the further facility of having separate options for the two programs, which rad currently doesn't support but I've wished for now and again.

I'll work on this when I get some time.

Cheers,
-Greg

One way to do this would be to allow an executable to be named before options with the oconv, mkillum, and pfilt variables.

I thought about this, still I am a bit worried that this may break existing scenes' rif-files.

It would be much better not to add all those variables but extend the existing ones, of course.

CU Lars.

It shouldn't break anything. If the rad input file doesn't have a command at the start of an oconv or mkillum or pfilt option, it will use the default executable. What's the problem? The only issue would be using a new format rad input file with an old version of rad, but that's going to happen no matter what we do.

-Greg

···

From: "Lars O. Grobe" <[email protected]>
Date: December 17, 2008 8:54:56 PM PST

One way to do this would be to allow an executable to be named before options with the oconv, mkillum, and pfilt variables.

I thought about this, still I am a bit worried that this may break existing scenes' rif-files.

It would be much better not to add all those variables but extend the existing ones, of course.

CU Lars.

This is now done and checked into HEAD.

-Greg

···

From: "Gregory J. Ward" <[email protected]>
Date: December 17, 2008 7:56:37 PM PST

Hi Lars,

This is an interesting proposal. One way to do this would be to allow an executable to be named before options with the oconv, mkillum, and pfilt variables. Variables could likewise be added for rpict and rvu, with the render variable used for both. This with offer the further facility of having separate options for the two programs, which rad currently doesn't support but I've wished for now and again.

I'll work on this when I get some time.

Cheers,
-Greg