I’ve been able to create a custom content loader using C# script. Which works great for static meshes.
I started work on the content loader for skinned meshes. Current we use LightWave 8.5 and use inverse kinematics for animating complex rigs. When the models are weight mapped in modeler, no more then 3 bones have been set to influence any 1 vertice. How ever during the export process the LightWave API can return up to 8 bones when IK is used.
Is there away to extend beyond the limitation of 4 BoneWeights in Unity and still take advantage of all the features in the Unity animation system?
Unity supports 4 bones per vertex. So there should be no problem (if you only use 3 bones/vertex, like you say), assuming there’s no problems on Lightwave’s end.
Perhaps My question was not clear, I asked is there away to go beyond 4? Mocap uses more then 4, and I’ve never seen a limitation like this in a game engine before, it’s very limiting and strange. This assumes anyone using Unity is only going to do simple animations. But I gather by your answer you mean no.
I guess I don’t understand what exactly you mean. The number of influences per vertex in no way affects how you animate anything. I am working on a boxing game for the iPhone using motion capture right now and am using only 2 bones per vertex. I worked on a Smackdown vs. Raw game for THQ a couple of years ago for PS3 and XBox 360 and our limit was still 4 influences per vertex.
As I understand it, because skinning is handled on the hardware, the next best you could do is 8 influences per vertex, but that is actually very expensive because you have twice as much skinning information per vertex even if the vertices are only influenced by one to four bones.
If you are concerned about the fidelity of your deformation, you need to add additional bones to areas of overlapping influence and animate them (either by hand or procedurally) to correct deformation problems.
Yeah, was going to say. We were discussing this today at work and all engines seem to have this limitation. It should be plenty if you optimise things for realtime.
To be honest Smackdown vs. Raw isn’t the best example for quality complex animations. For example see the latest: Tomb Raider, Soul Calibur or Devil May Cry series.
Actually I’ve worked with a number of engines over the years (since 2000) for various projects for PS2, PSP, PS3, Xbox 360 and computer: Source, Unreal, Torque, Hero’s Engine to name a few. All of these support more then 4 influences per vert and no it’s not expensive. I’ve also developed robust animation systems using both CPU skinning and GPU skinning.
I’ve also worked with motion capture animations in game engines and they use more then 4 weights per vert.
We’ve developed our own animation engine in house since 2005. When tested against other animation systems it yields anywhere from 150fps to 400fps faster.
Source and Unreal 3 are both limited to 4 bone influences per vertex (I’m not sure on the others, but I doubt they support more). As Adam mentions, you can address deformation issues by adding more bones as necessary…
I’m still not sure it’s such a large limitation. There’s no limit of number of bones you can use per mesh of course. It’s just that each vertex only can be affected by up to four bones (from a large pool of total bones that are in the mesh; and each vertex can use different bone set).
My only point was that we were using motion capture (among other animation technologies). The number of influences per vertex only affects the quality of the deformation, not the animation. If the animation did not appeal to you, I assure you it is because of the quality of the mocap cleanup, the retargeting for different body sizes, or any number of other technical problems in making a game with complex animation problems to solve. If the quality of the surface deformation did not appeal to you, then maybe that is due to the number of influences per vertex, but more likely due to the quality of skin weight assignment.
If you look at other recent games that do not use Unreal Engine–Crysis, Fight Night, and Uncharted come to mind–these are using blend shapes to correct deformation problems rather than additional influences per vertex or additional bones.
Ultimately, I feel like whatever is going on is a totally solvable problem without needing more influences per vertex, especially considering how this would affect performance. As to whether or not it would be easy to increase the maximum allowance in Unity, that’s a question for someone like Aras.
For my character animations I need at least 16 weights per bone. My NPCs (not to mention my main hero) are extremely complex and they require very subtle nuances that are only possible with this degree of precision. If Unity isn’t able to fit my needs then I’m going to have to move on to more appealing alternatives. Why has Unity skimped on this essential feature?
Just to demonstrate the constraints Unity is putting on my creativity I’m attaching a picture of the high res character I’m currently developing.
I think there is some misunderstanding here, about weights and what they really represent. What i learned over the time is that a weight is the amount of influence a bone have over the mesh vertex which was assigned for. If this is correct, the speaking about weights per bone is absurd.
A vertex can be affected by up to four bones. That’s the only limitation. There’s no limit to the total bone count, or to how many vertices can a bone affect, or anything else.
Now, which vertex of your mesh might need to be deformed by more than four bones?
Sounds like there is some confusion between “# of bones” and “# of bone influences on a vertex”
of bones = can likely be unlimited; you’ll run out of ideas before you run out of bones. Your character can have many many limbs, and the limit is your imagination.
of bone influences on a vertex = how many bones affect a single vertex to calculate skinning deformations.
For example, a finger might have 3 bones, but only 2 bones will affect any given vertex and still the deformation will look natural like a finger made of skin.
As stated many times in this thread, the limit is 4 bones per vertex, but it is rare / strange if you need more.