Download

Question about bone Count on hero characters.

Do I really need to watch out for the bone count in unreal on hero characters? I mean to a certain reasonable degree.

I’m a little at odds on the information I am finding online about this matter.

In one thread and answer hub it is mentioned that bone count can go up to 255 bones in UE4, but this may not be enough for detailed hero characters and more complicated animations, then again I was able to import a test mesh with more than 500 bones in one go inside unreal and it seemed to be playing fine. But is there a hidden potential issue to watch out for?

On average a good basic facial rig can easily go up to 200 bone structure (not the rig in base 3d application but the final exported bone count to unreal), plus that with a base bare minimum bone structure in any human character with 5 fingers can easily be at 60 - 80 bones, this is already passed the 255 mark the threads seem to be talking about. You still have the extra bone setups for the armor, (rigged) cloth, hanging elements, (rigged) hair and you are easily exceeding to over all 400 - 500 bones structure.

Why is the talk about the 255 mark? or is it some kind of performance bottleneck? If so from the quick tests we’ve done we didn’t see a major performance issue on higher bone counts on one or two rigged meshes per screen.

Any info is much appreciated.

Hi,
the 255 bone count limit comes from the fact that bone lists are stored in a byte. Now contrary to what some people say, this hasnt been changed to 2 bytes. Else we would be able to store 65k bones. But no, instead its 2 separate byets which is simply doubling the number. I guess beyond 511 you could still operate, and itll just introduce a third byte. The way this works is it associates bone groups with material elements. So if you have a body with lets say 400 bones, then its material element will be split so that 255 bones can go on one copy, and the remainder on the other (Thats what you call a “second draw call”). A downside of this is that you cant use tesselation on this kind of setup as the two material elements will create wiredness on their seams.

Now take that info with a grain of salt, these have just been my own observations. Id love to see a more in-depth core documentation on all these technical things, but UE4 really sucks hard on that one -.-

Personally I find this way of implementation for it really disadvantageous. With hardware these days we really are able to push the limits of character deformation. And the current way UE4 is handling bone limits is not helping. Anyway, other than that it works, my current character stuff im working on has around 690 bones spread over body and costume and Im having no issues in terms of performance tried up to 35 instnces of such a character in a scene and it was still running high. Im not using tesselation either so thats no concern for me neither. I do have a lot of helper bones in the body to maximize deformation quality which are handled in maya and baked into the fbx animation files. But a better way would be if those bones can be a secondary asset or something and handled in realtime (im planning to write a few c++ things for that someday). But anyhow, given you have a good overview of your pipeline and know what to do when and where, going full skeletal is definitely no big deal in the engine.

Thats just my 2 cents here. Id love to see a statement from the actual devs on plans to make skinClusters become independent from material elements.

Hey man thanks!

This is good enough input for me. Yes it would be great to have these things documented somehow.

When you talk about that it would split the material elements after a certain bone count, what do you mean exactly?

In all cases the material id’s are already split on more complicated characters such as the head as one mat id element, body another etc… So this should not be really a problem right? unless the head alone exceeds the 255 number then it would split the head material element into two, Is this split happening visually as in you will see two mat id elements suddenly created? Sorry, I know i will try it out myself and probably get the answer at some point.

But I think i sort of understood it the general idea.

Regarding displacement, I found that to be a little unpleasant in results when it came to deforming objects. It just never really worked right, maybe its good for hard surface areas but more organic areas like head/face it seems to be more tricky business, I’d rather import higher poly than go this route at this stage. But will give it a second look.

Yo, so yes, it simply creates two material elements for your mesh. In my case for example the character consists of naked body, eyes, eyebrows, eyelashes, hair, nails, teeth, tongue as separate meshes with separate shaders. The body mesh is the mesh that has around 390 bones atm. That material then has two verisons. So Element x and element x+1 where both are actually exactly the same and can only be modified in tandem (set something on one, it will do the same for the other) That then is what distributes bones exceeding 255.
No you wont notice any seam at all unless you run realtime tesselation.
In regards to that: We have a guy doing shaders and he managed to get a really nice realtime subdiv shader going on for moving deforming character skin, and thats even considerably fast, no real performance hit. But that is bugging a bit around where the material elements seam.

Thanks a ton bro! Works well, I’ll give that tessellation a second look. I think i just tried it again and the curvature seems to be happening, mustve been using the old method looks like PN triangles work better.

Yea we are using component built player models as well and it’s working out great. Just have to make a few different body shapes bolt on a unique head and some funky hair and ta da done. Our character model artist love it as they can focus more in zbrushing making fashions for what ever base character we bolt together.

In theory there is no limit to the number of bones you can add as part of a component model and the performance curve I would expect to be far less that whatever shaders and materials you have applied to the model.

The down side is it’s not fun at all to skin weight to 500-600 bones.