Enveloping Bones... [Solved]

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
PsYcH0_]-[aMsT3r
2nd Lieutenant
2nd Lieutenant
Posts: 405
Joined: Fri Jan 25, 2008 3:11 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Location Location.

Enveloping Bones... [Solved]

Post by PsYcH0_]-[aMsT3r »

OK I've made my playermodel and stuff. I've used Vyse's tut on how to get playermodels into SWBF2. What I dont get is how to envelope the bones. I've switched to XSI defualt mode but I can't select all the bones at once. Is there a way to change the select options so i can do this. Also, does it matter that some bones aren't inside my mesh because my model isn't quite the right shape.
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Enveloping Bones...

Post by AceMastermind »

The fastest way I found to select all the bones is by branch selecting (middle clicking) bone_root in the explorer then pressing the H key twice to unhide all of them. Then type:
  • bone*
in the first input field in the "Select" menu on the MCP and press "enter",
This selects all objects in the scene that have "bone" in their name.

Deselect bone_root by holding ctrl and left clicking on it (in explorer),
Press ctrl+g to create a group from the remaining selected bones and just name it "bones" or whatever you want.
Now after you select the mesh and go Deform>Envelope>Set Envelope, you can just select the "bones" group in the explorer that you created then right click to end the pick session. Now you can begin your weight editing.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Enveloping Bones...

Post by Caleb1117 »

You don't have to select them all at once, just hold shift, and keep left clicking till you get all the bones, the right click to the side and it will use the bones selected.
PsYcH0_]-[aMsT3r
2nd Lieutenant
2nd Lieutenant
Posts: 405
Joined: Fri Jan 25, 2008 3:11 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Location Location.

Re: Enveloping Bones...

Post by PsYcH0_]-[aMsT3r »

Wow thanks guys! Carrotman is finished at last! Ill get some ingame pcis soon!
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Enveloping Bones...

Post by AceMastermind »

This vbs or py script automates these actions:
  • selects the bones
  • unhides the hand bones
  • hides the roots, effectors, dummyroot, Groundummy, hp_weapons, bone_root, and sv_jettrooper
  • Creates a group named- Bones_for_Envelope
  • Cuts and deletes override_texture from the hierarchy
  • Creates and places a null in the hierarchy named- REPLACE_ME_WITH_YOUR_MESH

Instructions
1. Import Unit_Template_Beta into your scene
2. Copy (ctrl+c) the code and paste (ctrl+v) it in the white part of XSI's Script Editor (alt+4)
3. Run the script (press F5 or click the Run button next to the question mark)


NOTES:
Replace the null named:
REPLACE_ME_WITH_YOUR_MESH
with your custom character geometry.
To do this:
In an Explorer window (8 key) simply drag n drop your character geometry name onto "Dummyroot",
then select "bone_root" and drag n drop it on your character geometry name,
next delete the null named- REPLACE_ME_WITH_YOUR_MESH
this puts the hierarchy back in order.
Rename your custom geometry to override_texture so you can restore that feature for use ingame.

What is the Bones_for_Envelope group for?
This group contains all the bones you need for the envelope,
when you're ready to set the envelope, go to:
Animate>Deform>Envelope>Set Envelope
you enter a pick session, just click on the group and you're done,
right click to end the pick session and start editing your weights.

This script only works with Unit_Template_Beta from psych0fred.
Feel free to edit out parts of the script that you don't want or need.
Enjoy!

Auto_Bone_Select_and_Setup.vbs
Hidden/Spoiler:
[code]SelectObj "GroundDummy.bone_root", "BRANCH"
ToggleVisibility
ToggleVisibility
SelectObj "GroundDummy.bone_a_spine,GroundDummy.bone_b_spine,GroundDummy.bone_head,GroundDummy.bone_l_calf,GroundDummy.bone_l_clavicle,GroundDummy.bone_l_foot,GroundDummy.bone_l_forearm,GroundDummy.bone_l_hand,GroundDummy.bone_l_thigh,GroundDummy.bone_l_toe,GroundDummy.bone_l_upperarm,GroundDummy.bone_neck,GroundDummy.bone_pelvis,GroundDummy.bone_r_calf,GroundDummy.bone_r_clavicle,GroundDummy.bone_r_foot,GroundDummy.bone_r_forearm,GroundDummy.bone_r_hand,GroundDummy.bone_r_thigh,GroundDummy.bone_r_toe,GroundDummy.bone_r_upperarm,GroundDummy.bone_ribcage,GroundDummy.bone_root"
ToggleSelection "GroundDummy.bone_root"
CreateGroup
SetValue "Group.Name", "Bones_for_Envelope"
DeselectAll
ToggleVisibility
SelectObj "GroundDummy.GroundDummy"
ToggleVisibility
SelectObj "GroundDummy.DummyRoot"
ToggleVisibility
SelectObj "GroundDummy.bone_root"
ToggleVisibility
SelectObj "GroundDummy.sv_jettrooper", , True
ToggleVisibility
SelectObj "GroundDummy.eff_head,GroundDummy.eff_l_calf,GroundDummy.eff_l_clavicle,GroundDummy.eff_l_forearm,GroundDummy.eff_l_hand,GroundDummy.eff_l_toe,GroundDummy.eff_r_calf,GroundDummy.eff_r_clavicle,GroundDummy.eff_r_forearm,GroundDummy.eff_r_hand,GroundDummy.eff_r_toe,GroundDummy.eff_ribcage"
ToggleVisibility
SelectObj "GroundDummy.root_a_spine,GroundDummy.root_l_clavicle,GroundDummy.root_l_foot,GroundDummy.root_l_hand,GroundDummy.root_l_thigh,GroundDummy.root_l_upperarm,GroundDummy.root_neck,GroundDummy.root_r_clavicle,GroundDummy.root_r_foot,GroundDummy.root_r_hand,GroundDummy.root_r_thigh,GroundDummy.root_r_upperarm"
ToggleVisibility
SelectObj "GroundDummy.hp_weapons", , True
ToggleVisibility
SelectObj "GroundDummy"
ToggleVisibility
GetPrim "Null"
SetValue "null.Name", "REPLACE_ME_WITH_YOUR_MESH"
CopyPaste "REPLACE_ME_WITH_YOUR_MESH", , "GroundDummy.DummyRoot", 1
SelectObj "GroundDummy.bone_root"
CopyPaste "GroundDummy.bone_root", , "GroundDummy.REPLACE_ME_WITH_YOUR_MESH", 1
SelectObj "GroundDummy.override_texture"
CutObj
CutObj
DeleteObj "override_texture"[/code]

Auto_Bone_Select_and_Setup.py
Hidden/Spoiler:
[code]Application.SelectObj("GroundDummy.bone_root", "BRANCH", "")
Application.ToggleVisibility("", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.bone_a_spine,GroundDummy.bone_b_spine,GroundDummy.bone_head,GroundDummy.bone_l_calf,GroundDummy.bone_l_clavicle,GroundDummy.bone_l_foot,GroundDummy.bone_l_forearm,GroundDummy.bone_l_hand,GroundDummy.bone_l_thigh,GroundDummy.bone_l_toe,GroundDummy.bone_l_upperarm,GroundDummy.bone_neck,GroundDummy.bone_pelvis,GroundDummy.bone_r_calf,GroundDummy.bone_r_clavicle,GroundDummy.bone_r_foot,GroundDummy.bone_r_forearm,GroundDummy.bone_r_hand,GroundDummy.bone_r_thigh,GroundDummy.bone_r_toe,GroundDummy.bone_r_upperarm,GroundDummy.bone_ribcage,GroundDummy.bone_root", "", "")
Application.ToggleSelection("GroundDummy.bone_root", "", "")
Application.CreateGroup("", "", "")
Application.SetValue("Group.Name", "Bones_for_Envelope", "")
Application.DeselectAll()
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.GroundDummy", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.DummyRoot", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.bone_root", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.sv_jettrooper", "", True)
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.eff_head,GroundDummy.eff_l_calf,GroundDummy.eff_l_clavicle,GroundDummy.eff_l_forearm,GroundDummy.eff_l_hand,GroundDummy.eff_l_toe,GroundDummy.eff_r_calf,GroundDummy.eff_r_clavicle,GroundDummy.eff_r_forearm,GroundDummy.eff_r_hand,GroundDummy.eff_r_toe,GroundDummy.eff_ribcage", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.root_a_spine,GroundDummy.root_l_clavicle,GroundDummy.root_l_foot,GroundDummy.root_l_hand,GroundDummy.root_l_thigh,GroundDummy.root_l_upperarm,GroundDummy.root_neck,GroundDummy.root_r_clavicle,GroundDummy.root_r_foot,GroundDummy.root_r_hand,GroundDummy.root_r_thigh,GroundDummy.root_r_upperarm", "", "")
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy.hp_weapons", "", True)
Application.ToggleVisibility("", "", "")
Application.SelectObj("GroundDummy", "", "")
Application.ToggleVisibility("", "", "")
Application.GetPrim("Null", "", "", "")
Application.SetValue("null.Name", "REPLACE_ME_WITH_YOUR_MESH", "")
Application.CopyPaste("REPLACE_ME_WITH_YOUR_MESH", "", "GroundDummy.DummyRoot", 1)
Application.SelectObj("GroundDummy.bone_root", "", "")
Application.CopyPaste("GroundDummy.bone_root", "", "GroundDummy.REPLACE_ME_WITH_YOUR_MESH", 1)
Application.SelectObj("GroundDummy.override_texture", "", "")
Application.CutObj("")
Application.CutObj("")
Application.DeleteObj("override_texture")
[/code]
PsYcH0_]-[aMsT3r
2nd Lieutenant
2nd Lieutenant
Posts: 405
Joined: Fri Jan 25, 2008 3:11 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Location Location.

Re: Enveloping Bones...

Post by PsYcH0_]-[aMsT3r »

Wow Ace thats awesome! You should put a another topic up for that, because its amazingly helpful!
Post Reply