News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

stunts-cartography - vectorial track visualization tools

Started by Duplode, July 30, 2013, 08:29:12 AM

Previous topic - Next topic

Duplode

Back in February, when we were discussing automated replay logging, 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 (updated in 2022-01-30)
Source code repository

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.

CTG

W O W ! ! !   :o  :o  :o  :o  :o

Damn, I have to wait ~10 hours before trying!  >:(

Duplode

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.

zaqrack


Duplode

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.

Chulk

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...
Yes, it is me. No, I'm not back at racing (for now...)

CTG


Duplode

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.

Duplode

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)...

Duplode

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:

I should be able to get a new Windows release with that and some other improvements later this week, so stay tuned.

Friker


Duplode

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

CTG

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)

Duplode

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.

Duplode

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  ::)