VRChat Avatar Tutorial - VRAM Optimization

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hi, I'm Teeh. The VRChat February 16 developer update announced changes to performance ranking, including using VRAM as a metric. But what do these numbers mean? What even is VRAM? And why should you care? This is a graphics card. The specific model isn't important. They all have basically the same stuff on the PCB. This crazy looking stuff is usually pretty boring. Stuff like display interface logic and power delivery. VRAM stores stuff like meshes, shaders, and textures that your GPU then uses to draw an image. Rendered frames are stored in a frame buffer, which is a region of VRAM used to drive display logic and eventually light up the pixels on your screen. Your GPU has to do a frankly unreasonable number of incredibly precise single instruction multiple data operations, so we want to keep it fed with any data it may need, and store any results we want to keep track of. That's why it will usually come equipped with some fancy high bandwidth memory like GDDRX or HBM. But this stuff is expensive, so your graphics card only has so much. When your graphics card runs out of VRAM, the best it can really do is page out to system memory. This is a problem. System memory is very far away from the GPU. Now, instead of talking directly to VRAM, we're going up the PCI Express bus and asking the CPU to do our I.O. Now instead of a buttery smooth 40 frames per second, you're getting a slideshow featuring your live reaction. So what can we do about this? First, we need to determine if we're part of the problem. There are a few different utilities out there, but I really like Thry's VRAM calculator. You can get it using Unity's package manager or download it directly from the GitHub repo. Link in the thing. Once installed, you can find it under Thry > Avatar > VRAM. Drag your avatar from the hierarchy into the calculator window. This tool shows meshes and textures, but for now, only textures count towards performance rank. The biggest bang for your buck is going to be reducing your texture resolution in the import settings. You can click on a texture in the calculator to highlight it in the project window, then select it there to reveal import settings in the inspector. Doubling the resolution of a texture quadruples the number of pixels you need to store in VRAM, so increasing it is an expensive way to add detail, and reducing it is a cheap way to reduce VRAM use and download size. By default, Unity imports textures with the normal quality setting. This is actually a compressed format that uses half the VRAM, but can introduce banding and other artifacts. Choosing high quality is a perfectly valid way of eliminating these artifacts. Crunch compression will make your avatar download faster, but will not decrease VRAM usage. In this case, the texture needs to be decompressed to be usable, so it's only really good for reducing cache footprint and improving network load times. Razgriz has an excellent article covering the differences in more detail if you need some light reading. Link in the thing. There are no best settings, but there are best practices, most important of which is to visually evaluate any changes you make from a distance. It may be tempting to zoom in close to see the impact, but that's not actually how most people greet each other. The size of a texture should roughly correlate with the size of the mesh it covers. It wouldn't make much sense to use an 8K texture on a pair of shoes or glasses, for example. Tiling can be used in certain situations to fake a high resolution appearance. As a last resort, if scaling down loses too much detail and compression introduces too much artifacting, you can just leave it. VRAM is there to be used after all, so if you're happy with your performance ranking, then you're done. By the way, here are the import settings I ended up using in case you still have no clue where to start. That should cover the basics. I've linked my references regarding texture import settings down below. If you need any help, feel free to join us on Sipp's Discord in the appropriate channel. That's all for now. See you next time.
Info
Channel: Sipp's Avatar Box
Views: 38,805
Rating: undefined out of 5
Keywords:
Id: 8F9K1QEPF6A
Channel Id: undefined
Length: 3min 49sec (229 seconds)
Published: Sat Feb 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.