Weapon Re-Attachment to Wrist

General discussion and questions about XNALara go here.

Moderators: Runa, ObscureMemories, Love2Raid

Posts: 51
Joined: Mon Sep 30, 2013 11:42 pm
Custom Rank: Soul Calibur Fan

Weapon Re-Attachment to Wrist

Postby WuHT » Wed Apr 19, 2017 4:56 am

I have a model that I thought I correctly attached a weapon to the "arm left wrist" when I did my first mesh-mod.

Unfortunately, it appears to be joined to the "arm left shoulder 1".

What is the most practical way to make the weapon bone attach to the wrist rather than the shoulder bone?

Otherwise I would have to hide/scale to 0 the erroneous weapon and reattach a duplicate to the wrist, but I'd like to learn if there was a better way than the workaround.

http://sta.sh/039ejlmvv2y is the model.
---
I appreciate all help provided

Porter
User avatar
Posts: 131
Joined: Tue May 19, 2015 11:16 pm
Custom Rank: Stashing stuff I like.

Re: Weapon Re-Attachment to Wrist

Postby Ems » Thu Apr 20, 2017 4:17 am

I'd say forget about that and switch to Blender for editing. Add a bone to the weapon either at the center or at the place it usually should be held, then place it at character's hand, parent that bone to the wrist, this way you get a pose-able weapon in case you need to adjust it further.

But I'm only saying that because I have no idea how to correctly do it in XPS, it always got me some wacky results due to root ground bone positioning. As far as I know you can also change parenting index by editing you mesh.ascii in notepad, it's a matter of changing some numbers. If you wanna stick to XPS, ignore this post and we gonna see if someone more savvy has a solution.

User avatar
Posts: 107
Joined: Wed Aug 22, 2012 2:52 am
Location: Gravlex Med

Re: Weapon Re-Attachment to Wrist

Postby Anx » Fri Apr 21, 2017 1:45 am

WuHT wrote:I have a model that I thought I correctly attached a weapon to the "arm left wrist" when I did my first mesh-mod.

Unfortunately, it appears to be joined to the "arm left shoulder 1".

What is the most practical way to make the weapon bone attach to the wrist rather than the shoulder bone?

Otherwise I would have to hide/scale to 0 the erroneous weapon and reattach a duplicate to the wrist, but I'd like to learn if there was a better way than the workaround.

http://sta.sh/039ejlmvv2y is the model.


This happens because SC5 Viola 2P CAS2 have some "duplicate bones" (3 times)
Code: Select all
...
head eyebrow right 1
3 # parent index
-0.01363199 0.55988026 0.11812644
head eyebrow right 1
3 # parent index
-0.04115004 0.56992036 0.11082135
head eyebrow right 1
3 # parent index
-0.06466716 0.56292009 0.08073533
...

and ignore the XNALara armature requirement
Code: Select all
every name must be unique
(and the rule "the first joint must be the root joint (Blender importer issue)")

To solve it:
  1. Mark "Config->Show warnings"
  2. Load the file generic_item.mesh (not xps.xps and not generic_item.mesh !!!)
  3. Watch the warning "Viola can caust trouble" ;) and deny the dialog "Should this be solved persistent" with No
  4. Invoke "Modify-YClean Armature" to fix the duplicate bones "head eyebrow right 1"
  5. Now, you should be attached a weapon to the "arm left wrist" ... without "trouble"

Background information:
XNA referenced the bones by there "index number". Because the 2nd bone with the name "head eyebrow right 1" overwrite the 1th bone information "head eyebrow right 1" ... and the 3rd bone "head eyebrow right 1" make it again ... some indices are now removed ... and the index of "arm left wrist" will be now the index number of "arm left shoulder 1"
Code: Select all
arm left shoulder 1
1 # parent index
0.10038700 0.35134989 -0.00000019
arm left shoulder 2
145 # parent index
0.23088902 0.35134989 -0.00000026
arm left elbow
146 # parent index
0.53204900 0.35134971 -0.00000044
arm left wrist
147 # parent index
0.76293802 0.35134953 -0.00000060

This is wy the weapon is attached to the bone 3 lines before "arm left wrist" ... and this is the bone name "arm left shoulder 1"

XPS Author
User avatar
Posts: 32
Joined: Fri Sep 21, 2012 9:01 am

Re: Weapon Re-Attachment to Wrist

Postby XNAaraL » Fri Apr 21, 2017 5:11 am

Anx means:

2. Load the file generic_item.mesh.ascii (not xps.xps and not generic_item.mesh !!!) :ohn: ;)

Posts: 51
Joined: Mon Sep 30, 2013 11:42 pm
Custom Rank: Soul Calibur Fan

Re: Weapon Re-Attachment to Wrist

Postby WuHT » Sat Apr 22, 2017 9:04 pm

Ems wrote:I'd say forget about that and switch to Blender for editing. Add a bone to the weapon either at the center or at the place it usually should be held, then place it at character's hand, parent that bone to the wrist, this way you get a pose-able weapon in case you need to adjust it further.
But I'm only saying that because I have no idea how to correctly do it in XPS, it always got me some wacky results due to root ground bone positioning. As far as I know you can also change parenting index by editing you mesh.ascii in notepad, it's a matter of changing some numbers. If you wanna stick to XPS, ignore this post and we gonna see if someone more savvy has a solution.

At the end of the day this appears to work for me


Anx wrote:To solve it:
  1. Mark "Config->Show warnings"
  2. Load the file generic_item.mesh (not xps.xps and not generic_item.mesh !!!)
  3. Watch the warning "Viola can caust trouble" ;) and deny the dialog "Should this be solved persistent" with No
  4. Invoke "Modify-YClean Armature" to fix the duplicate bones "head eyebrow right 1"
  5. Now, you should be attached a weapon to the "arm left wrist" ... without "trouble"

Background information:
XNA referenced the bones by there "index number". Because the 2nd bone with the name "head eyebrow right 1" overwrite the 1th bone information "head eyebrow right 1" ... and the 3rd bone "head eyebrow right 1" make it again ... some indices are now removed ... and the index of "arm left wrist" will be now the index number of "arm left shoulder 1"

This is wy the weapon is attached to the bone 3 lines before "arm left wrist" ... and this is the bone name "arm left shoulder 1"

Yeah when i was first playing around (and cleaning up the armature of this model because originally there was no root bone) there was issues with the eyebrow bones but it didn't appear to cause problems so I didn't bring it up. Plus, it didn't appear obvious to me to think that eyebrow bones would somehow affect wrist bones :D

XNAaraL wrote:Anx means:
2. Load the file generic_item.mesh.ascii (not xps.xps and not generic_item.mesh !!!) :ohn: ;)

good eye

Is there any difference in the .xps and the .mesh formats ? I assumed that the .xps format was the latest and newest way to store the mesh information so any changes i made to the armature in the XPS program I would only save the changes to a new xps.xps and leave the generic_item mesh and ascii alone. In the future, do I need to save changes to all 3 formats to prevent bugs ?
---
I appreciate all help provided

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest