light: new screenshot script

This commit is contained in:
Eric Wasylishen 2016-06-09 14:15:38 -06:00
parent e0a4b8c113
commit 6fabc92af0
1 changed files with 39 additions and 34 deletions

View File

@ -16,7 +16,7 @@ make_screenshot () {
#strip off .map suffix
map_basename=$(basename $mapname .map)
$LIGHT_EXE -lit -extra4 $params $mapname
$LIGHT_EXE -lit $params $mapname
rm -fdr $QUAKEDIR/tyrutils-screenshots
mkdir $QUAKEDIR/tyrutils-screenshots
@ -38,6 +38,8 @@ wait
wait
setpos $viewpos
fog 0
gamma 0.7
fov 110
r_lightmap $showlightmap
r_drawviewmodel 0
r_drawentities 0
@ -51,7 +53,7 @@ quit
EOF
#launch quake
$QUAKE_EXE -basedir $QUAKEDIR -nolauncher -window -width 1024 -height 768 -game tyrutils-screenshots
$QUAKE_EXE -basedir $QUAKEDIR -nolauncher -window -width 1024 -height 768 -fsaa 8 -game tyrutils-screenshots
#convert the screenshot to jpg
convert $QUAKEDIR/tyrutils-screenshots/spasm0000.tga $imagename
@ -59,39 +61,38 @@ EOF
#dirt
DIRT_VIEWPOS="-1904 -871 847 4 38 0"
AZAD_VIEWPOS="1043 -1704 2282 12 134 0"
AZAD_MAP="ad_azad.map"
make_screenshot dirtdefault.jpg jam2_sock.map "-dirt -dirtdebug" "$DIRT_VIEWPOS" 1
make_screenshot dirtdepth_256.jpg jam2_sock.map "-dirt -dirtdebug -dirtdepth 256" "$DIRT_VIEWPOS" 1
make_screenshot dirtdepth_512.jpg jam2_sock.map "-dirt -dirtdebug -dirtdepth 512" "$DIRT_VIEWPOS" 1
make_screenshot dirtdepth_1024.jpg jam2_sock.map "-dirt -dirtdebug -dirtdepth 1024" "$DIRT_VIEWPOS" 1
DIRT_VIEWPOS="$AZAD_VIEWPOS"
DIRT_MAP="$AZAD_MAP"
make_screenshot dirtgain_0.75.jpg jam2_sock.map "-dirt -dirtdebug -dirtgain 0.75" "$DIRT_VIEWPOS" 1
make_screenshot dirtgain_0.5.jpg jam2_sock.map "-dirt -dirtdebug -dirtgain 0.5" "$DIRT_VIEWPOS" 1
# make_screenshot dirtdefault.jpg "$DIRT_MAP" "-dirt -dirtdebug" "$DIRT_VIEWPOS" 1
# make_screenshot dirtdepth_256.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtdepth 256" "$DIRT_VIEWPOS" 1
# make_screenshot dirtdepth_512.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtdepth 512" "$DIRT_VIEWPOS" 1
# make_screenshot dirtdepth_1024.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtdepth 1024" "$DIRT_VIEWPOS" 1
make_screenshot dirtmode_1_dirtgain_0.5.jpg jam2_sock.map "-dirt -dirtdebug -dirtgain 0.5 -dirtmode 1" "$DIRT_VIEWPOS" 1
# make_screenshot dirtgain_0.75.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtgain 0.75" "$DIRT_VIEWPOS" 1
# make_screenshot dirtgain_0.5.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtgain 0.5" "$DIRT_VIEWPOS" 1
make_screenshot dirtscale_1.5.jpg jam2_sock.map "-dirt -dirtdebug -dirtscale 1.5" "$DIRT_VIEWPOS" 1
make_screenshot dirtscale_2.0.jpg jam2_sock.map "-dirt -dirtdebug -dirtscale 2.0" "$DIRT_VIEWPOS" 1
# make_screenshot dirtmode_1_dirtgain_0.5.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtgain 0.5 -dirtmode 1" "$DIRT_VIEWPOS" 1
# make_screenshot dirtscale_1.5.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtscale 1.5" "$DIRT_VIEWPOS" 1
# make_screenshot dirtscale_2.0.jpg "$DIRT_MAP" "-dirt -dirtdebug -dirtscale 2.0" "$DIRT_VIEWPOS" 1
#sunlight
SUN_POS_A="$DIRT_VIEWPOS"
SUN_POS_B="-1851 499 1057 1 329 0"
SUN_POS="$AZAD_VIEWPOS"
SUN_MAP="$AZAD_MAP"
#TODO: make light support -sunlight flags on command line so these can use the same map file
make_screenshot a_sunlight.jpg sunlight.map "" "$SUN_POS_A" 1
make_screenshot b_sunlight.jpg sunlight.map "" "$SUN_POS_B" 1
make_screenshot a_sunlight2.jpg sunlight2.map "" "$SUN_POS_A" 1
make_screenshot b_sunlight2.jpg sunlight2.map "" "$SUN_POS_B" 1
make_screenshot a_sunlight_plus_sunlight2.jpg sunlight_plus_sunlight2.map "" "$SUN_POS_A" 1
make_screenshot b_sunlight_plus_sunlight2.jpg sunlight_plus_sunlight2.map "" "$SUN_POS_B" 1
make_screenshot a_sunlight.jpg "$SUN_MAP" "-sunlight2 0 -sunlight3 0" "$SUN_POS" 1
make_screenshot a_sunlight2.jpg "$SUN_MAP" "-sunlight 0" "$SUN_POS" 1
make_screenshot a_sunlight_plus_sunlight2.jpg "$SUN_MAP" "" "$SUN_POS" 1
#phong
PHONG_POS="893 887 -252 7 293 0"
PHONG_MAP="ad_crucial.map"
PHONG_POS="$AZAD_VIEWPOS"
PHONG_MAP="$AZAD_MAP"
make_screenshot phong_1_lightmap.jpg "$PHONG_MAP" "" "$PHONG_POS" 1
make_screenshot phong_0_lightmap.jpg "$PHONG_MAP" "-phong 0" "$PHONG_POS" 1
@ -100,16 +101,20 @@ make_screenshot phong_0_normals.jpg "$PHONG_MAP" "-phongdebug -phong 0" "$PHONG_
# bounce
BOUNCE_POS="1186 -1926 2601 20 144 0"
BOUNCE_MAP="ad_azad.map"
BOUNCE_POS="$AZAD_VIEWPOS"
BOUNCE_MAP="$AZAD_MAP"
BOUNCE_OPTS="-sunlight2 0 -sunlight3 0"
make_screenshot bouncescale0.0.jpg "$BOUNCE_MAP" "" "$BOUNCE_POS" 1
make_screenshot bouncescale0.5.jpg "$BOUNCE_MAP" "-bounce -bouncescale 0.5" "$BOUNCE_POS" 1
make_screenshot bouncescale1.0.jpg "$BOUNCE_MAP" "-bounce -bouncescale 1" "$BOUNCE_POS" 1
make_screenshot bouncescale2.0.jpg "$BOUNCE_MAP" "-bounce -bouncescale 2" "$BOUNCE_POS" 1
make_screenshot bouncescale0.0.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS" "$BOUNCE_POS" 1
make_screenshot bouncescale0.5.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncescale 0.5" "$BOUNCE_POS" 1
make_screenshot bouncescale1.0.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncescale 1" "$BOUNCE_POS" 1
make_screenshot bouncescale2.0.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncescale 2" "$BOUNCE_POS" 1
make_screenshot bouncescale0.0_debug.jpg "$BOUNCE_MAP" "-bounce -bouncedebug -bouncescale 0" "$BOUNCE_POS" 1
make_screenshot bouncescale0.5_debug.jpg "$BOUNCE_MAP" "-bounce -bouncedebug -bouncescale 0.5" "$BOUNCE_POS" 1
make_screenshot bouncescale1.0_debug.jpg "$BOUNCE_MAP" "-bounce -bouncedebug -bouncescale 1" "$BOUNCE_POS" 1
make_screenshot bouncescale2.0_debug.jpg "$BOUNCE_MAP" "-bounce -bouncedebug -bouncescale 2" "$BOUNCE_POS" 1
make_screenshot bouncecolorscale0.5.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncecolorscale 0.5" "$BOUNCE_POS" 1
make_screenshot bouncecolorscale1.0.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncecolorscale 1" "$BOUNCE_POS" 1
make_screenshot bouncescale0.0_debug.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncedebug -bouncescale 0" "$BOUNCE_POS" 1
make_screenshot bouncescale0.5_debug.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncedebug -bouncescale 0.5" "$BOUNCE_POS" 1
make_screenshot bouncescale1.0_debug.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncedebug -bouncescale 1" "$BOUNCE_POS" 1
make_screenshot bouncescale2.0_debug.jpg "$BOUNCE_MAP" "$BOUNCE_OPTS -bounce -bouncedebug -bouncescale 2" "$BOUNCE_POS" 1