The International Simutrans Forum

 

Author Topic: More player colors  (Read 389 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3705
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
More player colors
« on: April 05, 2021, 06:29:21 PM »
Hello,

I feel that there could be more objects using player colors in pak128.britain.  I understand that vehicle liveries tend to follow real life in this pakset, but there is place for player colors on metal constructions. Currently mostly on bridges. Also some small details on stations, depots and signalboxes. I'd like to add more - especially the cranes on docks, shipyards and stations.

I'll try that myself, but what I wanted to ask, is if adding player colors is done purely in "postprocessing" on the rendered PNG's, or if should I first use blender to repaint the structures?

Offline wlindley

  • Devotee
  • *
  • Posts: 1055
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: More player colors
« Reply #1 on: April 05, 2021, 07:50:38 PM »
If you are doing post-processing, you may enjoy the alter_hue tool, a short Perl script that lets you easily change one or more ranges of hues to player or alternate gradients (or back again).  This is part of my simutrans-pak-tools on github.
An example use would be:

Code: [Select]
./alter_hue -i stations/goods-sidings-crane.png -o /tmp/new-crane.png 80-pwhich would change the green parts of the goods-sidings-crane to colors in the player gradient.  I used Gimp to determine the hue (be sure to select HSV in the color dialog).

Offline Vladki

  • Devotee
  • *
  • Posts: 3705
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: More player colors
« Reply #2 on: April 05, 2021, 07:57:13 PM »
Oh great. I'll try that. I am experimenting with the gimp-simutrans tools, and the harbour-goods-modern, which already is in color quite close to player color.
But trying to "repair" it to player color gives similar result to yours. Threshold 21 is too low - does not fix all pixels, and threshold 22 destroys the shades...

EDIT: this is great tool. First try with the harbour crane looks quite good. Unfortunately it chose too bright player colors, and the darkest part remained almost black for all players. Also it is brighter in comparison with the road cargo bay with crane (TruckStopMedium1920), Thus the details are less visible. Is there any tweak for "darkening" ?

Intermediate result here:

« Last Edit: April 05, 2021, 08:47:19 PM by Vladki »

Offline wlindley

  • Devotee
  • *
  • Posts: 1055
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: More player colors
« Reply #3 on: April 05, 2021, 11:26:55 PM »
Excellent suggestion.  I have updated the program slightly to permit specifying a level offset in percentage, when converting to player colors. The default (and formerly fixed) level offset is 10%.  Here I use an offset of 30%, given with the L suffix:

Code: [Select]
./alter_hue -i simutrans-pak128.britain/stations/harbour-goods-modern.png -o /tmp/crane.png -v 188+5-aL30There is now also a -v for verbose flag as well, to clarify how the (admittedly somewhat cryptic) arguments have been parsed.
« Last Edit: April 07, 2021, 10:04:49 PM by wlindley »

Offline Vladki

  • Devotee
  • *
  • Posts: 3705
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: More player colors
« Reply #4 on: April 06, 2021, 07:00:22 AM »
Wow, thanks. I thought if the difference between road and docks crane is in the rendering - new transparent workflow, vs. old classic. That may be why the road crane looks a bit thinner and more detailed.

Offline Vladki

  • Devotee
  • *
  • Posts: 3705
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: More player colors
« Reply #5 on: April 06, 2021, 07:51:03 PM »
I found out that for the automatic coversion, the brightness would have to go UP, not down, but the tool allow only darkening. Anyway I just replaced all the dark places with the darkest shade of player color, and the result is here, along with the original crane for comparison. Also added the shipyard. But the snow image for shipyard needs more attention :-( The current snow image is not very nice - the snow is "transparent" so it makes the whole crane kind of pink coloured, and that is not possible with player color.




http://list.extended.simutrans.org/~simutrans/building.PlayerGoodsHarbour.pak
http://list.extended.simutrans.org/~simutrans/building.PlayerBoatyard.pak
« Last Edit: April 06, 2021, 10:08:47 PM by Vladki »

Offline wlindley

  • Devotee
  • *
  • Posts: 1055
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: More player colors
« Reply #6 on: April 07, 2021, 10:05:50 PM »
I committed a small change that permits negative values for the level offset, e.g., 188+5-pL-20 … if that helps

Offline KneeOn

  • Devotee
  • *
  • Posts: 246
  • Pak64.GB
  • Languages: EN
Re: More player colors
« Reply #7 on: April 08, 2021, 10:35:08 PM »
I agree that the pakset needs more player colour - although the colours are brighter than the rest of the theme. The crane looks good and shows how it could be done to just puncture the realistic brown/grey concrete and brick feel without shifting the sets overall British-ness.

Lovely stuff!