Welcome, Guest. Please Login or Register
Home Help Search Login Register
Page Index Toggle Pages: 1
Send Topic Print
Command line batch file (Read 2030 times)
unltd
Ex Member


Command line batch file
12/06/13 at 16:54:30
 
Hi there,

After some experimentation with different software, I have found picturenaut excellent for creating hdris for lighting.

I have created an hdri using the mkhdri.exe command found in the FAQ

c:> mkhdri -a -co:myCurve.txt -out:myPic.tif myPics\*.tif

I am adapting this for using raw files, and getting good results:

mkhdri -linear -ec -out:myPic.exr DSC_*.NEF

I am slowly stumbling my way through creating a batch file to create multiple hdris from a folder full of different exposure sets.

The first stumbling block I think I need to get around, is being able to specify a range of images to create an hdri from, instead of the wild card DSC_*.NEF.

Eg. DSC_001.NEF+DSC_002.NEF+DSC_003.NEF etc or DSC_001-009.NEF??

This seems like a simple thing, but I have been googling for a while and I am unsure of the exact syntax. Does anybody have any suggestions for where I might look to learn a bit more about this?

Thanks for your time

James
Back to top
 
 
IP Logged
 
karmadillo
Ex Member


Re: Command line batch file
Reply #1 - 03/12/14 at 05:00:12
 
You can create a script to do this.
Assuming you're using windows (other OS have equivalent functionality but different syntax).

Drag and drop is a nice flexible way to do this that can cope with different bracket amounts.
Here is how I did it.

@echo off
if [%1]==[] goto :eof
SET /P outputfile=[What shall I name the output file?]
E:\Programs\picturenaut\MKHDRI.exe -a -gr -ci:"E:\Photos\Calibration\HDR\Picturenaut-calibration-output" -out:%outputfile%.exr %*
:eof
exit

In this example you drag all brackets onto the batch file, and it makes them into one HDRI.
It first asks you what to name the output file.
It supplies all of the images you dragged using %* to mkhdri
In this example I have enabled ghost removal and specified a pre-calculated response curve.

There is some good reference material at http://ss64.com/nt/syntax.html for writing batch files.
Back to top
 
 
IP Logged
 
unltd
Ex Member


Re: Command line batch file
Reply #2 - 03/25/14 at 19:03:39
 
Thank you for the reply!

Works well for me, I added picturenaut's path to the windows environment variables and then use this with .NEFS:

@echo off
if [%1]==[] goto :eof
SET /P outputfile=[What shall I name the output file?]
MKHDRI.exe -linear -out:%outputfile%.exr %*
:eof
exit

I will have a look at hat link to see if I can figure out how to modify the batch file to create multiple outputs from multiple batches of exposures, but I suspect it will be beyond me Smiley

Thanks again

James
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print