Giter Site home page Giter Site logo

modelrender's Introduction

Synopsis

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).

Prerequisites

  • 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.

Usage

  1. Export models from studio into a folder named content inside of this repo. Use a batch export plugin like this. The filenames of your .objs will correspond to the AssetIds within the exported icon data, so ensure they're descriptive.
  2. Run py 0_ninja.py to re-generate build commands.
  3. Run ninja to attempt a build.
  4. 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.

License

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.

Attribution

The default template.blend file includes brown_photostudio_02 from PolyHaven, licensed under CC0.

modelrender's People

Contributors

ottohatt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.