I'm trying to figure out the best approach for UV's where 45-50 players will be in one map. Sort of like Fortnite. We are leaning more towards optimization and performance for the game so I was thinking a singular UV set for the whole character would be better.
Would UDIMs pose a bigger problem down the line, especially if I separate the UV's into around 3-4 UDIMs?
Is there any other options or solutions for the UV's?
Thanks.
Replies
My intuition would be to steer away from UDIMs or any SVT solutions as they should be mostly unnecessary. If you can pack everything into a single UV shell that would certainly be desirable, but I think you do have leeway for several texturesets on your characters - if it's 3rd person that's likely to be the biggest thing on screen at any give time.
Thanks for the quick response. What are SVT solutions? Yes, it will be in third person. Is there anything else I need to consider when moving forward with the UVs?
Well ... didn't you just litterally answer your own question, right there ?
Despite the engine, I would recommend to let the engine work for you.
see, if you put all texture in a single UV, you will need a huge texture to maintain texel density for each character. Unreal have very clever ways to optimized VRAM allocation. What you are planning to do, goes in the opposite direction. IF you place all character textures in a single map, even if you have just one character on the screen, you will be loading a huge texture for no reason. And it will be a pita to adjust LOD since the screen size of the character compared to the size of the texture will give bad results with default settings.
Some other aspects you want to keep in mind is, do the character have accessories ? like different outfits, hats, clothing...
My recommendations.
Each character have its own UV, and all objects that belong to that character specifically should be mapped together with that character (if share the same material) to keep draw calls low.
Example: you probably have a different materials for skins, eyes, hairs and clothing. So,
Put all clothing in a single texture if possible.
all hair of a character in a single texture,
all skin parts of a character in a single texture.
normally you want the face to have more details, so you can have the character face to have its own map.
If that character have other accessories that share the same material, put it in the same map.
If you have a specific texel density, and multiples accessories don't fit in the same map. create another one. that's not a problem.
Unreal is good at texture streaming.
Streaming works better if your data is in small chunks.
I wouldn't worry about saving draw calls - skeletal meshes aren't batched so you can't get lower than 1 per character - using 2-300 for your characters is hardly a problem if you don't take the piss elsewhere anyway.
There's nothing wrong with using SVTs btw. They add these things for a reason
... right ?
Each asset (head, body, hair, outfit part A, outfit part B, outfit part C, outfit part D, backbling ...) on its own texture sheet. Then create 45 bogus variants of each (because you have to account for the possibility of the players all wearing different combos. Then test in a real world scenario and profile your specs accordingly.
For us by far the most expensive things are the character drawcalls since they are not batched but use a classic hierachy with attachments on all pieces. 200-300 is far from healthy and it definitely limits our unitcount severely. Its "good enough to work" for us, for like 5-20 on screen but not scalable with around 150-200ish calls per char for us and the programmers and profiler inspections keep telling that.
5 characters with 300 draw calls will correspond to probably a 100-1000 props depending how they are made (especially with static batching/instancing), that is crazy in relation to their size. Our entire game view is around 3000 which is good. If I spawn 10 enemies that goes up to 7000. I remember 6 years ago, 2000-3000 was about the upper end for our machines at the time. And there are of course other performance drawbacks a deep hierarchy with many components bring outside of drawcalls. Maybe this is worlds better on unreal but even then it would be a big waste compared to the rest of the art.
He talks about wanting 50 characters on screen
If you want many characters on screen, atlassing the characters is surely the common practice and if thats a specific concern, keeping all pieces apart is definitely the worst thing to do and most likely the most expensive thing per pixel count on screen you'll have in the entire game.
But who's kidding who, the premise is fragile from the start - as "we'll make Fortnite but better" is the new "we'll make the ultimate WoW killer". An unfathomably complex target to aim for.
Merging the meshes makes no difference to draw call count if you're not also merging materials/textures.
You can merge materials/atlas textures but that comes at a memory cost (unique set of materials/textures per character) - you can do this for specific lods only etc. with the push of a button.
Merging means every skeletal mesh is unique in memory - even if they're made of modular pieces - more memory cost.
Using virtual textures can allow you to batch different materials into a single draw call - the udim stuff . this only works if they're instances of the same base material and does come with an overhead.
Whatever you do, you're trading draw calls for static memory footprint or a need for fast memory - the best choice depends on what you're shipping on and what else is in the game.
if you're looking at xbone/ps4 then you have very little memory and that memory is slow.
if you're looking at gen9/PC then you have plenty of very fast memory and can also handle a shit load of draw calls.