Wings 3D Development Forum
Shared an small .bat file - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Programming (https://www.wings3d.com/forum/forumdisplay.php?fid=7)
+--- Thread: Shared an small .bat file (/showthread.php?tid=337)



Shared an small .bat file - povmaniac - 06-07-2013

I want shared an small .bat file for use with .xml YafaRay files.
Is useful for 'drap and drop' files or command line mode.
I also used http://www.xnview.com for view images.

Code:
rem [][][] YAFARAY XML RENDERER BAT FILE [][][]
echo off
rem Example .bat for 'drap and drop' YafaRay .XML files and
rem command line mode. Change params for you own YafaRay configuration
rem
set HOME=C:\YafarayMaster
rem
@if not exist %HOME%\yafaray-xml.exe goto ERROR

rem Set binary file
set BIN=yafaray-xml.exe

rem Set path to plugins
set PLUGINS=%HOME%\plugins

rem Set image format in command line.
rem This option override 'out file' parameter inside .XML scene
rem Types allowed; tga, png, jpg, tif, hdr or exr
rem For use the commandline parameter.. Example: 'this_file.bat' file.xml 'image extension'
rem
set IMAGE=%2

rem If use 'drap and drop' option.. default file format is 'tga'
@if "%IMAGE%"=="" set IMAGE=tga

rem Set verbosity level for YafaRay console messages
set VL= 1
rem set custom message
set CS= "Rendered with YafaRay bat file"

rem  GO!! to render...
%HOME%\%BIN% -vl %VL% -pp "%PLUGINS%" -f %IMAGE% -dp -cs %CS% -op "%HOME%" %1

rem I use a free XnView (http://www.xnview.com/) for view render image
rem This soft no support 'exr' files.. atm.
if "%IMAGE%"=="exr" goto EXR

set VIEWER=h:\XnView\XnView.exe
rem go to view..
%VIEWER% "%HOME%\yafray.%IMAGE%"
goto EXIT

:ERROR
echo !! Not yafaray-xml.exe in your path !!
pause

:EXR
echo !! Xnview not support .exr files. Use other viewer. !!
pause

rem
:EXIT



RE: Shared an small .bat file - oort - 06-07-2013

povmaniac,
Do you have a second computer that you use for rendering? This will come in handy if I ever get a second PC.

I use OpenEXR (exrdisplay.exe) for EXR files... OpenEXR Site

and I use HDRView (hdrview.exe) for HDR files... HDRView Site

To use external viewers for renders directly from Wings3D go Edit > Preferences > User Interface > Enable "View render with external viewer". Then Browse to the external viewer for the various image file formats.

Thanks,
oort


RE: Shared an small .bat file - povmaniac - 06-07-2013

Alone use this .bat to process rapidly files .xml. In some cases, I have lost the original scenes (.blend) and cannot generate them again. With the simple one ' drap and drop ' I can already throw the render.
Regards..


RE: Shared an small .bat file - Neon22 - 09-28-2013

You might also consider LuminanceHDR http://qtpfsgui.sourceforge.net/
for viewing HDR files...
another opensource viewer and tools.