While machine learning and generative AI content creation are great, I don’t really need help creating game content. I’ve already got too much. I need help optimizing the content I add so it runs smoothly.
Performance optimization is one of the least fun, most time consuming parts of game creation, at least for me. It’s also something that cries out for better tools, based on expert systems. Things like mesh, texture, and shader optimization, LOD creation, finding script bottlenecks, and chasing down other common issues are exactly the kinds of boring repetitive tasks that AI should excel at. Using it for things like this would also avoid most of the ethical issues surrounding AI generated content, since content creation would still be handled by humans, and only the drudgery of making it game ready would be handed off to an AI assistant.
So I have 2 questions:
Are there any AI optimization tools available now? I know there are a number of tools and procedures for doing these tasks manually, one asset at a time. What I’m looking for is something that can analyze a large project, and at least handle the low hanging fruit more or less on its own.
If not, are there any plans to provide such tools at some point? Big studios might be able to hand jobs like this off to minimum wage junior staffers, freeing their creative talent to actually create, but independents need to do it all themselves, which bogs the whole process down immensely.
It’s boring, repetitive tasks that computers generally excel at. But not when it comes to making decisions that have many parameters to consider, especially when those are interdependent or aesthetic.
The AI could be great at looking at your meshes, textures, shaders and scripts and then making changes to them in order to improve performance if you don’t mind modifications that look terrible or introduce bugs or break the game.
Reducing mesh and texture complexity is already a solved problem, especially in regards to textures: downscaling and compression. For meshes, it still requires a human to understand the intent and the boundaries. Do fewer polygons matter? Does the reduction cause issues with IK animations? And so on … but anyway, you do get the process of generating LODs which is relatively automatic, and in some cases you can use impostor billboards and (static) mesh baking.
Since you mention the low hanging fruits: they are hanging low for you to pick them up. Most of the time that’s actually enough. It can be as simple as looking at your profiler, deciding whether the game is CPU or GPU bound, and then making just the one or two obvious changes.
I know, very few people like to do that. I’m one of them. Nothing beats seeing your framerate increase by 20% just by flipping a checkbox here and rearranging some method calls there.
I agree with @CodeSmile mesh, texture, and shader optimization, LOD creation, you can script/do automatically even involving Ai parts or traditional algorithms. Nanite in Unreal is a system that kind of does that.
I would never do something like code optimization via Ai though. The code is just too important for any software to let a statistical model, that does not really understand anything even though it writes correct text, modify it. Having a general solution Ai that “optimizes” a project seems difficult, since every game has different requirements and performance properties. How would one communicate those to the Ai?
Maybe the thing I really want is a system that can look at all the many assets in a large project, and suggest which ones would benefit most from some form of optimization. Looking at profiler traces for too long makes my eyes glaze over, but spotting hidden patterns in data is something AIs are famous for. Just give me a prioritized list of the assets and scripts that are causing the biggest performance hits, and I’ll work through it. Suggest what form the optimization should take: mesh simplification, LOD generation, texture/draw call reduction, or whatever, and I’ll have a starting point at least. Identifying and prioritizing which ones need to be focused on has always been the hard part for me. After that, fixing them can often be done with more traditional tools and techniques.
And yes, mesh geometry and texture optimization on hero models is still best left to humans - for now. I’m not convinced an AI couldn’t learn best practices for doing this, but it would take a massive amount of training, and I’m not sure who would pay for it. In the mean time, suggesting which models in a scene would benefit most from certain types of optimization would be a good start.
Maybe AI isn’t a silver bullet for every problem, but since it’s already being used to create game assets, why not use it to make existing assets better?
Yup I get what you are saying. I just think the term AI isn’t necessary for that really. Have you thought about how far you can come with just statistical analysis and automation? Aka. a script that does some scene statistics and based on that automatic optimizations. E.g. Give me all mesh renderers above a certain poly count, that are used more than 10 times and don’t have LODs → generate LODs for those; Give me all renderers that have multiple Materials using the same shader → bake Atlas for those. And so on.
Using automation for that is absolutely crucial, especially for indies like us. Why involve machine learning, if all the executive decisions could be done via simple math? If you do some counting and statistics on poly counts, texture sizes, visibility time, etc. you can script and automate that process, while still having full control and deterministic results. How could Ai do that any better? All of the parameters are known here, I think the strenghts of recent AI is in fields where not all the parameters are known, that’s where machine learning excels.
AI is certainly not the magic bullet for every problem, just because it’s the latest “next big thing”. But there are different kinds of AI - from generative AI that creates new things after being trained on huge databases of similar things, to more rules based “expert” systems. I’m leaning more toward the second type. I’m no expert on analytics, game optimization techniques, or scripting queries like you’ve suggested. And as an indie, I can’t afford to hire someone who is. What would be great though would be a tool that could crawl through a project, doing all that analytical grunt work, and then provide a prioritized action list for me to follow up on. As far as I know, no such tool currently exists - at least not publicly - and most of this work currently falls on experts at each company, or custom in-house tools that aren’t available to indies.
While it’s possible to cobble something together with available tools, like LOD, imposter, and atlas generators, it still wouldn’t tell you which parts of a project to focus on. I’ve taught myself everything I know about game design and coding, so I’m well aware that there are huge gaps in my knowledge and skill set. That’s why the thought of an AI expert looking over my shoulder, making helpful suggestions about better ways to do things, when I can’t see them myself is so appealing. I’d rather have AI / automation help developers make better games, by taking over some of the more tedious parts of the process, rather than stealing the hard work of others to create generative art.