Roblox games often have collectibles - inventories, pets, etc. We need to display them in a menu. ViewportFrames aren't a scalable solution, but authoring pre-rendered icons is time-consuming and finicky. This project automates the whole process.
Icon creation is in 4 distinct stages - rendering, downscaling, uploading, and collection into a JSON file. The Ninja build system creates a dependency graph, only executing a step if a source file has been changed or added.
This project is not a definitive solution - it's a template, hackable to meet your game's needs.
- You will want to adjust the scene setup in your
template.blend
. Tune the lighting and shading effects to match your game's artstyle. - You will likely want to modify
blenderScript.py
, to get different camera angles and zooms. - You will likely want to change the downscaled image size (128x128 by default).
- Fill your Roblox details into
.env
. A template is provided at.env.example
. - With Python (version >=10), install dependencies;
pip install urllib3 python-dotenv requests Pillow
. - A recent version of Blender. Offline installed versions and Steam are supported.
- Ninja. No installer is provided for Windows - if it's easier for you, simply drop the executable into this folder.
- Export models from studio into a folder named
content
inside of this repo. You can author batch-export tooling with this deprecated method. The filenames of your.obj
s will correspond to the AssetIds within the exported icon data, so ensure they're descriptive. - Run
py 0_ninja.py
to re-generate build commands. - Run
ninja
to attempt a build. - Copy the exported
out/out.json
into your game's source tree.
Re-generate build commands if you've added or removed models. Re-run the build after regenerating build commands, or to retry a failed build.
This source is available under GPL. Though work (icons) created from this toolkit aren't subject to the infectious license, the source is. Any and all modifications must be made public. If you're planning on adapting or working with this tool long-term, please contact me to license this code free of GPL restrictions.
The default template.blend
file includes brown_photostudio_02 from PolyHaven, licensed under CC0.