>--- Forwarded mail from [email protected]
>
>Date: Tue, 16 May 2000 12:53:41 -0400
>To: [email protected]
>From: Chris Pelkie <[EMAIL PROTECTED]>
>Subject: Re: [opendx-users] batch process
>Reply-To: [email protected]
>
>Yippee !
>
>Yes, there are Images (and Display) in the net. I want to redirect the images
>from a window to a file. Must I remove the Image modules from the net and
>replace with some sort of WriteImage, or is there an easier way (to keep the
>original net nearly intact) ?
>
>Yes, I want to modify values for different runs. I assume that I have to study
>the .cfg file to find what keywords to replace using my favorite, fancy
>editing
>process. Any tricks to figuring out the format of the .cfg ?
>


If you are using Image to generate the Camera, and it's changing, you're
probably stuck with having the Image window appear while the job is running
(giving you a nice monitor that something is happening).

If you are generating a Camera some other way (reading in a previously
Exported "good view" for example), you can Route off the Image and send the
Rendered image (object + camera fed to Render) to WriteImage. I usually put
in a Route on WriteImage so while testing I turn on Image, off WriteImage,
then flip these switches the other way for output. Having Image routed off
decreases out of memory problems due to cache filling up in mid-job.
Usually in the middle of the night (actually, usually 2 minutes after you
leave work while leaving an "all-night" render job running).

So, in case the last paragraph wasn't clear: use Image to pick the right
view. Hook up Export to the Camera output of Image. Run the net once.
Unhook and toss Export (or Route it off if you plan to do this again). Put
an Import just before Render and read in the camera.dx file you just saved
to disk. Now you can route the objects to Render that you are routing to
Image, but the exported/reimported camera is the same view you just saw in
Image, so you'll render the same picture, but bypassing Image, therefore
you can Route it off for the render job.

Modifying values: AARGH!
Here's how I did it in brief. I religiously attached Transmitters to every
interactor I wanted to modify later. These made finding them in the net a
lot easier. Otherwise, there are 37 Scalars, 25 Vectors, etc. Obviously,
give them good unique names.

Then search the net file after saving it to find them. Identify the formal
module ID number and name corresponding to the one you want to modify (looks
like "main_Scalar_1_in_3 = 0.3;", but you know which Scalar Scalar_3 is
because it's attached to your named Transmitter back up in the net
somewhere. Go to the end of the net and you'll see all the initialization
statements that set the initial values of modules. Find the one that
corresponds to the module and input you want to change on each batch run.
With awk or by hand, insert an identical statement BELOW the saved
initialization statement (or modify that same statement) entering the value
you want this batch run to use. Modify all other changing values similarly.
DX uses the last one it sees if more than one are identical references to
the same input. Save the net and execute.

Try this on a really small simple net first to get the hang of it.
You'll find that your initialization statements CANNOT be simply appended
to the end of the net, since the "go" commands are at the very end. What my
script did was make a first pass through a net and dug out all Interactors,
Colormaps, etc. and made a file I could browse. It listed all my given
names for Transmitters or in some cases read the Notation field (Probes,
Colormaps, etc.). Once I had made a customized abbreviated list of only
those initialization statements that needed to be changed, I built them
into a csh script and parameterized them. Then a second awk script read in
the net, cut off the "go" statements at the end, appended my parameterized
modified initialization statements at the end of the truncated net, then
reappended the go statements, saved and executed the net.

It works, but it's a bunch of work to automate.

Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]
(607) 257-8335 or (607) 254-8794

Reply via email to