From ZDoom Wiki
Jump to navigation Jump to search

A screenshot is a capture of the screen as an image, created by the screenshot console command, by default bound to the MiniWikipediaLogoIcon.pngprint screen key. ZDoom screenshots are by default in PNG, but PCX screenshots can be made as well by setting the screenshot_type console variable to "pcx".

The screenshot_dir variable, if not empty, will determine where screenshots are written by default. If empty, ZDoom's home directory is used; or the C:\ZDOOMDAT. The -shotdir parameter can also be used and overrides the CVAR.

Other console variables that affect screenshots include:

  • png_gamma: if you have set a high gamma level to compensate for a dark screen, such as an aging MiniWikipediaLogoIcon.pngCRT affected by phosphor decay, it is advised to set a lower gamma level for screenshots if you intend to post them on messageboards, to prevent the colors from being washed out. The default value, means that screenshots use the same gamma as the screen.
  • png_level: change the compression level for PNG screenshots, from 0 to 9. The default value is 5.
  • screenshot_quiet: Determines whether a message is printed or not to announce the screenshot was created.

Creating clean screenshots

You may want to create "clean" screenshots showing only the level, and not the HUD, crosshair, messages, weapon sprite, etc. For this, you can create an alias that will disable these features and then take a screenshot. The following commands, inspired by the Skulltag expansion pack, will create a set of aliases that will allow to save the current configuration in custom variables, hide all parts of the HUD, and restore the saved configuration.

alias	savescrn	"set ep_screenblocks $screenblocks; set ep_crosshair $crosshair; 
                         set ep_show_messages $show_messages"
alias	resetsrn	"r_drawplayersprites 1;crosshair $ep_crosshair;
                         screenblocks $ep_screenblocks;show_messages $ep_show_messages"
alias	hidescrn	"r_drawplayersprites 0;screenblocks 12;crosshair 0;show_messages 0"
alias	cleansrn	"savescrn;hidescrn;wait;screenshot;wait;resetsrn"

In this example, the "cleansrn" command is used to create clean screenshots.

Creating batches of screenshots

The following sequence of console commands will take a screenshot every frame. You can use an external program to assemble these into a video, if desired.

screenshot_type "png"
screenshot_quiet true
alias autoshot "screenshot; wait 1; autoshot"

If you use the autoshot alias, the command alias autoshot will stop automatic screenshot taking before you hit 10000 screenshots (approximately 4 minutes, 45 seconds). (Verification needed)

See also