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.
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.
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.
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.
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?