[REL] rF2CarIconGenerator - Fully automated Car Skin Livery Icon generator

Discussion in 'Other' started by svictor, Apr 3, 2025.

  1. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,104
    Likes Received:
    7,201
    rF2 Car Icon Generator
    Project page: https://github.com/s-victor/rF2CarIconGenerator
    Download: https://github.com/s-victor/rF2CarIconGenerator/releases

    Fully automated car skin livery icon generator for rFactor 2.

    This tool automates and streamlines the entire process of car skin livery icon creation, by automatically renaming showroom screenshots to corresponding vehicle file name and generating full set of rF2-standard icons.

    With this tool, all it needs is to load up car in showroom, and press in-game screenshot hotkey, then this tool will take care of the rest and generate a whole set of icons in a second.

    Special thanks to @DJCruicky for the inspiration of utilizing rF2's Rest API via AHK.

    [​IMG]

    Requirements
    This tool requires installation ImageMagick v7.0 or higher for processing and resizing image file, it can be downloaded from (https://imagemagick.org). If ImageMagick is not installed, icon generating will not work.

    Note, when installing ImageMagick, make sure "Add application directory to your system path" option is selected, otherwise it may not work.

    Usage
    1. Download rF2CarIconGenerator from Release page, and install ImageMagick.

    2. Extract rF2CarIconGenerator.exe file, place it in rFactor 2 game root folder. This is required for correctly locating and accessing game's ScreenShots folder.

    3. Launch rF2CarIconGenerator, click Start Monitoring button to enable automated screenshots renaming and icon generating.
      Note, if you are creating icons in Dev Mode, toggle on Dev Mode check-box.

    4. Launch rF2, select a side view type showroom for creating icons, such as the SideView UI or EasyIconCreatorShowroom_SMMG showroom.

    5. Load a vehicle in showroom, and hide top bar (or side bar in Dev Mode), then Press 1 to hide showroom background.

    6. Press in-game screenshots hotkey, and this tool will automatically rename and generate full icon set for selected vehicle, done. Repeat this step for other vehicles or skins to create more icons.
    Note, screenshots must be done using in-game screenshots hotkey, which is defined in rF2's "Assign Controls" setting. Screenshots made using Steam "In Game" hotkey or from other APP will not work.

    Generating progress is queued, which means you can start taking screenshots for next car skin while current icon generating is in progress.

    Finally, generated icons are located in:
    • For main game: rFactor 2\UserData\ScreenShots\IconOutput
    • For Dev Mode: rFactor 2\ModDev\UserData\ScreenShots\IconOutput

    Options
    • Dev Mode:
      • Enable this to detect and generate icons from rF2 development mode.
    • Generate Icon:
      • Enable icon auto-generating.
    • Finish Beep:
      • Play short beep sounds when screenshot file renamed, or icon set fully generated.
    • Stay On Top:
      • Keep this tool on top of rF2 or other windows, useful for monitoring icon generating progress while taking screenshots. Note, rF2 must be running in windowed or borderless mode to allow this tool visible on top of rF2.

    Additional Notes
    How it works
    While Start Monitoring enabled, this tool monitors UserData\ScreenShots folder for any changes made recently. If newly created screenshot is detected in this folder, this tool will automatically retrieve corresponding vehicle skin livery file name (VEH) info from rF2 Rest API, and rename new screenshot with this skin file name. Then it automatically activates icon set generating process and saving them to ScreenShots\IconOutput folder.

    What happens if multiple screenshots are taken for the same skin livery
    Newer screenshot will simply override older ones of the same skin livery, and icon set will be regenerated for the same skin livery.

    Rest API & URL Port
    The auto-renaming feature relies on rF2's Rest API to function correctly, which this tool will automatically connect to Rest API URL Port to retrieve vehicle data. This URL Port value, by game's default setting, points towards 5397, which will work out of box automatically.

    However, under extremely rare cases, the game may change its default Rest API Port value to something else, which could cause connection failure for this tool and show an Error (abort) message in Vehicle File Name box. If that happens, you will need to manually edit game's player.json file and fix the port value back to 5397. This file is located in following folder:
    • For main game: rFactor 2\UserData\player
    • For Dev Mode: rFactor 2\ModDev\UserData\player
    Once found player.json file, open it with notepad, search for "WebUI port", and change its value back to 5397, then save it (make sure game is closed before saving the file), and restart game to take effect.

    Regenerate icons
    It is possible to regenerate icons by clicking Regenerate, provided that original screenshot files are available in ScreenShots folder. Generating progress can be viewed from log and status bar.

    Note, any screenshot file that starts with GRAB_ prefix are excluded from regenerating process.

    [​IMG]
     
    Last edited: Apr 16, 2025
    Matt21, Flipo, Spyro and 12 others like this.
  2. doddynco

    doddynco Registered

    Joined:
    Dec 13, 2017
    Messages:
    580
    Likes Received:
    1,249
    Thank you soooo much !!!!! This is perfect timing.
     
  3. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,503
    Likes Received:
    3,455
  4. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,104
    Likes Received:
    7,201
    Thanks guys for the comments, I'm glad the tool is provided useful.

    @redapg

    This tool will save modder a greater amount time for creating icons. It handles screenshots file renaming, icon generating automatically in-one-go, and it takes less than 2-3 seconds to complete a full icon set. It is what I would imagine from the game developer if they would make such tool available.

    The traditional methods, as most of us have been doing for years, require modder to manually rename each screenshot to corresponding VEH file name after taking a screenshot, which usually results constantly Alt-tab back and forth between RF2 & file explorer, and modder has to make sure each file name is correctly renamed, which also puts additional and unnecessary mental load & burden on modder. And further more, modder also have to use additional tools to convert all screenshots to icons, which means more work as it takes extra time to uploading, downloading, converting, or editing files. For those have been worked on large amount skin liveries, you are probably well understand how time consuming this whole process can be.

    With this tool, it frees your mind and your time from all that troubles. Just load car in showroom, press screenshot hotkey, and it's done. And you can move on to next car without alt-tabbing, or spent your precious time on actual modding.

    If you wish to use auto-renaming from this tool, but also use other tools to convert icons, such as using the "rf2 online tool", or editing screenshots manually via photoshop or GIMP, you can do so by turning off "Generate Icon" check-box from this tool, and only use the auto-renaming feature, which at least it will save you the time and trouble from manually renaming files.

    In any case, all tools are nice. Feel free to choose whichever tool that works best for you.

    Cheers
     
    yashiman likes this.
  5. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,503
    Likes Received:
    3,455
    @svictor My Question was not meant as an Offence (i used a Smiley). :)
    All Tools, that make the Modders Life easier, are welcome.
     
  6. Mauro

    Mauro Registered

    Joined:
    Oct 14, 2011
    Messages:
    2,223
    Likes Received:
    4,484
    Great addiction svictor.
    Many thanks.

    one question: are there difference from use in game or devmod showroom about picture quality?
    (Apart in devmod you could easily edit easyiconshowroom.ini zoom for each type of cars)
     
  7. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,104
    Likes Received:
    7,201
    @redapg fully understand, no worries.

    @Mauro Thanks, they are identical in qualities. The screenshots taken from RF2, as well as the generated icons are all in PNG format (lossless format), so there won't be any quality difference between dev mode or main game.

    And as recommended by 397 stuff, the screenshots are best taken from 4K screen resolution, which will give you the best icon qualify for each different icon sizes.

    If you don't have 4K screen monitor, it is still possible to take 4K resolution screenshots. For example, if you have a nvidia card, you could enable and set nvidia DSR mode (Dynamic Super Resolution) to 4K resolution, which will enable you to run the game in 4K resolution in order to take 4K screenshots for creating icons. For example, set "DSR - Factors" to 4.00X (for 1080p screen), then 4K screen resolution can be selected and set in monitor setting.

    The dev mode is probably better for non-DLC mods, since you can easily organize all the VEH and skin files without packaging them to mas file. But for DLC, since they are encrypted, it is easier to take screenshots under main game (you will need to package the VEH and skin files into mas file before taking shots).
     
    Last edited: Apr 5, 2025
    8Ball, yashiman, nonamenow and 2 others like this.
  8. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,090
    Likes Received:
    1,176
    I can set my game to run in a res that is higher than my monitor supports?
     
  9. yashiman

    yashiman Registered

    Joined:
    Jan 16, 2012
    Messages:
    244
    Likes Received:
    811
    Thank you svictor.
    Your great tools and mods are on a great level every time.
     
  10. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,104
    Likes Received:
    7,201
    Yes, you can run game in 4K with a 1080p monitor.

    For nvidia card, this can be done with:

    Open "nvidia control panel", on the left side, under "3D Settings", select "Manage 3D Settings", then on the right side, find "DSR - Factors" option, click it and select a 4K resolution value. For example, if your screen is 1080p, then DSR Factors should be "4.00X (3840 x 2160)". And also make sure "DSR - Smoothness" option is set to 0%, this is important to get "raw" image quality. (AMD also has a similar thing called "virtual super resolution")

    Then, open desktop display setting, find and make sure to set the new resolution to "3840 x 2160" resolution (DSR). This step is important, because the max allowed screen resolution for both RF2 main game and Dev Mode UI & showroom always limited to the max desktop resolution currently set.

    Once set, open either main game or Dev Mode, you can see game is running in 4K now, and screenshots will be taken in 4K too. You may still want to revert back to 1080p desktop resolution after done icons, since everything will be shown extremely small on 1080p screen in 4K mode.

    This is how the setting looks like on my 10 year old 1080p monitor:
    [​IMG]
     

    Attached Files:

    • 12.png
      File size:
      196.4 KB
      Views:
      269
    atomed, Corti, philrob and 3 others like this.
  11. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,090
    Likes Received:
    1,176
    Works great, just done some workshop updates!
     
    Radkappe, Matt21, atomed and 2 others like this.
  12. 8Ball

    8Ball Registered

    Joined:
    May 5, 2022
    Messages:
    669
    Likes Received:
    625
    I know I am 1 of your 2 subscribers :)
    Thanks for all the icons.
    Please finish rest of "ISI" cars ( the ones that S397 never claimed) I think only NSX and ZR1 are left.

    Also check out rF2 / LMU in 4K, like another world.

    24" 1920 GTR 2 4K 100 cars was magic.
    (2014 screens check the powerlines ... 2 clicks )
    [​IMG]
    [​IMG]
     
  13. ling

    ling Registered

    Joined:
    Jan 24, 2023
    Messages:
    191
    Likes Received:
    267
    This works great, big thank you.
    i like the sounds it makes when generating the icons:)
     
  14. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,090
    Likes Received:
    1,176
    I wonder in future could there be visual icons that change in the app UI saying it's creating an icon (red circle) and maybe a green circle when it's idle and ready for the next one? Also a checkbox to turn off the sound feedback?

    Many thanks! I've made good use of this since release!
     
    doddynco likes this.
  15. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,104
    Likes Received:
    7,201
    Thanks guys, awesome job with icon updates.

    Here is a new update with features requested by @Woodee :

    https://github.com/s-victor/rF2CarIconGenerator/releases/tag/v0.2.0

    v0.2.0 (2025-04-16)
    - Add "Progress bar" for visualizing icon generating progress.
    - Add "Finish Beep" check box for toggling notification beep sounds.
    - Add "Stay On Top" check box for keeping this tool on top of rF2 or other windows, useful for monitoring icon generating progress while taking screenshots.

    Also note:
    Icon generating progress is queued, which means you can start taking screenshots for next car skin while current icon generating is in progress.

    [​IMG]
     

    Attached Files:

    • v020.jpg
      File size:
      108.3 KB
      Views:
      71
    yashiman, jayarrbee36, Corti and 4 others like this.

Share This Page