(03-10-2016, 05:26 PM)sev Wrote: The advice to use the scripts is well-meaning, but dealing
with the git repo just for a map preview is a bit of an overkill.
Just do what Brot said.- Load your map in the game
- Use the command "r_letterbox 1" in the console to turn off the HUD
- Take a nice screenshot with F12
- Go to the /.xonotic/data/screenshots directory
- Open the screenshot with an image editor, e.g. GIMP
- Crop it so that it has a 4:3 ratio
- Scale it to 512x512 px (weird but standard)
- Save it as a jpg file (~90% quality)
- Put it in the same location as the bsp file, with the same name
It's preferable to take the screenshot in a loseless format like tga or png, not jpg (scr_screenshot_png 1).
Btw the command screenshot accepts a filename in input, optionally with an extension so you can change the output format on the fly without changing the default format (jpg): screenshot mymap.png. Note that it creates the screenshot in data/, not in data/screenshots/.
Slightly better than r_letterbox 1: r_letterbox -1 doesn't reduce image size at all.
Even better, r_draw2d 0 not only hides the HUD but the engine informations too (time, date, netgraph) except fps.
I set up a script that allows you to take a clean screenshot in the png format without changing any setting (and automatically uses the name of the map you are currently playing on):
Code:
alias screenshot_clean "r_drawviewmodel 0; r_draw2d 0; set showfps_save $showfps; showfps 0; wait; screenshot $sv_worldbasename.png; r_drawviewmodel 1; r_draw2d 1; showfps $showfps_save;"
bind k screenshot_clean
copy-paste it in the console and execute it, then press k in game to take a clean screenshot.