Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design

Reply
 
Thread Tools Display Modes
Old 06-08-2012, 04:25 AM   #1
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
Procedural bones

Hey, I needed help learning how to use procedural bones for a custom rig. the info on valve wiki is vague so if anyone who is tried and true and knows about this id be greatful

for anyone that doesnt know what "P-bones" are u cant look at the hl2-ep2 alyx and check her belt and her wrist and a link to wiki
https://developer.valvesoftware.com/wiki/$proceduralbones

i am trying to get the same effect thx again
Roland714 is offline  
Reply With Quote
Old 06-11-2012, 12:54 PM   #2
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
aw does no one know how procedural bones work so far ive been fiddling with it and i get random results and i cant seem to get in touch with valve
Roland714 is offline   Reply With Quote
Old 06-11-2012, 05:57 PM   #3
episoder
 
Join Date: Aug 2011
Reputation: 107
Posts: 1,608
the @wunderboy thread linked on the valve wiki tries to explain alot of that.

sure he left out some of the data specs of the compile commands. i dunno if i can make that better. i'll check it tmr if i remember. sure will.
episoder is offline   Reply With Quote
Old 06-12-2012, 10:39 AM   #4
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
alrighty thanks men

what wunder posted its just for people to copy paste for a model using the valve.biped im using diffrent and i changed the bone orientation to match it valve but still no good
Roland714 is offline   Reply With Quote
Old 07-18-2012, 09:52 AM   #5
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
i am not letting this thread die any modders out there please help
Roland714 is offline   Reply With Quote
Old 07-18-2012, 11:14 AM   #6
ProZak
 
Join Date: Mar 2004
Reputation: 60
Posts: 678
You could try contacting this guy

http://www.youtube.com/watch?v=V_3aFLDmFj0

Last edited by ProZak: 07-18-2012 at 11:14 AM. Reason: Oh, that guy is most likely Wunderboy LOL
ProZak is offline   Reply With Quote
Old 07-23-2012, 04:13 PM   #7
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
Quote:
Originally Posted by ProZak View Post
You could try contacting this guy

http://www.youtube.com/watch?v=V_3aFLDmFj0
mm no good just showed the compiled vrd on and off i need a custom orientation
Roland714 is offline   Reply With Quote
Old 07-27-2012, 12:32 AM   #8
f64
 
Join Date: Jun 2007
Reputation: 38
Posts: 186
This might get you on the right path, but you'll need to experiment as I've not made full use of it and haven't been modeling for awhile.

This can be done in ModTool using an old plugin. The sdk TF2 .vrd files are similar to what this plugin does, but were probably made with a Maya plugin. I'll post more later

Last edited by f64: 08-26-2012 at 03:55 PM.
f64 is offline   Reply With Quote
Old 07-28-2012, 03:54 PM   #9
Roland714
 
Join Date: Jul 2010
Reputation: 0
Posts: 14
you are a God send damn thank u lol

ive already made managed to achieve the outcome i wanted thought. but this will be helpful for anyone interested in this subject too since theres so little said about it
Roland714 is offline   Reply With Quote
Old 07-29-2012, 07:50 PM   #10
f64
 
Join Date: Jun 2007
Reputation: 38
Posts: 186
edit: Here's another demo of the bones working

Taken from Softimage\XSI_6.01 Mod Tool\Addons\ValveSource\Doc\axisinterptool_help.ht m:

"This is a helper bone tool developed by Valve Software and setup by Simon Inwood (Softimage). Updated for EXP by Robert Bélanger, Andrew Skowronski (Softimage).

The tool is used sets up helper bones whose orientation/position are controlled by an arbitrary number of trigger orientations/positions of a child bone relative to a parent bone. The algorithm looks at the relative orientation of one bone (not itself) to another (currently always child to parent), converts the transformation matrix back into a quaternion and takes a dot product of that quaternion against some variable number of other quaternions. This dot product is used as a weight as to how well it matches that quaternion within some angle tolerance (1 for perfect match, 0 for outside of tolerance), balance all the weights to 1. The weights are then multiplied by the set of new orientations and positions, and the result is the new position/orientation of the helper bone.

The data is already in this format inside the valve engine, and the engine can support a number of these bones for very low cost (they're actually much cheaper than a forward kinematic bone). With careful selection of which column it uses, it's fairly easy to get and bicep and forearm that counter-rotate, elbows, wrists, calves to raise and lower with ankle flex, shoulders to counter-rotate based on the clavicle and upper-arm orientations, chest to raise and lower based on clavicle and spine orientation, etc. Unfortunately, there seems to be no combination which can make the front part of the pelvis-thigh move in the complex fashion it needs, nor the somewhat non-linear movement of the gluteus."

Last edited by f64: 08-08-2012 at 06:41 AM.
f64 is offline   Reply With Quote
Old 08-04-2012, 09:20 AM   #11
f64
 
Join Date: Jun 2007
Reputation: 38
Posts: 186
One way to add helperbones is with ModTool 6.01 or 7.5 using a script written for ModTool 4.2. A link for the script and modified toolbar can be found in my next post.

GENERAL INFORMATION:


Valve Rig Data(.vrd) files in sourcesdk_content\hl2mp\modelsrc\humans_sdk are formatted in the following manner, TF 2 files being slightly different:
Code:
<helper> 	(helperbone name) (rootbone) (parentbone) (posebone)
<display>	(helperbone polygon width) (helperbone polygon height) (helperbone polygon length) (translation of helperbone by percentage of distance from rootbone origin to parentbone end)		
<basepos>	(helperbone X offset from rootbone center) (helperbone Y offset from rootbone center) (helperbone Z offset from rootbone center)
<trigger>	(Trigger tolerance) (posebone X rotation) (posebone Y rotation) (posebone Z rotation) (helperbone rotation X) (helperbone rotation Y) (helperbone rotation Z) (helperbone position X) (helperbone position Y) (helperbone position Z)
The posebone's rotation relative to the parentbone targets the helperbone based on the trigger data and need not be an actual child of the parentbone. Trigger tolerances determine the helperbone's movement, rate of movement and the starting and stopping points:

For all tolerances > 0:

helperbone start movement = posebone rotation - tolerance
helperbone end movement = reference tolerance
helperbone rate of travel = helperbones rotation / (reference tolerance - (posebone rotation - tolerance))



A few examples:

Code:
<trigger> 90 0 0 -3.0289 0 0 0 0 0 0     	reference tolerance = 90 		
<trigger> 90 90 0 -3.0289 0 0 30 0 0 0	rotate helper 30 degrees Z at a rate of 30:90, starting at posebones 0 and stopping at 90 degrees rotation.
	
<trigger> 120 0 0 -3.0289 0 0 0 0 0 0	reference tolerance = 120		
<trigger> 110 120 0 -3.0289 55 0 0 0 0 0    rotate helper 55 degrees X at a rate of 55:110, starting at posebones 10 and stopping at 120 degrees rotation.   

<trigger> 110 0 0 -3.0289 0 0 0 0 0 0	reference tolerance = 110	
<trigger> 110 90 0 -3.0289 54 0 0 0 0 0	 rotate helper 54 degrees X at a rate of 54:130, starting at posebones -20 and stopping at 110 degrees rotation.
Reference <triggers> have 6 zeros at the end of their line.


In order to use them, proceduralbones must have vertices weighted to them in the reference .smd like any other envelope deformer and use the $proceduralbones command in the .qc. To modify the motion of a helperbone, edit the .vrd data and re-compile, or comment the helper out for removal.

Only the reference.smd should contain helperbones.

Don't include helperbones in animated sequences or they'll get "baked" into the model, meaning you can mute the motion thru the .vrd, but they'll still be present in-game and can only be removed by unweighting their reference vertices.

Also, a posebone's chain MUST include the rootbone or be directly parented to the rootbone. Studiomdl will not compile the model otherwise. There are several helpers that break this rule in the sdk files, so keep this in mind if you're importing them to use.

Last edited by f64: 08-28-2012 at 11:07 PM.
f64 is offline   Reply With Quote
Old 08-26-2012, 04:05 PM   #12
f64
 
Join Date: Jun 2007
Reputation: 38
Posts: 186
Here's a video I made using ModTool and an older script:

OVERVIEW:

1. Place the script files in place by unzipping to your ModTool Addons directory containing the ValveSource folder.
2. Open a skeleton/rig scene (.exp).
3. Create a new HelperBone Rig then add helpers or import a .vrd file.
4. Envelope a mesh (include the helperbones). Alternatively, add the helperbones to an enveloped mesh.
5. Adjust vertex weights onto the helpers, then export the reference.smd
6. Export the .vrd file and save the scene.
7. Reassign envelope weights off of the helpers completely, then remove them from the envelope and save as a different scene.
8. Make the collision model and animations, then export and compile with your exported .vrd.

Any final adjustments to the helperbones can be made in the reference scene or by manually editing the .vrd.

Note: when using the AxisInterpolatorTool, edit only the Target fields - leave the Orientation fields alone.
There will be a little bit of unspecified helperbone movement when rotating the posebone on more than 1 axis that can't be eleminated, so just concentrate on the movement triggers you do want.

Last edited by f64: 05-03-2013 at 05:47 PM.
f64 is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Art & Sound Design


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 10:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.