Back in February, when we were discussing automated replay logging (http://forum.stunts.hu/index.php?topic=2862.0), at some point I mentioned the Micro Machines-style video of the Z70 winning lap was done using a vectorial track viewer. Thanks to a stroke of good fortune, I am now able to make available a
very rough preview of that viewer. The most interesting thing about it is that there are rendering parameters, as you can see in the attached screenshot. You can, for instance, generate images of different sizes, or adjust the proportions according to which the key track elements are drawn.
The links to the files are provided below. Before that, usage instructions for those of you who wish to test it:
- As usual, I did not test the Windows build in an actual Windows system, so please tell me whether it works or not :) (If you would like a Linux binary instead, just ask and I will prepare one.)
- How to start it: drop the directory inside the zip somewhere (I suggest the folder with your tracks), launch the executable with stcarto viewer from a command line (if the Windows Firewall asks for permission, just allow it), leave it open and navigate in your browser to http://localhost:8023 . That will take you to the interface you see in the screenshot. When you are done, just close the prompt.
- You can retrieve the image files by using "Save Image As..." in the browser.
- Do not open the track viewer in more than one browser window at the same time (it will start failing randomly).
And now, the links:
Windows executable bundle (https://github.com/duplode/stunts-cartography/releases/download/1.0.0.0/stunts-cartography-1.0.0.0-windows-x86_64.zip)(updated in 2022-01-30)
Source code repository (https://github.com/duplode/stunts-cartography)
Incidentally, by digging into the repository you can figure out how that Z70 animation was generated. The really tricky parts related to getting the lap data from DOSBox are, of course, obsolete thanks to dstien's restunts-powered logger. In any case, I will at some point add support for overlaying lap traces to the viewer. I also plan to create an annotation system - that is, overlaying cars, icons, split markers, etc. over the map.
Edit: these features, and quite a few others, were added in subsequent releases.Feedback appreciated, as ever :)
Edit: the link will keep being updated to point at the latest Windows bundle.Edit 2: the repository was moved to Bitbucket, and then to Github.
W O W ! ! ! :o :o :o :o :o
Damn, I have to wait ~10 hours before trying! >:(
I just managed to run the Windows build under Windows only to realize it is not working due to a few missing data files of the interface library >:( I will try to fix it ASAP... Edit: now fixed.
wow wow wow . please fix :)
Quote from: zaqrack on July 30, 2013, 10:00:50 PM
wow wow wow . please fix :)
This should work: http://scr.stunts.hu/files/outrascoisas/stunts-cartography-20130731.zip . By the way, in the first post I had originally told you to navigate to http://0.0.0.0:10000 to open the interface, but that doesn't work on Windows - go to http://localhost:10000 instead.
Quote from: Duplode on July 30, 2013, 08:09:22 PM
[...]build under Windows [...] is not working
Quote from: Duplode on July 31, 2013, 05:04:24 AM
I had originally told you to navigate to http://0.0.0.0:10000 to open the interface, but that doesn't work on Windows
You might want to make your Windows sabotage a bit less obvious...
It's a revenge on Microsoft. :D
I have just prepared a second preview build of the stunts-cartography track viewer, with quite a few niceties for you to play with:
- Now replay files can be opened to view the bundled track. Furthermore, extracting the track is also possible (look for the links in the side bar; they are enabled when a track or replay is loaded).
- Terrain extraction from TRKs and RPLs is supported as well.
- Map cropping: just enter a range of tiles to generate an image of part of the track with minimal effort.
- Four "standard" sets of styling parameters can be picked from the interface.
- A drawing bug with elevated spans is fixed; plus a number of minor improvements to the tile drawings were made.
- Some improvements to the interface - now with proper check and combo boxes!
Download link: http://scr.stunts.hu/files/outrascoisas/stunts-cartography-latest.zip
Usage instructions remain the same given in the first post.
Waiting for your opinions! :) As usual, I couldn't test in a real Windows system, so please let me know if it doesn't work for you.
Quote from: Duplode on July 30, 2013, 08:29:12 AM
I also plan to create an annotation system - that is, overlaying cars, icons, split markers, etc. over the map.
First tests with track map annotations are being done as we speak. A new release with initial support for them is likely within this week(end)...
I delayed the next preview release of stunts-cartography because I needed to reorganize the code a bit so that I wouldn't get lost in it as I added the new features. In any case, the announced annotations feature is already working in the latest development version. So that you don't think I am making up vaporware, annotation support means that there will be a text box in which you type a few instructions like these:
Car @6.5 13 ^270 #lightgray "Chulk"{#gray}
Split 2 @5 11 ^N *3
And get something like this as output:
(http://i49.photobucket.com/albums/f283/Duplode/sc-track-viewer-ann-teaser-2.png)
I should be able to get a new Windows release with that and some other improvements later this week, so stay tuned.
What have I missed?! WOW! :) This looks great.
No more delays: the third release of stunts-cartography is now available! The big new feature this time is, as previously announced, initial support for annotations. In practice, that means you can decorate your track maps with labelled cars, lines and section markers without needing an image editor. There were also a few improvements to the interface, plus several others under the hood. Waiting for your comments - I will particularly appreciate feedback on whether the commands for setting up the annotations are convenient or annoying (they are explained, with some examples, in a help page accessible from the program). And of course, as usual I need you to tell me whether the Windows build works in a real Windows or not :)
Links
Win32 executable: https://bitbucket.org/duplode/stunts-cartography/downloads/stunts-cartography-0.3.0.0-win32.zip
Source code repository (I moved it since the last release): https://bitbucket.org/duplode/stunts-cartography
How many different cars can you handle for the same track? (it would be nice to put the Top Gear replays together - of course only when all of them are already published)
Quote from: CTG on November 22, 2013, 08:22:39 AM
How many different cars can you handle for the same track? (it would be nice to put the Top Gear replays together - of course only when all of them are already published)
There is no hard limit. We might run into RAM consumption issues by trying
really hard, but I believe even 30 cars would be fine. Your idea sounds perfectly feasible; the main issue to consider probably being distinguishing the cars cleanly. As there won't be enough good distinct colours, we will have to resort to captions (and work out how to keep them legible). Overlapping cars might become an annoyance as well, but it would be easy to e.g. replace the default car picture with a bare rounded rectangle outline.
The next version of Cartography, with lap trace and flipbook support, is currently in the "first 90% done" stage: things generally work, but a significant amount of polish is needed before the release. I will resume work on it over the following days in order to, hopefully, get it ready by the time the Z149 LTB counter is started.
Quote from: Duplode on November 24, 2013, 04:17:36 AM
I will resume work on it over the following days in order to, hopefully, get it ready by the time the Z149 LTB counter is started.
Make that Z150. Sorry ::)
How precise is the game in re-generating the coordinates of your cars? Does it calculate only with 1/1024 part of each squares or any fractional numbers are possible? I mean: is it possible that my car seems to be exactly in the middle of the road (midpoint is 512-512 units from left and right side of the square), but in real it's 511.95346 and 512.04654?
Quote from: CTG on December 06, 2013, 08:29:18 AM
How precise is the game in re-generating the coordinates of your cars? Does it calculate only with 1/1024 part of each squares or any fractional numbers are possible?
The car state data used for the physics calculations (and Cartography traces) holds the coordinates in 32-bit integers, each unit being 1/65536 (1/2^16) of a tile. Not arbitrary precision, but a lot higher than that of the graphics coordinates, and so what you describe does happen. The game also keeps the coordinates in 1/1024ths of a tile, presumably for updating the graphics. I don't know/remember which set of coordinates is used for path and penalty detection, though...
Quote from: Duplode on September 01, 2013, 11:55:38 AM
Win32 executable: https://bitbucket.org/duplode/stunts-cartography/downloads/stunts-cartography-0.3.0.0-win32.zip
Norton Internet Security says "SONAR Heuristic 112" danger for that download... :-\
There's still people with Norton installed?! Was it there when you bought the computer and forgot to remove it?
Go, time to uninstall it: you're old enough to use a computer without (deflated) training wheels.
Quote from: CTG on December 09, 2013, 08:22:57 PM
Quote from: Duplode on September 01, 2013, 11:55:38 AM
Win32 executable: https://bitbucket.org/duplode/stunts-cartography/downloads/stunts-cartography-0.3.0.0-win32.zip
Norton Internet Security says "SONAR Heuristic 112" danger for that download... :-\
Must be a false positive. Norton doesn't have the grace to explain what that heuristic means in their knowledge base, but I wouldn't put beyond it being scared by web server launching.
Quote from: CTG on December 09, 2013, 08:22:57 PM
Quote from: Duplode on September 01, 2013, 11:55:38 AM
Win32 executable: https://bitbucket.org/duplode/stunts-cartography/downloads/stunts-cartography-0.3.0.0-win32.zip
Norton Internet Security says "SONAR Heuristic 112" danger for that download... :-\
damn we are busted. that was a virus coded by Duplode to fetch RPL files from all who install the cartography tool :)
Another question: what does define your / your opponent's exact starting position? The replay file or the game engine? I know, the replay also defines the track (and the start/finish line), but I mean the left or right lane.
Quote from: CTG on December 11, 2013, 03:36:56 PM
Another question: what does define your / your opponent's exact starting position? The replay file or the game engine? I know, the replay also defines the track (and the start/finish line), but I mean the left or right lane.
The engine. The replay file does not contain coordinates, only keystrokes. I don't think we got to pinpoint exactly where the starting offset from the centreline is applied during the 2010 restunts studies, but I guess it wouldn't be too difficult to find out.
I finally brought myself to do some work on Cartography. This time I won't dare to announce a release date; however, I am quite optimistic after working around (https://bitbucket.org/duplode/stunts-cartography/commits/99554e03d1a78f1679d4d5e23b567fa06970a9b1) the most annoying issue standing in the way of the 0.4 release. Other good news include that a recent new version of the drawing library gave us a noticeable speedup (up to 30% in some cases), and that some technical adjustments are making the annotations/lap trace code a lot less repulsive.
Stunts Cartography 0.4.0.0 is now available! New stuff includes:
- Support for lap traces and animation frames. Lap traces can be loaded with or without overlaid cars, and can be used either as a normal map annotation or as part of the new flipbook feature, which renders a PNG file for each replay frame and packages them all in a zip file.
- repldump2carto, an auxiliary separate program which generates input for the lap traces by extracting coordinates from repldump binary data (repldump is dstien's DOS game state logger; you can get it from Southern Cross (http://scr.stunts.hu/mods.html)). The output is a plain text file table, so beyond using the coordinates in the track viewer you can, for instance, easily import them into an Excel file.
- Autocompletion in the base path and file selection fields, which makes selection of tracks and replays much less annoying.
As of now, it is possible to generate a video animation of one or several replays, like the Z147 one I prepared a while ago (http://www.youtube.com/watch?v=eaGYBrxrHmA), using just the tools mentioned above (repldump, repldump2carto and the track viewer) plus a video tool like FFmpeg to combine the PNG frames into a video. The provided documentation (README.txt, REPLDUMP.txt and the annotations help page linked from the track viewer) explains in broad strokes the necessary steps; if you have any doubts or would like a proper tutorial, just ask here.
LinksWin32 executable: https://bitbucket.org/duplode/stunts-cartography/downloads/stunts-cartography-0.4.0.1-win32.zip
Source code: https://bitbucket.org/duplode/stunts-cartography
Technical note: You will need a reasonably recent version of your browser for the track viewer to run (Firefox 11+, Chrome 16+, Internet Explorer 10+).
Looking forward for your opinions and suggestions. Enjoy!
Edit: The donwload link now points at the 0.4.0.1 zip. The bugfix release was needed due to a subtle bug which led flipbook zips created on Windows to look wonky on Linux.
I have followed this from a long time and I think that the progress is great! Keep up with the excellent work and happy racing! :)
Quote from: RacerBG on March 20, 2014, 09:58:45 PM
I have followed this from a long time and I think that the progress is great! Keep up with the excellent work and happy racing! :)
Thank you :) I do not have concrete plans for a new release at the moment, though there are a few features I would like to add eventually, such as independent captions (by "independent" I mean not attached to a car).
I'm happy to finally announce the release of Stunts Cartography 1.0.0.0! This version includes the new features I have used in Cartography videos and maps over the last year, and also fixes several major annoyances. Here is the Windows binary download link (https://github.com/duplode/stunts-cartography/releases/download/1.0.0.0/stunts-cartography-1.0.0.0-windows-x86_64.zip) (let me know if you need a Linux binary as well). To use it, put the stcarto directory into your Stunts folder, and run the
stcarto executable from a command line. You can use
stcarto --help (or
stcarto viewer --help, etc.) for brief usage guidance, check the readme (https://github.com/duplode/stunts-cartography/blob/master/README.md) for more detailed notes, or ask anything about it here :)
Here is a list of changes since the previous release:
- biggrid CLI subcommand, for rendering multiple tracks in a single map.
- r2c CLI subcommand, which corresponds to the formerly separate replaydump2carto executable.
- t2c CLI subcommand, analogous to r2c but for trackdata dumps, currently supporting trackdata09 (F4 camera positions) and trackdata10 (corner sign positions).
- Various improvements to the viewer GUI (which is now launched through the viewer subcommand).
- Show track name and scenery in the viewer GUI log.
- Tracks with Bliss metadata are now accepted by Cartography (they were formerly rejected by the file size checks).
- New types of annotation: markers and standalone captions.
- Frame-bound standalone captions for adding timers and other changeable information to flipbooks.
- Annotation captions in flipbooks can now show car speed, current gear and height, in addition to time.
- Fixes to the behaviour of the caption alignment options
- Alternative two-tone terrain style, inspired by dreadnaut's 4DOPEN terrain editor.
- Option for a transparent low ground background.
- Various visual fixes to track diagrams.
- Support for generating SVG flipbooks.
- Support for building Cartography with the SVG and Rasterific backends of Diagrams, making the Cairo/GTK dependency optional.
- Updates for building with GHC 9.0.2 and recent versions of dependencies.
It works in windows 7 64 bits version and Chrome ;)
Hey! That's lots of improvements! Does the option of not depending on GTK or Cairo mean that a Linux binary would likely run out of the box on any Linux distro? And about support for Bliss metadata, does it use it or just accept it? If you need quick details on the text and binary overlaid and split formats, just let me know. It's pretty simple anyway.
Quote from: Cas on January 31, 2022, 12:33:21 AM
Does the option of not depending on GTK or Cairo mean that a Linux binary would likely run out of the box on any Linux distro?
Linux isn't really a problem on that front, as Linux systems generally have GTK available already. Windows was the main reason for providing those alternatives, as I wanted to have a backup plan if I couldn't get GTK to play nicely there. It did work out all right in the end, and the Windows binary I have uploaded uses Cairo. Though the other backends work perfectly well, there is one advantage to using Cairo: the SVG build can only generate SVGs, and the Rasterific one, only PNGs; the Cairo build, on the other hand, supports both output formats.
Quote from: Cas on January 31, 2022, 12:33:21 AM
And about support for Bliss metadata, does it use it or just accept it? If you need quick details on the text and binary overlaid and split formats, just let me know. It's pretty simple anyway.
For now it just accepts the files, ignoring anything after the 1801th byte. Now that you mention it, I think it wouldn't be difficult to parse binary overlay metadata if available (this is the format (http://wiki.stunts.hu/index.php?title=Track_file#Bliss_binary_metadata_format), right?), and to print it to the log of the viewer GUI. One more feature for a future release :)
I think that most Linux distros will have GTK installed. No guarantee, but almost. KDE-based desktops, if I know well, use Qt instead, but surely some of the programs installed in the system must use GTK and upon installation, must have installed it as well as a dependency, so the odds are the binary will find GTK. On the other hand, if one were to compile it, my guess is that the development library would be missing, yet if the binary can run, that's enough.
Yes, that is the format. I have seen with the years that mostly the title and author's name end up being of any use. Other information is important only for the registry. In the tournament field, I usually specify what the track was made for, which championship, which race, etc. Maybe which car.
I try to get my head around it. So much :D
I'll have a look at it soon.
Quote from: Duplode on January 30, 2022, 03:13:30 PM
I'm happy to finally announce the release of Stunts Cartography 1.0.0.0!
Ooooh, congratulations!
Quote from: Duplode on January 30, 2022, 03:13:30 PM
Alternative two-tone terrain style, inspired by dreadnaut's 4DOPEN terrain editor.
To think that my little '96 experiment would have an effect, any effect! I'm quite proud ;D
Quote from: dreadnaut on February 01, 2022, 11:44:25 PM
Quote from: Duplode on January 30, 2022, 03:13:30 PM
Alternative two-tone terrain style, inspired by dreadnaut's 4DOPEN terrain editor.
To think that my little '96 experiment would have an effect, any effect! I'm quite proud ;D
That streamlined style looks just right for certain tracks :)
(https://i.imgur.com/WcBvHoj.png)