VGMaps
November 20, 2017, 03:58:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: CreateMap tool  (Read 6557 times)
0 Members and 1 Guest are viewing this topic.
createmap
Newbie
*
Offline Offline

Posts: 3


« on: June 19, 2010, 09:43:14 PM »

Hi,

I created a small free software tool that can be helpful for automatically creating maps for some kinds of games, using videos. It's stored here: http://github.com/hmoraldo/createmap

The concept it's based on is not new, it's called image mosaicing. But perhaps this tool can be useful to you when working on game maps, or even for creating maps for other things too: it can be used to extract backgrounds from cartoons too, and also for some kinds of real-life videos too (eg. a film scene of a city as seen from a plane).

I had a lot of fun using this myself, but I think it would be cool if I could see what other people generate using this tool. I don't have too much time to keep coding for it myself but patches are welcome.

If there is interest, I can explain how this can be used and show some examples. The tool is not perfect; it works best for sidescrollers (in whatever axis) but it can also be used for games that move in any direction.

I hope you are interested on this.

Thanks!
Logged
createmap
Newbie
*
Offline Offline

Posts: 3


« Reply #1 on: June 19, 2010, 09:47:15 PM »

To better understand what the tool does and what it doesn't do, this is the typical workflow using the tool:

1) you capture a video yourself or you download a video (eg. a youtube flv, quality doesn't matter much... if you download it the end result won't be yours though, but it's good for testing)

2) you use ffmpeg to convert all the video frames to independent images; after that, perhaps you remove some of those images to ensure only a specific level from the video is processed (eg. you remove the game intro scene)

3) some program configuration (what to process)

4) you process the images with this program

5) when the processing is finished, you get a jpg file with a map that's generated from that specific scene you've chosen

There could be artifacts (depending on how the game works, in the configuration, etc.) and if the images are too big or if the video moves too fast it could take a lot of time, but the results are always interesting to see.

Hope it's useful, let me know if you are interested in any of this.

Thanks!
« Last Edit: June 19, 2010, 09:51:57 PM by createmap » Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #2 on: June 21, 2010, 01:25:17 AM »

Sounds a lot like my Screenshot Autostitcher but with support for lossy video. A few questions:

- How does it handle video at non-native resolution? The image matches might be on non-pixel boundaries.
- How does it decide what to do with artifacted video? Does it average them out?
- What happens to sprites, animated backgrounds, etc?

It's also worth noting that as a rule, screenshot maps should always be produced in a lossless fashion. Having multiple lossy compression stages (video -> JPG -> JPG) must make things somewhat worse.
Logged
The Ultimate Koopa
Hero Member
*****
Offline Offline

Posts: 509


« Reply #3 on: June 21, 2010, 08:03:30 AM »

The only way I can think of this working, at least with emulators that support disabling of seperate backgrounds and sprites, is to record the game as an input file (e.g. a VMB file for Game Boy or Game Boy Advance games), and then play them with the desired layers disabled, and output as an AVI.

I have a feeling, and I'm sure Maxim was also referring to this, that if say, you did a map of a 2D level, then wouldn't your character be spread across in a weird constant line?

Like, say, you had a character that was nothing more than a hyphen (-), wouldn't the result turn out like this:
----------------------------------------------?
Also, is this for Mac or something? I have no idea what GIT files are or PY or whatever.
« Last Edit: June 21, 2010, 08:05:16 AM by The Ultimate Koopa » Logged
createmap
Newbie
*
Offline Offline

Posts: 3


« Reply #4 on: June 21, 2010, 09:15:40 AM »

I only read about your Autostitcher after making my posts; I couldn't try it yet, but according to the comments I could read it looks like your tool is more useful than mine for this kind of maps. It's faster and it can work with higher quality images for that reason.

Quote
- How does it handle video at non-native resolution? The image matches might be on non-pixel boundaries.
- How does it decide what to do with artifacted video? Does it average them out?

I match the full image, not only the map boundaries... so video quality doesn't matter much, as I don't need pixel perfect matches (I do a image difference of the displaced images; then I compute the total error).

Quote
- What happens to sprites, animated backgrounds, etc?

Animated backgrounds are a problem. Sprites, not so much. It depends on the order I use to compose the final image: if I start from the first frame, you'll only see the player character in the last frame, since the only information that you can see for each frame that is not the last one is just a tiny border. For other characters, it depends. But their images are most of the times lost. It's hard to explain why, the point is that every pixel gets overwritten many times, and the last time it's written is the last time such pixel is seen in the video. Most of the times, an enemy character is not there then, there is at least some extra exposure for that pixel. Only if there is not the enemy character gets recorded in the image. If the order that's used for composing the image was reversed, though, the results would change.

Quote
It's also worth noting that as a rule, screenshot maps should always be produced in a lossless fashion. Having multiple lossy compression stages (video -> JPG -> JPG) must make things somewhat worse.

True. I thought this would be useful as a first draft for some games, maybe.

Quote
Like, say, you had a character that was nothing more than a hyphen (-), wouldn't the result turn out like this:

Not if the character was in the center of the screen, for example. It would be erased when all the frames were put together, as explained above.

Quote
Also, is this for Mac or something? I have no idea what GIT files are or PY or whatever.

Sorry, this is the Python source code only. No .exe provided still (but if you install python it should be easy to run it out of the box). I tested it on Linux but it should work in all platforms: Windows, Mac, Linux.

« Last Edit: June 21, 2010, 09:16:43 AM by createmap » Logged
TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #5 on: June 21, 2010, 10:39:04 AM »

It's not a bad idea in theory, but it would defeat the purpose of the site to try and create maps that are as accurate and good-looking as possible. I personally wouldn't find it useful except for games where it's impossible to constantly take screenshots and where a rough version of a level could be used to then recreate the map by hand as it should look.
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
Revned
Hero Member
*****
Offline Offline

Posts: 1091



« Reply #6 on: June 21, 2010, 11:07:33 AM »

I saw an interesting application of photo panorama software awhile back that this tool could probably do. Some guy got on a train and pointed his camera directly out the window. He filmed for awhile, then fed the video into a program similar to this one. He ended up with a *very* long panorama of his train ride.
Logged

TerraEsperZ
Hero Member
*****
Offline Offline

Posts: 2225



« Reply #7 on: June 21, 2010, 02:42:50 PM »

Say, that's not a bad idea. I've always had a hard time thinking outside the box so that never even came to mind. Apparently, the more recent digital cameras use a similar principle to capture a very large panorama, but seeing the same thing applied to a train ride must look cool! My dad, who's a train enthusiast, would undoubtedly love to see the result!
Logged

Current project that I really should try to finish:
-Drill Dozer (GBA)
-Sonic 3D Blast (Genesis)
-Naya's Quest (PC)
-Lilly Looking Through (PC)

Pending project:
-A ton of stuff that will never be finished
bradhig
Newbie
*
Offline Offline

Posts: 6


« Reply #8 on: October 05, 2010, 08:12:47 AM »

Maxim I tried your autosticher on zaxxon in mame and the score at the bottom of the screen and the height gauge on the left side of the screen streeked across the maps covering much of the playfield.  Any way around this?
Logged
Maxim
Hero Member
*****
Offline Offline

Posts: 972



« Reply #9 on: October 05, 2010, 10:27:02 AM »

Yes:

- use the crop settings to cut those bits off, or
- use the mask feature by creating an image which is white for the good pixels and black for the unwanted parts

In this case, I think the mask would be better, although the score probably never overwrites anything important.

Better to post in this thread: http://www.vgmaps.com/forums/index.php?topic=516 since this thread isn't for my stitcher.
« Last Edit: October 05, 2010, 01:34:28 PM by Maxim » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!