Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How to make preview image for map?

#1
MOD EDIT 2019: updated instructions are on the wiki now: Mapping - Map Picture

In Quake3 was a console command "levelshot", created image  preview of the map based on the location of the info_intermission entity. Is there a similar method for Xonotic, or preview for map should be done manually?
Reply

#2
type in console r_letterbox 1
press f12
copy the screenshot from your screenshot folder. Change name to mapname.jpg and put it in the maps folder in your pk3. Smile
I like Bread Smile
Reply

#3
Try running the script <Xonotic basedir>/misc/tools/xonotic-map-screenshot
Reply

#4
(03-09-2016, 11:02 AM)kaadmy Wrote: Try running the script <Xonotic basedir>/misc/tools/xonotic-map-screenshot
I took the directory misc/tools from the git repo "xonotic", because in my Gentoo Linux package xonotic-data does not contain this directory. Start of script generates an error.
Reply

#5
I'm not sure what Gentoo supplies, but the data directory wouldn't have it anyway.

As for the script; It appears to just screenshot a random point on the map...
To make it work with Xonotic Git though, use it like this (starting on xonotic directory):

./misc/tools/xonotic-map-screenshot dance

Change dance with the bsp name of your map (minus the extension).
[Image: 230.jpg]
Reply

#6
I copied git repo in my ~/.xonotic/ directory, and try use "xonotic-map-screenshot" script for my current development map. It's not finished successfully.

Code:
[~/.xonotic] ./misc/tools/xonotic-map-screenshot whitemeza                                      
head: : invalid number of lines
Timing not supported.
Found main repo = git@gitlab.com:xonotic/
Repository . enabled because it already exists
Repository data/xonotic-data.pk3dir enabled by default
Repository data/xonotic-music.pk3dir enabled by default
Repository data/xonotic-nexcompat.pk3dir disabled by default, create data/xonotic-nexcompat.pk3dir.yes to enable
Repository darkplaces enabled by default
Repository netradiant enabled by default
Repository div0-gittools disabled by default, create div0-gittools.yes to enable
Repository d0_blind_id enabled by default
Repository data/xonotic-maps.pk3dir enabled by default
Repository mediasource disabled by default, create mediasource.yes to enable
Repository gmqcc enabled by default
Repository xonstat disabled by default, create xonstat.yes to enable
Repository xonstatdb disabled by default, create xonstatdb.yes to enable
Repository wiki disabled by default, create wiki.yes to enable
Client darkplaces/darkplaces-sdl not found, aborting
Reply

#7
MOD EDIT 2019: updated instructions are on the wiki now: Mapping - Map Picture

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
Reply

#8
That would indeed be easier, just one note:
The standard size for map screenshots is 512x512 (at least, that's what all the stock map use).
[Image: 230.jpg]
Reply

#9
(03-11-2016, 12:35 AM)Mario Wrote: The standard size for map screenshots is 512x512

You are right, I corrected it.
Reply

#10
(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.
Reply

#11
(03-11-2016, 09:19 AM)terencehill Wrote: Slightly better than r_letterbox 1: r_letterbox -1 doesn't reduce image size at all.
Good to know, I corrected it.

(03-11-2016, 09:19 AM)terencehill Wrote: It's preferable to take the screenshot in a loseless format like tga or png, not jpg (scr_screenshot_png 1) [...].
Yes, this will produce the best possible raw screenshot.
But it won't make much of a difference, because you still should
scale it down afterwards and save the scaled version in jpg format,
otherwise it greatly inflates the size of the map package.
Reply

#12
Map screenshots are often sent lossy from the server via bytes anyway, so making them top quality and lossless only increases download time.
[Image: 230.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question [NEEDS INFO] how to make the model smoother? (netradiant) Beylet 2 1,540 06-20-2022, 11:50 PM
Last Post: Beylet
  [NEED HELP] Change mapinfo to make a CTF map a CTS map. Bhagwa-Yodhak-69 3 2,696 09-08-2020, 06:03 AM
Last Post: _para
  [SOLVED] How do I make my color depth like this Beagle 3 4,235 01-31-2016, 07:38 AM
Last Post: Halogene
  [SOLVED] Make Slick-Maps Brot 6 6,448 01-25-2016, 04:55 AM
Last Post: Brot
  [SOLVED] How do I make my zoom like back in Nexuiz Beagle 7 5,883 06-26-2015, 09:40 AM
Last Post: Antibody
  [SOLVED] How can i make an icon to quick-start Lan-game ? Old Enzo 3 6,528 12-07-2014, 06:58 AM
Last Post: GoregeousGuy
  [NEEDS INFO] cant download map, black map area jaybates86 5 7,308 10-08-2013, 06:09 AM
Last Post: Halogene
  [SOLVED] How can i make a map? kidx 18 15,320 07-21-2013, 01:46 PM
Last Post: kidx
  [NEEDS INFO] Possible audio bug on Windows 8 Preview build Lee_Stricklin 2 5,367 09-21-2011, 01:03 PM
Last Post: Lee_Stricklin
  [NEEDS INFO] Automatic Updater For The Preview Release unicornsteak 1 3,430 06-24-2011, 08:00 PM
Last Post: It'sMe

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-