Lightweight (Batch) Icon Generator - User Guide

Lightweight Icon Generator is a powerful utility for generating icons from 3D models in Unity. It allows you to set up a camera in your scene, configure various settings, and capture high-quality icons with ease. It also supports batch mode, allowing you to generate and save icons for hundreds of models in just a few clicks. This guide will walk you through the steps of using Lightweight Icon Generator effectively. If you need to contact the developer, you may email him at [email protected] or dm him at https://twitter.com/abmarnie.

Getting Started

  1. Attach the IconGenerator component to a Camera in your scene.
  2. In the Inspector, you will find various configurable settings for IconGenerator. The component will only work while enabled, but it should be disabled or removed before building your project (to avoid leaving the IconGenerator Preview in the build).

Your First Icon

Follow these steps to generate an icon:

  1. Save Directory: Set the folder where the generated icons will be saved. It should be relative to the “Assets/” folder. For example, if you enter “Icons”, then the output will be saved in “Assets/Icons”.
  2. Filename: Enter the desired output filename for the icon (excluding the file extension). A filename must be provided, or else icon generation will fail.
  3. Click the "Save Icon" button to generate and save the icon.

Advanced Settings

You can access advanced settings for more control over icon generation:

Target Focus

IconGenerator can be set up to focus on a specific Target, opening up new options which are especially useful for generating icons for individual 3D models. The Target must have a MeshRenderer component attached. Simply drag and drop a your desired Target GameObject (which has a MeshRenderer component) from the scene hieararchy into the Target reference. The following options will appear:

Camera Positioning

If there is no Target, you can move and position the camera freely like you normally would. But if there is a Target, the camera will be locked in place and cannot move. However, the following options for camera positioning become available:

Batch Mode

To streamline the process of generating icons for multiple models or prefabs at once, the batch mode of IconGenerator allows you to specify certain settings and then generate icons in bulk. Here’s a more detailed explanation of the steps involved in batch icon generation:

  1. Use Batch Mode: First, ensure that the “Use Batch Mode” option is enabled in the Inspector. This will display the batch icon generation settings and hide the options related to individual icons.
  2. Model Directories: In batch mode, you can specify specific folders in your project that contain the models or prefabs for which you want to generate icons. The icon generation will be limited to the models located in these selected directories (and their subdirectories). Only models/prefabs which have a valid MeshRenderer will be used.
  3. Name Contains (Optional): If you want to further filter the models to be processed, you can specify a substring that the model filenames should contain. Only models whose filenames include this substring will be considered for batch icon generation. This option is useful when you want to generate icons for specific sets of models that share a common naming pattern.
  4. Model-Relative Save Directory: Enabling this option allows you to save the generated icons relative to each model’s location. Instead of having all the icons saved in a single directory, each icon will be saved in the same directory as its corresponding model. This is helpful for maintaining a neat and organized folder structure, especially when dealing with numerous models.
  5. Output Rotation: You can set the amount of rotation applied to each model before generating its icon. The output rotation allows you to control the orientation of the models in the icons, providing a consistent and visually pleasing presentation.
  6. Batch Generate Icons: Once you have selected the target model directories and set the desired options, click the “Batch Generate Icons” button. The IconGenerator will then process each model in the specified directories, create icons for them, and save the icons in the designated folders.
  7. Review and Fine-Tune: After the batch icon generation process, review the generated icons to ensure they meet your expectations. Depending on the consistency and variety of models, you may need to go back to fine-tune some settings or adjust the output rotation to achieve the best results.

Misc Usage Tips

Here are some misc usage tips to enhance your IconGenerator experience:

Conclusion

Following these guidelines will help you make the most out of the IconGenerator tool and create stunning icons for your Unity project! Happy icon generation!