pcond stdin

I often use temporary files for the following sequence, since pcond doesn't play well with piped input from pfilt. I don't have a detailed understanding of stdin, but is there anything I'm missing? It seems counterintuitive, but maybe it would be faster to run pcond on the full size image (unless it was oversampled by more than double).

rpict scene.oct > highres.hdr
pfilt -x /2 -y /2 highres.hdr > temp.hdr
pcond -s temp.hdr | ra_ppm | convert ...

···

-----Original Message-----

Even if you are going to a program that expects input on stdin, you can redirect it instead:

!fussy_program < input | second_program etc...
____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses

I thought this discussion was on radiance-dev. How did it migrate here?

In any case, we were talking about inline commands in Radiance scene descriptions, not regular Radiance commands.

It is true that pcond likes to be given its file argument. That's because it reads the file twice. Your set of commands could be simplified by:

rpict scene.oct | pfilt -1 -x /2 -y /2 > temp.hdr
pcond -s temp.hdr | ra_ppm | convert ...

The "-1" option of pfilt avoids making two passes on the input to determine exposure, which pcond overrides, anyway.

Cheers,
-Greg

···

From: Christopher Rush <[email protected]>
Date: June 28, 2013 8:55:24 AM PDT

I often use temporary files for the following sequence, since pcond doesn't play well with piped input from pfilt. I don't have a detailed understanding of stdin, but is there anything I'm missing? It seems counterintuitive, but maybe it would be faster to run pcond on the full size image (unless it was oversampled by more than double).

rpict scene.oct > highres.hdr
pfilt -x /2 -y /2 highres.hdr > temp.hdr
pcond -s temp.hdr | ra_ppm | convert ...

-----Original Message-----

Even if you are going to a program that expects input on stdin, you can redirect it instead:

!fussy_program < input | second_program etc...