Rewarding avatars that use optimization
complete
GiveMeAllYourCats
Right now the SDK seems to only worry about polygon limit, which I learned is not that big of a performance hit in VRChat. Things like combining textures and meshes in blender actually help more.
We should reward avatars that seek out these optimization technique's
We could have some sort of optimization score per avatar that determines the amount of polygons that can be used, for example:
If you have only 1 mesh and 1 material your polygon limit will increase to 40-50k
if you have 2 mesh and 1 material you get 30-40k polygons.. etc, etc..
(Dynamic bones could also be taken into consideration with this equation, counting total child bones for example)
Right now there is no incentive for people to use optimization other then being nice :)
Log In
Aev
complete
Avatar performance information has changed significantly with VRChat 2018.4.4!
ivankazuya
Interesting idea, I'm not to certain about the rewards, however. Perhaps they can be rewarded in-game with custom fancy VRChat name tags.
Osairis Pengel
I tried texture atlas
But half of my textures needed either a cutout modifier on the unity shader, or a transparency. Without those the face looked like a white blur.
You can't exactly exclude parts out of a texture unless you need only cutout for example.
M SC
Problem is.. that having 1 material will prevent you to properly use transparent materials. Meaning if I had created special faces to simulate hair shadow cheaply, it would now show up as one dark blob, ruining the character and easthetic. The exact numbers you've told here are probably just ideas, but to make this properly, there has to be a performance analysis. It will take a lot of time to properly do that research. I use a lot of optimalisation btw.
Hagbard Celine
M SC: Cant you use a transparency mask?
Laser
on a side note : trc mentioned that only. 35000 polys can be used in one cpu render call... so the reward would generate another cpu call
Jazneo
other problem people need to learn how to make mask shaders if they want if eveyone want to use 1 material
Laser
I like the idea of rewarding but it should only be used to a degree. scripts also take cpu calls and when the rewards system is too much it might actually hurt the creative aspect
Hagbard Celine
That would allow us to use tools like Fuse or MakeHuman that can give us high poly single skinned meshes with one big atlas texture.
So far we have to rely on low poly assets in these tools or decimate the result after or the asses before in blender since most of this stuff is really high poly for VRChat standards.
But as Kouki mentioned it is sometimes just better to use a spec shader for the metal dress and a standard shader for the skin. Or a part of the skinned mesh needs a double sided shader. I bet all of this could be done with a custom shader but that would make the process of creating an avatar even more complicated not just for people new to the VRC SDK.
If it really helps the performance why not? To be honest I'm sick of a bad framerate in rooms full of really bad optimized(but still cute) anime girls.
Even the default Y-bot has probably more than 20k polys, 2 skinned meshes and 2 materials. That's cheating in your own game guys.
But that should be the point where we meet. 30-40k poly, 2 skinned meshes/materials for body and cloth and the hair as a standard mesh is attached as a prop to the skull and can have a third material. The lower you go with the polygons the more materials and maybe skinned meshes are allowed.
A stress test would be easy. Just gather 64 anime girls(10 if you find some really bad examples), bring them to your world and tell them to use the default Y-bot. Check the frames per second before and after. The hard part is to convince them to learn blender..... :-D
tupper
Hagbard Celine: I feel like this post is full of a lot of misinformation and assumption. A lot of the "anime" community has been on the forefront of pushing for optimization-- I myself have made videos on how to do texture atlasing, mesh merging, and other techniques to reduce draw calls and increase performance. If you had 64 people in a room, it doesn't matter if they were wearing MMD imports or Y-Bots or a bunch of boxes attached to arms/legs... you're going to have lag. IK is the BIGGEST source of CPU lag right now, and that doesn't scale with how well someone has optimized their avatar. Basically, accusing people based on the style of avatar they use really isn't going to do you any good.
For one, Cubed's Shader is what a majority of your "badly optimized anime girl" characters use. It is a single-pass, double-sided shader. It is _already_ a custom shader written essentially just for VRChat. Yes, you could do some subshader shenanigans and go from two materials down to one, but that's focusing optimization efforts on high-effort, low-return targets.
A stress test _is_ easy! Clone your avatar with, say, 3 materials and one mesh in a Unity scene. Clone it 10 times. Nah, do it 50 times. Maybe even 100. Check your framerate and tell me-- does that look like VRChat performance? I guarantee you that you're running near 90 FPS, and that's because you're focusing a lot of effort and accusation where there really isn't need. IK is one of the biggest culprits, which you've ignored in your post.
Finally, thanks to the availability of videos on the subject, importing MMDs is often where a lot of people go for their first avatar. The videos I've created try to focus on optimization as much as possible as it goes, and in fact I have a video _specifically_ about optimization techniques and why its important. However, a new user has to be prompted to learn by other users right now, which is why a big yellow "hey, you've got 10 skinned mesh renderers in your avatar, that's no bueno" warning would make people curious and want to fix it. I personally don't think "rewarding" behavior that should be by default is all that great of an idea, but hey.
So, tl;dr: Draw calls are important, but effort has been made by the very community you're accusing to find and fix the biggest sources. Tutorials are available and help is given often to help with optimization. The biggest culprit of lag in populated rooms right now isn't draw calls, but IK/Dynamic Bone overuse. Despite that, we try to minimize draw calls. Polycount, once again, doesn't matter for performance. Avatar style does not affect performance.
Sorry if this post seems a bit hostile, but you're making a ton of assumptions, you're carrying around some misinformation, and you're basically judging people on the type of avatar they choose. That's kinda a shitty thing to do.
P.S.: Pretty much all of the "anime" crew has picked up and learned Blender from zero to where they are now (myself included) as it is an essential tool in the import process. Maybe, if you didn't make so many assumptions, you'd know that. :>
Hagbard Celine
tupper: It got a lot better over the last lets say two month. But there are still a lot of bad examples out there. You are of course right about other things influencing the fps. It wasn't long after I wrote this(few hours) when I was listening to TLC talking about all the network overhead and how demanding the voice stuff alone is. Not to mention the IK. It was never meant to be used with 64 people(full body tracking makes it even worse). He mentioned single digit user numbers they had in mind.
That made me regret what I wrote a little bit. But what can I say my worst experiences frame-rate wise have always been related to rooms full of anime avatars or general server problems.
As I said it's getting a lot better but it's still far from perfect. But now I see there are many different reasons to consider and sometimes just one really bad avatar with particles or demanding shader magic can kill the fps and make anyone in the room with a 'bloated' avatar look guilty. If I offended you or anyone else wearing anime avatars I'm sorry. I't was just the most obvious example that came to my mind, based on what I experienced.
Kalista Phoenix
there is also the matter of limitations of materials. To have some parts have more Shine and gloss, where there is no texture map that can allow that for a single material to span the whole model. Otherwise it'd be a simple rearranging maps to a 2x2 grid or something like that and just tiling the textures into one larger texture. ( I do still need to learn some UV techniques.)
Kouki Elska
Kalista Phoenix: This is another concern I had. I use multiple textures even for one mesh sometimes, because they require different shaders. Even anime characters, such as those using the Cubed Paradox shader, despite that it is flat-shading, you sometimes do need to use multiple of the shader to choose which parts will have the outline and which do not... parts like the eye hole and sometimes mouth need to have the outline option turned off, while the rest of the body needs the outline on, requiring at least 2 materials, to achieve the proper animated/drawn look, and 3+ materials if you had the face on a separate texture. Even more for me since I use a repeated hair texture for my characters' hair, which I often need to adjust the repeats and use it for all my avatars, and having that combined with any other texture would make it difficult. Also because I am making a body base which is pre-textured for any clothes I will add to it later, I do not want to mess with the UV mapping at all, because it's a huge pain to deal with. So really, 4 or 5 is the least I could do, and that's not counting normals/specular/etc.
For more realistic things which need actual texture depth, I also need to use different diffuse/normal/specular images which are their own image files and often need to be seamlessly repeating/tiled, so they cannot be combined with any other.
tupper
I don't think rewarding or punishing optimization is ideal. On top of that, I believe that the limits established here are too strict-- there are legitimate reasons that you might use more than one mesh or one material. Rewarding people for meeting these might result in things like "you can only attend this event if you have an avatar with one material, no dynamic bones, and etc". On top of that, this particular implementation ignores multipass shaders.
If a system like this is implemented, it should be done while consulting with the community members who have been working with profiling VRChat to find sources of bad performance. There are some very smart people in our community-- leverage them!!
On top of that, the "reward" in this suggestion implies a misunderstanding of how polygon count affects performance (e.g. it doesn't). The polycount should simply be lifted to 65,535-- which is the number of tris Unity permits in a single skinned mesh renderer.
This post, along with some discussion in #features-request on Discord, spawned my own Canny suggestion:
GiveMeAllYourCats
tupper: voted, I think everything you have explained is perfectly reasonable, however the incentive to have a optimized character is still not there, now we get a bunch of warnings and people can be aware but we still have to depend on the good nature of people to optimize, there are no downsides for people that choose not to optimize.
This 'reward' in increased polygons could be a solution to it (or something else, i'm just glad we got a ball rolling now about avatar optimization)..
Also the increased use in polygons is not to balance the performance hit.. it is merely a reward for those that use optimization. Although I do agree the current polygon limit is too low.
tupper
GiveMeAllYourCats: I dunno.. the problem with the scaling that you have in your posting is that its not really reasonable. There's legitimate use cases for more than one material and more than one mesh (different shaders and pop-in objects, for example). If I decide to have a sword that I can trigger via an override on my avatar that's normally one mesh renderer and one material, that now means I have two and two. Should I be regulated down to a lower poly-limit because of that? It seems to imply I'm trading one "optimization" for another, which isn't true. It doesn't really make sense.
Maybe if the scale was broadened, that'd be better. But in reality, here's my main point: Optimization should be its own motivation. The community should see someone with 10 skinned mesh renderers, and should immediately respond with "Join those meshes!" Thankfully, they do-- if you post for help in #avatars right now, and you have a ton of extra meshes or materials, someone's gonna speak up. I think that the warnings themselves should be the first step, and if that isn't motivation enough, then "rewards" should be implemented. But doing it right off the bat sets a bit of a negative precedent.
GiveMeAllYourCats
tupper: the scaling is an example. forget about that, it can be anything. Also you are not trading anything because we already have a 20k limit, if we have avatars that are optimized they will be able to go over that limit that's how I had this idea in mind.
I agree that we should test it out first, but right now there is also not a easy way to know: hey! you are causing lag right now in-game
Kouki Elska
This could be nice, though I think also it shouldn't be punished to use multiple textures (not sure if that's what is implied), as some people like myself tend to make parts such as the face separately for the sake of preserving shape keys while being able to make edits to the rest of the mesh, or to more easily make UV maps.
I think the resolution of the texture is another factor to consider as well, though, as sometimes that could be the bigger factor such as if a person uses an eyeball texture with the size of a desktop wallpaper. Meanwhile some people use multiple very low resolution textures which should not cause lag. So it'd be nice if it could calculate more than just the quantity of textures, but a combination of both quantity and resolution. Also, non-cutout transparency can cause lag for some people, so there's also types of textures/materials to consider.
Perhaps there is a way to calculate the rendering cost as a whole rather than just poly count or textures, combining all these factors?
tupper
Kouki Elska: Texture resolution has little to no effect on frame render time-- its mostly VRAM. Modern video cards have lots of VRAM to spare.
Load More
→