Character's skeletal mesh disappears under Mobile/HTML 5 Preview Rendering Level

We’re working on a mobile game and have a few NPCs whose meshes disappear when the game is set to Mobile/HTML 5, under Preview Rendering Level, and also do not show up on 3 of our mobile devices. They are visible under Shade Model 4 and 5, but this doesn’t help us out for our mobile game.

We have 4 NPCs that are visible and aren’t affected by this problem, and 4 NPCs that are, even though they were all created in a similar manner. Their collision capsules are still visible and the actors can still be interacted with.

Not sure what the culprit could be after investigating. Everyone is also set to Visible, and I reset XForm on the problematic meshes and re-imported to no success.

Any insight to this would be great.

If someone from Epic would reply, I would be more than happy to provide files and screenshots.

https://docs.unrealengine.com/latest/INT/Platforms/Mobile/Content/index.html

"Mesh Limitations

There are certain restrictions on the mesh types supported on mobile platforms due to the hardware.

All mesh types can have up to 65k vertices due to the lack of 32 bit index support on mobile hardware.
Skeletal Meshes can have up to 75 bones."

So in my research, I was able to get all of our NPCs viewable in-game in the mobile/html 5 preview rendering level by greatly reducing the amount of skinned bones in the NPCs, however there were a bunch of inconsistencies. Our main character has 87 skinned bones, and I noticed the rest our NPCs were coming in with that amount or greater. Some were coming in and visible with 94 and 104 total skinned bones, some were only visible at 74 skinned bones, 75, or 80…it was different for everyone. Now I understand NPCs should not have the same amount of bones or more than the main character, so I ended up taking down the amount of skinned bones to 61 for all NPCs, and they were all finally visible in-game. It seemed like total bone count didn’t matter, but the amount of skinned bones that did.

Only skinned bones are sended to gpu and that is the place where the limit is.(amount of uniforms)

It’s skinned bones per chunk which is the limitation from my previous experience. Most likely because each chunk is rendered in its own draw call. Each material slot on your mesh becomes a chunk / draw call. So you can have a skeleton with 150 bones, where two chunks, for example head and body, occupy 75 influencing bones each.

Hey, that’s very interesting.

So if I weight a single skeletal mesh who’s body uses 75 bones and her hair uses the rest of the 75 bones and make sure the shading group is different for each then I should be all set?

Pretty much yes. In simple terms, when you send instructions to the graphics card you essentially say “Please render this group of polygons/vertices with this shader program”. When you want to draw another chunk, it becomes a separate draw call. This is why you have techniques like texture atlasing where multiple textures are combined in one texture sheet, because it allows several meshes to be combined and use the same shader program.

I haven’t dived into the code and GPU instructions, but I assume the same as Jenny Gore is saying, which is that each chunk is sent together with only the influencing transforms and the related shader program. The GPU only has access to the relevant transforms, which is the limit of 75.

That’s such a handy dandy bit of knowledge.

I’ve currently managed to get more than 75 bones on a single SM by binding separate meshes to the same skeleton in Maya. The trick is to only bind each mesh to under 75 bones of that skeleton.

So in essence, I’ve hung many smaller meshes on 1 giant tree (like hanging tinsel on a Christmas tree, only a subset of the branches affects each strand of tinsel)

I’ve also found that each mesh needs a unique material in Maya applied to it (resulting in a unique material in UE)

This is great news as now I can have massive Skeletal meshes on mobile.

Next thing I want to find out is if I’m going to hit any snags doing this (like are there going to be strange shaking issues between meshes when physics is applied to the skeleton)

If anyone sees any problems with this, please let me know and you’ll save me going down this potential rabbit hole!!

Is there a way to remove skinned bones on BeginPlay? Our game is a console, PC game so we would prefer to have the extra details. but we don’t have a laptop right now so we usually show it off on our mobile devices. We already have a boolean that changes settings based on if it is mobile on startup, like deleting post process volumes, changing materials, etc.

It would be great if we could delete the finger bones so that the meshes could render on mobile. Is there a way to do this?