Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

AIAssetGeneration - Open Source ChatGPT Libary

Discussion in 'Assets and Asset Store' started by DDSDevel, Mar 26, 2023.

  1. DDSDevel


    Mar 25, 2023

    Github | Website | Quick-Start | Documentation

    Like a lot of other creators out there, I am excited about the possibilities that ChatGPT and AI Asset Generation can offer game creation. I decided to create a Free and Open Source package to help utilize the OpenAI API for text and image generation in editor.

    NOTE: To use this library, you will need a valid OpenAI API key.

    • Open Source, MIT Licensed
    • In-Editor generation of textures, scripts, shaders, and raw text.
    • Support for generation of edits and variations of existing images.
    • Extensible and customizable
    • Support for multiple chat models

    The core concept is that we will provide ScriptableObjects called "Generators". Each "Generator" will output an asset - either a text based asset or an image based asset. The idea is that you will create multiple generators and check them into your project's version control. This will give persistence to the queries that generated your assets. The advantage to this approach is that:
    1. You document the prompts that generated your assets for future collaborators.
    2. You can tweak your successful prompts in the future as your project evolves.
    3. You can reuse queries between projects, and share queries easily with other collaborators.
    We provide documentation on how to extend our system. The concept is that however your game's content structured, you can build a generator that will query ChatGPT and map it's response to your data formats.

    Successes / Failures

    If you haven't used ChatGPT or DALL-E, it can provide some amazing assets, and sometimes it can fail to hit the mark. Recommendations:

    1. Try to make your prompts as specific as possible. If you aren't getting the results you want, try to add more specificity.
    2. If specifics aren't getting good results, try rephrasing your query.

    Image Generation:

    Script Generator:

    Text Generator:

    Example Scene with AI generated assets (including shaders and scripts):

    main-image Large.jpeg

    This is my first time Open-Sourcing a Unity library, so I am welcome to all feedback and criticism. I hope at least one person can find this useful for creation!