One Click Hangar

Downloads => AI Repaints => Other GA => Topic started by: mage on July 15, 2023, 10:39:52 PM

Title: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on July 15, 2023, 10:39:52 PM
I have noticed that various text elements created by the one-click repaint have not survived the "save" operation. Consequently I have gathered the DDS files together and have created a bunch of repaints that still have these text elements in them. These are what I was intending to create and are much better than what ended up being saved.

e.g. If you look at PH-DON on the OCR link for that repaint, and the one in the collection linked here, you can see that the registration has no white panel beneath it on the link, but the one I saved at the time it was made looks much better. It is things like this and the text elements of repaints such as the Swiss Flying Club repaint just below this posting (which has all the text on my version but not on the OCR link I provide) that will be improved.

If you downloaded any of those repaints at face value, you will almost certainly have a better version in this file of collected liveries.

If I've missed anything out, let me know here and I will upload it for you.

If you use BMP format as I do, you can use my DDS2BMP converter that is up on Flightsim.com - just look for it either using that title, or by author name - Matthew Ministry - which isn't a real name, but there you go. In future I think I'll just post the DDS to avoid this problem that providing the link incurs.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 02, 2023, 08:13:50 PM
I'm checking to see why the registration background element is not added via the share link. As far as I can see, the information is saved.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 03, 2023, 10:06:16 AM
Does the appearance of PH-DON indicate that you figured what was happening? That version you posted the link to looks much better now!
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 03, 2023, 11:25:59 AM
Yes, for some reason I had explicitly coded the text background element to not be drawn as part of reloading the paint through the share link. I don't know why I did this. I also noticed that some the checkboxes were not saved when saving a paint. I have fixed some of them, but not sure if all have been fixed yet.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 03, 2023, 08:58:50 PM
 8)

Great that you identified the problem and got a fix organized that quickly.

I was hoping that my text elements that I added to (for example) HB-CQM (Swiss Flying Club) would all reappear, but it seems that they are still gone. I'd added the text "SWISS Flying Club" on the fuselage side and "SWISS" on the engine area (together with a tiny Swiss flag instead of the airine logo) but those were apparently not saved. It might be that none of the paints done since I started are as I'd originally designed them. It was fortunate that I have saved all the files and could repost them as originally designed in here.

It might make sense to delete all my posts except for the one with the file, to save anyone from going to an incomplete repaint, although I notice that text for HB-CQZ has survived okay (just the word "Skylane").

The odd thing about HB-CQM is that the tail red band is partly made from text characters (the "full block" character) and has survived, just the readable text has gone. Perhaps it had too many text elements?
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 03, 2023, 10:46:33 PM
That's a great hack, using the text element to add extra blocks. I hadn't even thought of that way to use them. :)

Although there isn't a limit as such to the number of elements you can add to a paint, there is a limit to how much information is saved. I have increased this limit, so that you should comfortably be able to save around 30 elements per paint.

This is just a quick-fix to be honest, and I should probably have a rethink on how the repaint information is saved to make it truly unlimited.

One thing to note as well, if you have any paints that you forgot to download and not all information has been saved, I would be able to retrieve the bmp/dds files for you.

Edit: Also, I think I've just fixed the issue with the black boxes when resizing logos.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 04, 2023, 08:08:07 AM
When I make these, I immediately download the texture as DDS (I'm an FS9 user but the setting to choose BMP format doesn't "stick" when selected - but that's okay since I use the DDS2BMP converter to get them into BMP). It does at least mean the ones I uploaded are in the best format for detail.

Saving elements is difficult space-wise, because they can vary in number quite a lot. The Swiss Flying Club had about ten or twelve if the blocks to create the tail band are included (it was a bit of a brainwave to think to look for a block character, and luckily there was one). Storing the random amounts of "elements" would be wasteful in a fixed format and to make best use of space on disk would be in a separate variable length data array - tied to the main one with some index value. It depends how your database is set up and the software that uses and creates it. At least then something with 12 elements has 12 associated element records and something with just 1 takes up a lot less space. So, a variable number of associated elements in a related table and perhaps even variable length records in that table (at least when saved). The problem with variable length records I guess is when a user then adds or removes characters from it. Using a symbol or flag would probably just be an index out to the relevant graphical element and take up even less space.

While I'm here, I may already have mentioned that the color picker no longer remembers any pallette colors that are set up, at least on my system at home (I'm not there presently). It makes color matching a bit hit & miss.

A possible future enhancement would be the ability to rotate elements as you can with registrations, giving us angled text on fins, as well as angled color bands when using those block characters to create areas of color. But then aliasing needs to be done to avoid jagged edges on slopes... I'm not sure how a line of color blocks would deal with a slope, it probably moves in steps and could never be made to work properly. But it would at least work with text.

Sadly, this very capable online facility is not getting the attention of people, I guess because there are only a few simmers interested in bespoke AI (as compared to total FS users), and the vast majority of those people are only interested in the airlines. Of the few people left, only a few actually have any real commitment to making stuff using it. I have graphics software and I'm getting used to it and making more paints for myself (and sharing a few), but for people without graphics programs or not wanting to get into that side too much, this would be a very useful facility to have.

As it is, now that I'm using a graphics program in my limited way, my main use for OCR is when I'm mobile and fancy having a go at making another light GA without having a graphics program around.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 05, 2023, 02:43:47 AM
Made this topic sticky, so your repaint collection won't get lost in this board.  :)

I'll see if I can get it to remember the selected format. If you have selected FS9 when you click save, the downloadable file should be bmp, however it's not ideal that it reverts back to the default setting every time you click Update.

Having the elements stored in a separate table is the way to go, just have to ensure backward compatibility.

With the colour picker, do you mean the option to add custom colours? This works ok in Firefox for me but not Chrome or any other Chromium-based browsers, so I'm not sure I can fix it.

As for rotation and similar to the additional text elements, that's something I'd like to add soon.

GA is definitely overlooked by most and I think putting the effort in to make something for others is something that very few people do.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 05, 2023, 03:19:31 PM
Thank you, Charly. It also saves anyone interested in these GA paints from a lot of clicking, I guess.

I'm fine with saving in DDS since I wrote a converter (also using Imagemagick) to flip-resize-save as a variety of BMP formats from a DDS file (and also preserve alpha channels from the DDS, if any). It then at least means that a higher-resolution format is also useful to me, provided I convert it first (takes seconds).

"just have to ensure backward compatibility" - well, either that or port the data into a newer format by reading the element data out into a new table as well as creating a new "core record" for the standard components and indexing them to each other. But then I don't know the database software being used or the formats involved, so it's easy for me to sound confident! :D

With the color picker, I meant adding colors to the pallette so that they can be recalled for other parts of the livery that need the same color. I work around it by copying the RGB values and posting them into the new area that needs that color (normally fuselage stripes etc, and the registration may often be a livery color as well). It used to work for me (in Firefox) but suddenly stopped a few months ago. It may have been a Firefox "update", of course. It often is.

Rotation of elements is a "nice to have" but there are plenty of aircraft out there to be done, so it's not a restriction.

"I think putting the effort in to make something for others is something that very few people do"

The nature of hobbies probably hasn't changed that much, but there's a cultural change to get something for nothing that eats away at the heart of what hobbies traditionally were. The nature of people has changed. Partly perhaps because the internet is now seen as the source of a load of free stuff that comes into existence by magic. In the past 20 years, the company I used to run has had a progressively harder job finding people worth hiring, people who'll put the work in, think for themselves, and know when something is only second-best. This is certainly true for the UK, at least. Hopefully other countries are making a better job of turning out "citizens".

In fact that's what hobbies are increasing short of, citizens.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 05, 2023, 06:55:27 PM
It took a bit less work than expected so here is a nice addition to the text elements: https://oneclickhangar.com/oneclickrepaint/share.php?id=QB8ppXWg3zDgXV6PqMZw

It's not tested completely so there may be bugs in the code.

It's possible to shear text both horizontally and vertically, and to rotate text. Shearing is applied before rotation.

I think the colour picker this is just a functionality that as been removed in a browser update. Even though I can add to the palette, it doesn't remember it in Firefox. I use Chrome as my main browser and there the functionality to add to palette has been removed entirely.

Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: phantom on August 05, 2023, 08:20:59 PM
I am a very bad repainter with not a lot of time. I am very gratefull that a such tool exists which makes it possible to fly around between some real life look-a-likes. With most recent changes it will be even more than just look-a-likes. Thank you very much !
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 06, 2023, 07:32:03 AM
It took a bit less work than expected so here is a nice addition to the text elements...

I think the colour picker this is just a functionality that as been removed in a browser update. Even though I can add to the palette, it doesn't remember it in Firefox. I use Chrome as my main browser and there the functionality to add to palette has been removed entirely.

I can see that nice text addition getting some use over the course of time!

I guess that with Chrome at least the temptation to try the pallete option is taken away. Now and then I look to see whether the functionality has come back in Firefox, knowing fairly well that it won't come back.

Would it be a simple addition, while I'm here, to allow a user to right-click on a texture and get the coordinates of that point? I spend quite a lot of the time nudging elements back and forth until they are broadly in the right place and sometimes get the coordinates badly wrong. It would be quite a handy shortcut to right-click on the tail of a Cessna 172 for example, to get a ballpark position for the Cessna logo, and I can them enter those coordinates to get a head start on putting it in the right place.

For example, to enter text on a C172 fuselage the coordinates might be -440,-8, but on the upper tailplane they will be more like 230,-198, and if entering text on the other side of the tailplane the numbers might be something like -608,250 or something like that. So a shortcut right-click (or similar) to get a broad idea would be some help. I certainly don't want you to end up with a repainter tool that can only be operated by rocket scientists that have read a 1000-page manual, but that is something that might mean people with short moments of time can turn around a usable paint.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: charlymorton on August 06, 2023, 09:38:52 PM
I have added a right-click option to get the offset for the spot you click.

The offset given depends on the active form/tab and on some settings on some forms/tabs

For the Registrations form, the following options affect the offsets given:
Position - changes to this are affected after clicking the Update button
Click to offset - changes to this are immediate after changing the value. If changing the value to none, the offsets are not affected

For the Elements form:
Section - changes to this are immediate after changing the value

Right-clicking the image on the Elements form, before selecting Text or the graphics to add, will bring up a context menu in the browser. I do not know how I can disable this without changing too much.

For all other forms/tabs:
Offset is calculated as if Position and Click to offset values are set to their default.

To remove the offset information popup, either left or right-click in the image.
Title: Re: All repaints I made using OCR - with original UNSAVED text elements.
Post by: mage on August 08, 2023, 09:21:28 AM
That's a major productivity booster, getting the coordinates auto-entered. It easily halves the number of steps I generally use to get elements positioned, so, a big thank you from here. There might still be the occasional micro-adjustment to make, but I can now get right to the correct place on the first try.

I really hope people can feel encouraged to give it a go, now that a lot has been taken off the learning curve.