The online racing simulator
#1 - Racon
PiranMOTO Layout-From-Image (Win console app)
(You wait years for this kind of thing, and then two come along in the same week! Big grin)

LFI is a command-line windows app that processes a PNG image to detect points marked in specific 'pure' colours, and outputs an LFS layout file of those points. You can scale and offset the resulting layout, making it easy to create a perfectly scaled reference layout from an image of a real-world source.

The colours used are the 8 colours available when using only full or 0 values, ie, pure black, white, red, green, blue, yellow, cyan and magenta, and each produces a different object (3 colours of cones, 3 colours of posts, a tyre stack and a pillar). See reference image.

Full colour images such as screenshots of maps need to be cleaned of these colours before you can start marking them, this can be achieved with output levels. (If your software doesn't have that, photopea.com is a free online photoshop-like software that does: Go to Image > Adjustments > Levels, and move the output levels from 0 to 1, and 255 to 254.)

Once you've made your image, you need to calculate your scale. If you've used a screenshot of a map and left the scale markings in it, you can divide the stated width in metres divided the pixel width to get the ratio. The default is 0.0625, or 16 pixels per metre. Rounding errors mean this will be close, but it is recommended to fine-tune the ratio afterwards by comparing a known length that spans as much of the layout as possible. You can calculate the perfect ratio directly: new ratio = (old ratio / wrong distance) * correct distance.

The app is limited to 2400 control points, and will stop processing with an error if more are found (this usually means you've missed a patch of pure colour when preparing the image).

The layout is created in LA1X, named after the image, and is centred at 0,0 plus any offsets you specify.

Note: If you have any important, long, straight edges, it is recommended to rotate your source image so that this line is perfectly horizontal or vertical before you paint your control points. (LFS objects rotate in 1.6 degree steps, so you can't make perfectly straight lines at just any angle. Rotating will usually anti-alias your control points and checnge their colour slightly - you can still see them, but as they're not pure colour any more, LFI will ignore them!)

Usage: lfi test.png <scale> <offset x> <offset y>

- scale is metres-per-pixel, default 0.0625 (16px/m)
- offsets are in metres, default 0

(Tested up to 3000x3000 pixels - slow, but doesn't crash. Let me know if you find the limit and can't manage without more, I can expand the memory allowed if required.)


Attached images
LYTImageColours.jpg
test.jpg
Attached files
lfi.zip - 7.1 MB - 156 views
could u make a video to show how to use plz?
#3 - Racon
I'm not sure about a video, but I will make a walk-through with illustrations soon Thumbs up
There is still no walk-through
Where I should put app
How format the image
How to launch
Where to saves layout
And more more more
#5 - Racon
Sorry, I have so many LFS things to do and very little LFS time at the moment... this one got lost in the shuffle. I will bump it back up the list, but no promises as to when I'll get to it.

Quick answer to all those questions is: Download it and put it anywhere you like, it doesn't need to be in a certain place. The image should be PNG format, in the same place. It's a commandline app, so it needs to be run from a DOS window (see usage above), and it saves the layout in the same directory too.
Open CMD or Windows PowerShell
Use command from my screens (blue is PowerShell, black is CMD) but replace my directory with urs.
Attached images
417925592_375918451898516_53110716632906352_n.png
429105269_1689953738198603_5899087954092138091_n.png

FGED GREDG RDFGDR GSFDG