I’m implementing some new features, still in heavy development ATM.
Thanks to the feedback and assets kindly provided by @ArsInvictus I’m trying to expand the utility to be a full fledged, albeit simple, “automatic cabinet maker”.
I’m not ready to publish the update code, but here’s a sample of a windows batch file that can take some already prepared assets and scale/resize/combine/paste them to create a vertical cabinet similar to the ones that ArtInvictus handcrafts.
I post the samples here because since I’m coding right now this is the best moment for me to get feedback and advice and make my mind on how to proceed.
the batch script gets basically the game name as a parameter and calls the various functionality of the utility to manipulate a series of assets.
The commands are at the moment basically 2:
cabinet_join that stacks and resizes images in a row, horizontally or vertically.
cabinet_paste pastes an image over a background.
both commands have various switches to align, resize, scale keeping aspect ratio or stretch the images. I won’t document them right now but I hope they are easily understandable.
set game=%1
rem speaker block: first stretches the wood layer on the backgorund, then stretches the speakers over it
python cabinetmanager.py cabinet_paste -bf ..\test\white_background_2160x360.png -if ..\test\speaker-panel.png -of ..\test\temp_speakers_background.png -rm stretch -va center -ha center
python cabinetmanager.py cabinet_paste -bf ..\test\temp_speakers_background.png -if ..\test\speakers.png -of ..\test\temp_speakers_composite.png -rm scale -va center -ha center -rd both
rem top block (marquee and speakers): stacks them vertically
python cabinetmanager.py cabinet_join -if ..\test\%game%_marquee.png ..\test\temp_speakers_composite.png -of ..\test\temp_cabinet_top.png -r scale -d vertical -a center
rem bottom block (metal grid and logo): first stretches the metal grid over the background them paster the logo over it
python cabinetmanager.py cabinet_paste -bf ..\test\white_background_2160x520.png -if ..\test\metal-bottom-border.png -of ..\test\temp_metalgrid.png -rm stretch -va center -ha center
python cabinetmanager.py cabinet_paste -bf ..\test\temp_metalgrid.png -if ..\test\logos.png -of ..\test\temp_cabinet_bottom.png -rm scale -va center -ha center -rd both
rem complete cabinet: paster the upper block, the bottom block and then the bezel over the final cabinet
python cabinetmanager.py cabinet_paste -bf ..\test\white_background_2160x3640.png -if ..\test\temp_cabinet_bottom.png -of ..\test\temp_cabinet_temp1.png -rm scale -va bottom -ha center -rd both
python cabinetmanager.py cabinet_paste -bf ..\test\temp_cabinet_temp1.png -if ..\test\temp_cabinet_top.png -of ..\test\temp_cabinet_temp2.png -rm scale -va top -ha center -rd both
python cabinetmanager.py cabinet_paste -bf ..\test\temp_cabinet_temp2.png -if ..\test\%game%_bezel.png -of ..\test\%game%_cabinet.png -rm scale -va center -ha center -rd both -yo 326
The output cabinet follows (I scaled it back for uploading but the original was 4K)
:
Of course it lacks a lot of nice finishing touches in respect to the ones made by ArsInvictus but I never intend the tool to completely replace an artist’s hand. The goal of my work is creating a tool that can speed up and make easy all the long and boring stuff related to image processing in creating an overlay.
It will be useful for mass production. Mockups. Temporary overlays until you find the time to do a hand-made one, or generic ones where original art is missing.