UE3 - UDK BoneIndex out of range of ParentBoneMap with modular pawn

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Nathaniel3W

Member
Nov 11, 2012
48
0
6
I was looking for an answer to this problem on the Epic forums. It looks like lots of other people are running into a similar problem with modular pawns and I don't know if anyone has a sure solution. Maybe I'll have better luck on a smaller forum that still gets watched by some UDK rockstars.

In my pawn's default properties, I'm putting in some SkeletalMeshComponents as directed in http://udn.epicgames.com/Three/DevelopmentKitGemsCreatingAModularPawn.html. As far as I can tell it looks like all of the meshes are showing up where they're supposed to. But in the log, I get lots of errors like this:

Warning: GetBoneMatrix : BoneIndex(0) out of range of ParentBoneMap for SkeletalMeshComponent_1

For each SkeletalMeshComponent in my modular pawn, I have a different set of bone indices that are out of range of their ParentBoneMaps. I'm not sure what's causing it. I would just ignore the problem, but when I try building up the pawn more with physics assets and animations, then I get tons of errors on every tick, which I think stem from this "out of range" warning. Any thoughts?
 

Nathaniel3W

Member
Nov 11, 2012
48
0
6
Nooooooo!!!!! I put in such a long response and it's all gone! Gone! Ugh. Let me do this again........

OK, at first my pawn got its skeletal mesh from its FamilyInfo class, and everything was fine. It behaved just like a regular UTPawn. I could change things, like the AnimTree for example, in the Pawn's default properties:

Code:
	Components.Remove(WPawnSkeletalMeshComponent)
	Begin Object Name=WPawnSkeletalMeshComponent
		AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.HX_FreeArms_2'
	End Object
	Mesh=WPawnSkeletalMeshComponent
	Components.Add(WPawnSkeletalMeshComponent)

And then it would use my new animations, and everything was fine. But if I tried giving it a modular mesh, like so...

Code:
	Components.Remove(WPawnSkeletalMeshComponent)
	Begin Object Class=SkeletalMeshComponent Name=HeadSkeletalMeshComponent 
		SkeletalMesh=SkeletalMesh'PLAYERMODEL_VR.UT3_MALE_HEAD'
		AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.HX_FreeArms_2'
		PhysicsAsset=PhysicsAsset'PLAYERMODEL_VR.UT3_MALE_HEAD_Physics'
	End Object
	HeadSkeletalMesh=HeadSkeletalMeshComponent
	Components.Add(HeadSkeletalMeshComponent)

	Begin Object Class=SkeletalMeshComponent Name=TorsoSkeletalMeshComponent  
		SkeletalMesh=SkeletalMesh'PLAYERMODEL_VR.UT3_MALE_BASE'
		PhysicsAsset=PhysicsAsset'PLAYERMODEL_VR.UT3_MALE_BASE_Physics'
		ParentAnimComponent=HeadSkeletalMeshComponent
		ShadowParent=HeadSkeletalMeshComponent
	End Object
	TorsoSkeletalMesh=TorsoSkeletalMeshComponent
	Components.Add(TorsoSkeletalMeshComponent)

Then I would get these errors in the log when I started the game:
Code:
Warning: GetBoneMatrix : BoneIndex(0) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(8) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(9) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(10) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(11) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(12) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(13) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(14) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(15) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(16) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(17) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(18) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(19) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(20) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(21) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(22) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(23) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(24) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(43) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(47) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(48) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(49) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(50) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(51) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(52) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(54) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(55) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(56) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(58) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(59) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(60) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(61) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(62) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(63) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(64) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(65) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(66) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(67) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)
Warning: GetBoneMatrix : BoneIndex(68) out of range of ParentBoneMap for SkeletalMeshComponent_1 (UT3_MALE_BASE)

And I get these errors on every tick:
Code:
Log: UpdateRBBones: WARNING: Failed to find bone 'b_Root' (0) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_Hips' (8) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftLegUpper' (9) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftLeg' (10) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftAnkle' (11) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftToe' (12) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftLegUpperRoll' (13) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightLegUpper' (14) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightLeg' (15) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightAnkle' (16) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightToe' (17) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightLegUpperRoll' (18) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_Spine' (19) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_Spine1' (20) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_Spine2' (21) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftClav' (22) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftArm' (23) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftForeArm' (24) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_LeftArmRoll' (43) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightClav' (47) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightArm' (48) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightForeArm' (49) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightHand' (50) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightMiddle1' (51) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightMiddle2' (52) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightIndex1' (54) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightIndex2' (55) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightIndex3' (56) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightThumb1' (58) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightThumb2' (59) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightThumb3' (60) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightRing1' (61) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightRing2' (62) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightRing3' (63) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightPinky1' (64) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightPinky2' (65) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightPinky3' (66) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightForeArmRoll' (67) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
Log: UpdateRBBones: WARNING: Failed to find bone 'b_RightArmRoll' (68) need by PhysicsAsset 'UT3_MALE_BASE_Physics' in SkeletalMesh 'UT3_MALE_BASE'. SpaceBases Num: 0
And the pawn's mesh doesn't animate. It'll slide around like a statue, and it'll hop when I press the jump button, but it doesn't animate.

The meshes work just fine when I put them together in the UDK editor's animation viewer. They have all the same bones and everything, and they animate properly in the editor. But they don't work in the game.

That's probably more information than you were expecting. I'm not sure if you know how to fix it, but if you've ever made a working modular pawn before, I'd love to know how you did it. Thanks for taking a look.
 

VendorX

Member
Aug 2, 2010
231
6
18
BXL/Paris
It's because YourPawn is extending UTPawn, which depend on FamilyInfo... Each time when new UTPawn is spawned, all mesh related data (animations, physics etc.) are reinitialized.

First log (is telling you that Mesh.AnimSets are null) + second (is about Mesh.PhysicsAsset) = Mesh is null.

Is not easy to override that dependency... Look into UTPawn.SetCharacterClassFromInfo - from where is called and which changes/updates are made.
 

Nathaniel3W

Member
Nov 11, 2012
48
0
6
Thanks VendorX. You sent me in the right direction. Here's how I solved it:

In my FamilyInfo class, I set the WPawnSkeletalMeshComponent to the parent skeletal mesh component of my modular pawn. Then in the pawn's default properties I added the other skeletal mesh components. The whole pawn is animating mostly correctly now. Now on to other bugs...

Thanks again.
 

Nathaniel3W

Member
Nov 11, 2012
48
0
6
Well, it's a long story, but here we go:

I'm working on a VR project for the Oculus Rift and Razer Hydra. I want to be able to see my hands in-game, so I have to set the UTPawn to behind view. But then to get a realistic viewpoint, the camera has to be set inside the pawn's head. And when I move around in game, I can see the pawn's head moving. I can hide the pawn's mesh from owner with bOwnerNoSee, but that hides the entire mesh, and I can no longer see my hands. So in order to hide the pawn's head, but continue seeing the pawn's hands, I have to load the meshes individually as a modular pawn, then hide just the head.
 

VendorX

Member
Aug 2, 2010
231
6
18
BXL/Paris
I want to be able to see my hands in-game, so I have to set the UTPawn to behind view. But then to get a realistic viewpoint, the camera has to be set inside the pawn's head.
True First Person: You can do this without any custom stuff (camera/sockets/modular pawn) - simply by modifying existing code.

So in order to hide the pawn's head, but continue seeing the pawn's hands...
...you can switch head skin to transparent (the same effect - without breaking mesh a part). UTPawn.Mesh is (modular...) natively generated - which means, is better for performance.
Besides, your solution is only temporary... Place some Bots, let them kill you and see what happens.
Second: I can bet, you have problem with the sockets, animation etc...
 
Last edited: