Skip to content

Miner28/AvatarImageReader

Repository files navigation

Want to see it in action? Visit the Demo world

Want to upload automated membership lists from your Discord server? Invite bot to your Server

AvatarImageReader GitHub GitHub Repo stars GitHub all releases GitHub tag (latest SemVer)

Allows you to encode text into images and then read it in VRChat. Uses Avatar Thumbnail Images to store and load images. Works on both PC and Quest.

image

Made by: @GlitchyDev, @Miner28, @BocuD and @Varneon

Special help: @lox9973 for Quest support

Special Thanks: @Merlin for making UdonSharp making any of this possible

Installation

  1. Download the the repository's .zip here
  2. Unpack the .zip somewhere
  3. In VRChat Creator Companion, navigate to Settings > User Packages > Add
  4. Navigate to the unpacked folder, com.miner28.avatar-image-reader and click Select Folder
  5. Avatar Image Reader should now be visible under Local User Packages in the project view in VRChat Creator Companion
  6. Click Add
  1. In the Unity toolbar, select Window > Package Manager > [+] > Add package from git URL...
  2. Paste the following link: https://github.com/Miner28/AvatarImageReader.git

Import from Unitypackage:

  1. Download latest Avatar Image Reader from here
  2. Import the downloaded .unitypackage into your Unity project

Update 3.0

  • UTF-8 Support (upto 2x increase in maximum text storage)
  • Improvements to decoding process resulting in faster decoding

Update 2.0

  • Now supports Alpha encoding which allows 33% increase in data storage
  • Allows multiple avatars to be queued up for decoding. Theoretical unlimited text storage!
  • Added public discord bot for linking and automatic uploading of users with specific roles. Invite to your server

Example use cases

  • Dynamically updated calendar/events
  • Any text in your world that you want to edit without re-uploading
  • Automated Supporter board/Supporter access
  • Persistant world settings (via custom discord bot)

Requirements

Documentation

Setup

To set up a new AvatarImageReader, use the menu item Tools/AvatarImageReader/Create Image Reader. For easy testing you should probably pick the option with a TMP. The next step is linking an avatar to the system. To do so, click Set Avatar. This will open up a window from where you can select an avatar to use. Keep in mind that the avatar should be uploaded at least once. To encode text for your pedestal, use the inspector tool and click Encode. Using the Upload Image to Avatar button will upload your changes to the avatar. If you now launch a local test client, your text should load in game.

Updating text

The easiest way to update the text contents is to just use the inspector for an existing pedestal. You can change the text in here, reencode and then reupload. The menu item Tools/Avatar Image Encoder can also be used. Alternatively you can also use a discord bot that will provide you with avatar-id and automatically update the avatar image periodically with latest data. To create your own custom encoder system, you can use AvatarImageReader/C# Encoder/AvatarImageEncoder.cs as reference. As an alternative a python encoder is also provided.

Getting decoded text

RuntimeDecoder contains a public variable outputString that will contain the encoded text once it has been decoded. To be sure that decoding has been completed you should use the option Send Custom Event on finish and send an event to whatever UdonBehaviour you want to access the output string with.

Max Image Size by Platform

Platform Resolution Bytes Size Characters (UTF-8)
PC 1200 x 900 4,320,000 4.3MB 1,080,000 - 4,320,000
Android 128 x 96 49,152 49.2KB 12,288 - 49,152

Chaining avatars has theoretically unlimited capacity, but will lead to increased CPU load upon joining the world