Home Technical Talk

Best Character UV Layout for a game that will contain 45-50 players at one time.

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

  • rexo12
    Offline / Send Message
    rexo12 interpolator
    From a graphics optimisation perspective the real question is how many players will be on screen at any time and at what LODs, rather than how many in the map. Also work out your target hardware.

    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.
  • dilltheman
    rexo12 said:
    From a graphics optimisation perspective the real question is how many players will be on screen at any time and at what LODs, rather than how many in the map. Also work out your target hardware.

    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?
  • rexo12
    Offline / Send Message
    rexo12 interpolator
    UDIMs are handled as Streaming Virtual Textures (SVT) in unreal engine. Sorry, I've just realised I've assumed that's what you're using, disregard me if it's not. I'm not sure what the state of UDIM support is in any other engines.

    Is there anything else I need to consider when moving forward with the UVs?
    to have fun
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    "Sort of like Fortnite."

    Well ... didn't you just litterally answer your own question, right there ?
  • dilltheman
    pior said:

    Well ... didn't you just litterally answer your own question, right there ?
    I was giving a comparison of the size of the game. I don't know what sort of UV layout Fortnite uses for their characters.

  • Neox
    Offline / Send Message
    Neox godlike master sticky
    pior said:

    Well ... didn't you just litterally answer your own question, right there ?
    I was giving a comparison of the size of the game. I don't know what sort of UV layout Fortnite uses for their characters.

    that is really not hard to research tho. for one there is unreal engine for fortnite which iassume gives you access to some of it? buit besides that, sketchfab has a ton of fortnite characters ripped, so you can just check it out there.

  • GlowingPotato
    Offline / Send Message
    GlowingPotato polycounter lvl 10
    What engine are you using ? UE ?

    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. 




  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    That is the correct answer

    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 
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    A wild guess if I may : the OP probably also wants full-on character customization - including head and hair swapping, and fully unique outfits with colorization.
    ... right ?
  • dilltheman
    A wild guess if I may : the OP probably also wants full-on character customization - including head and hair swapping, and fully unique outfits with colorization.
    ... right ?
    That would be correct.

  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Well that's easy then (and not at all like Fortnite).

    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.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    poopipe said:
    That is the correct answer

    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 

    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.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Well, keeping the pieces separated may not be the final result (ie : the best optimized answer for a specific game) ; but for a development process starting from "we want something like Fortnite, with 50 characters on a map but also with full character customization", I'd argue that keeping everything separated is definitely the healthy approach, simply because it is easy to go from split assets to atlased assets rather than the opposite when the performance sh*t unavoidably hits the fan ... 

    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.
  • Shrike
    Offline / Send Message
    Shrike interpolator
    Can't you merge / atlas the characters on runtime in unreal? Im inexperienced in that since we've never done it but I must assume that this is how people go about this, since you gotta have a merged character but also gotta have a switchable loadout - I can't imagine that all games with flexible slots have unmerged characters (?)
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    You can merge skeletal meshes - i think it's c++ only but it's doable

    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. 


Sign In or Register to comment.