How do you do Jigglebones?

I have a slime WIP. He’s rigged to bones, at least I think he is. I don’t really know what I am doing, and this is probably like trying to fly without learning to walk, but here’s what I’ve got in Softimage:

http://img.photobucket.com/albums/v220/300happy/th_slimeRiggingWIP.jpg

I’ve saved this out and gotten to the point where I need to write the qc file.

I’m assuming that:

-I can define the bones in the qc file.
-I can thus define jigglebones in the qc file.
-I don’t need all my bones attached to one root bone(it’s impossible, there is no way to connect bone joints that I can find in Softimage for custom rigs)
-The weightmap thingy, with the colored dots all over my model when selected, is the correct weightmap thingy that converts to HL Source Engine.

I need to know where to go from here. I have my bones named as follows:


left1_bone
left2_bone
left3_bone

right1_bone
right2_bone
right3_bone

top_bone1
top_bone2

I have my qc file, like so:


// Output .MDL
$modelname rocketslime/RocketSlime.mdl

// Directory of materials that the model uses
$cdmaterials models/rocketslime

// Model properties

// model is a static prop
$staticprop

// Material properties
$surfaceprop “antlion”

// Scale all units by a factor of 10
$scale 6.0

// Base or Reference .SMD
$body studio “./rocketslime”

// sequences: all sequences are in $cd
$sequence idle “RocketSlime_idle.smd” loop fps 15

// Physics data
//$collisionmodel “RocketSlime_phys.smd” {
//$Mass 100
//lets try autocalculating the mass
//$automass
//$concave}

$collisionjoints “RocketSlime_phys.smd”
{
$mass 100

}


What do I do now? Can someone give me an example what I would do to define and tell Source to use the bones as “jigglebones”, so that the slime is dynamically jello like during runtime?

You have to attach them to the root bone or they wont work (or compile as a ragdoll).

For jigglebones look here: http://developer.valvesoftware.com/wiki/$jigglebone

What if they arn’t connected on the model end of things?

I couldn’t find anything on how to connect the bones in Softimage Mod Tool, so I instead built 7 different “arm” thingies and rigged the slime to that. I can’t figure out how to build more then just 1 arm in a skeleton structure. There’s no tools for connecting bones to anything besides the previous furthest point on the structure, or if they are there, I have no idea how to use any of them or find them in the help files.

I know it works in Softimage, the bones work fine and move the slime around. I just don’t understand what this whole “root bone” system is talking about because I have no physical way to connect the bones to anything besides the last bone I built.

How do I compile as a ragdoll? Isn’t it the same as dragging it to the compiler with the three files?

http://www.moddb.com/groups/noesis-interactive/videos/animation-with-the-softimagexsi-6-mod-tool That should help with bones and rigging (if its on the page I think it is).

You need joint constrains for a ragdoll but if your just doing jigglebones you wont need them.

You can’t drag and drop to compile for orange box, but as I said in the other thread i’ll write out a .bat for you if you tell me the name of your qc file.

The bones are still seperate in the lamp tutorial animation. They are parented to the other ones, but still physically seperate. Since that’s how mine are as well, I’ll just assume everything is exporting out of Softimage correctly. The only difference is that my slime is actually weightmapped to the bones instead of parented to it, but I’d assume that’s how all ragdolls work anyway.

So assuming I can get this to compile, I should be able to just qc file these bones. I think. O_o

It might work better if you just tell me what commands to use so I don’t bother you for a new .bat file each time. But anyway, my file is RocketSlime.qc and is located at C:\Steam\steamapps\darkgriffin1986\sourcesdk_content\hl2\modelsrc\rocketslime\

While you’re at it, care to post up an example qc file for a jiggleboned bone? As you can see above, my qc file has a lot of stuff left over from the prop that might be messing it up. Basically I have no idea what I am doing anymore, and most tutorials keep telling me to copy alex or other default HL models qc files instead of how to go about doing a custom one. I just need to jigglebone the bones on my slime.


$modelname "Silver_Spirit/Jelly/jelly_v2.mdl"
$cdmaterials "models\Silver_Spirit\Jelly\"

$scale 0.2

$body studio "jelly_ref.smd"

$texturegroup skinfamilies
{
	{ "JellyOrange" }
	{ "JellyRed" }
	{ "JellyGreen" }
}

$surfaceprop "alienflesh"

$sequence Idle "jelly_seq.smd" fps 1

$collisionjoints "jelly_phy.smd" {
	$mass 100.0
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
	$rootbone "Base"
}

$jigglebone "Jelly" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

Thats the QC for my jelly model with jigglebones ^^ If your bones look how they do in that tutorial then they are correct.

Forgive the bump, I’ve been sick with the flu and out of it for several days.

Silver, you mentioned something about not compiling the ragdolls the same as compiling models. I keep getting “invalid command” errors on the $jigglebone command, which are probably related to that.

What commands do I need to pass to studiomdl.exe to get it to compile with the $jigglebone command? I’ve been using the Command Prompt and giving the exe -filename to compile the qc file, but I don’t know any other parameters it accepts.

With any luck, hopefully tonight I’ll be able to write up the jiggleboned qc file. I’d like to know how to compile it without the error though, as it would be a useless qc file if I couldn’t compile it.

Thanks,

darkgriffin


studiomdl.exe -orangebox -noxbox (filename).qc

Put your QC name where it says (filename) and save it as a .bat in the same folder as your QC, then double click. Make sure that you make the folders for your model to be compiled into or it wont work (I have no idea if you have to do this with the command prompt, but you don’t if you use the shortcut drag and drop method which is franky weird).

Slime eh? Looks good! Don’t know what to tell ya with the jigglebones considering I don’t really know how to do them yet. Best of luck though.

Invalid command, $jigglebone. Same problem as before. Any idea what’s up? I’m stumped.

Ok that’s weird, it works fine for me using a .bat like that, and is the only way I can get it to work :S

Edit: I’ve had an idea, check your SDK is set to Orange Box.

Engine Version: The Orange Box
Current Game: Half-Life 2: Episode Two

I don’t know what’s up anymore. If I remove the commands, it works fine(even the batch file). However, once I use the $jigglebone command, the qc file won’t compile anymore.

Has anyone else encountered this problem?

Qc file contents just for the hell of it. All attempts to use $jigglebone cause the above problem on my system:


// Output .MDL
$modelname rocketslime/RocketSlime.mdl

// Directory of materials that the model uses
$cdmaterials models/rocketslime

// Model properties

// model is a static prop
//$staticprop

// Material properties
$surfaceprop "antlion"

// Scale all units by a factor of 10
$scale 6.0 

// Base or Reference .SMD
$body studio "./rocketslime" 

// sequences: all sequences are in $cd
$sequence idle "RocketSlime_idle.smd" loop fps 15 

// Physics data
//$collisionmodel "RocketSlime_phys.smd" {
//$Mass 100
//lets try autocalculating the mass
//$automass
//$concave}

$collisionjoints "RocketSlime_phys.smd"
{
	$mass		100
	$rootbone	"top_bone1"
}

$jigglebone "left1_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "left2_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "left3_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right1_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right2_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right3_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "top_bone2" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

make sure to put the jigglebone commands right after you call the referrence smd file (main model)

[editline]10:13PM[/editline]

here I’ll post up my qc for a tough guys toque replacement I made for the heavy:


$modelname "player\items\heavy\heavy_stocking_cap.mdl"
$model "body" "yoshihat.smd"
$jigglebone "nose" {
	is_flexible {
		yaw_stiffness 700
		yaw_damping 6
		pitch_stiffness 700
		pitch_damping 8
		tip_mass 5
		length 30
		angle_constraint 37
	}
}
$jigglebone "eyes" {
	is_flexible {
		yaw_stiffness 700
		yaw_damping 6
		pitch_stiffness 700
		pitch_damping 8
		tip_mass 5
		length 30
		angle_constraint 37
	}
}
$cdmaterials "\models\yoshi\"
$cdmaterials ""
$texturegroup skinfamilies
{
	{ "models/face.vmt" }
	{ "heavy_stocking_cap_blue.vmt" }
}
$hboxset "default"
$hbox 0 "bip_head" -7.909  -11.866  -7.098  8.001  0.000  3.373
// Model uses material "models/player/items/heavy/heavy_stocking_cap.vmt"
// Model uses material "heavy_stocking_cap_blue.vmt"
$surfaceprop "flesh"
$illumposition -1.491 0.046 5.871
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd" {

	$mass 5.0
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
}


Still getting “bad command $jigglebone”.

QC file(now with unnessessary commands removed, and jigglebone moved up right under bone definition):


// Output .MDL
$modelname rocketslime/RocketSlime.mdl
// Base or Reference .SMD
$body studio "./rocketslime" 
$collisionjoints "RocketSlime_phys.smd"
{
	$mass		100
	$rootbone	"top_bone1"
}
$jigglebone "left1_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "left2_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "left3_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "right1_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "right2_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "right3_bone" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
$jigglebone "top_bone2" {
	is_flexible {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}
// Directory of materials that the model uses
$cdmaterials models/rocketslime
// Material properties
$surfaceprop "antlion"
// Scale all units by a factor of 10
$scale 6.0 
// sequences: all sequences are in $cd
$sequence idle "RocketSlime_idle.smd" loop fps 15 


This is driving me up the wall. My bones are compiling fine(I tested by commenting out all jigglebone commands in the qc, and leaving the root bone. Object had the root bone, but obveously such a setup is worthless for practical use). It’s just the jigglebone command is borked and refuses to work.

If I upload the whole uncompiled model and the materials folder, could someone else try compiling it? I know it would be basically a leak of my unfinished model, but I really don’t have a clue why the compiler is doing this to me, and would like to know if the model would compile on someone’s setup that works. Any volenteers?

if you would like, I can do it for you and then send you the smd files and the qc back for you to look at and compile

Sure! Here’s a direct link to the file. Has both the model smd, the textures, and the qc file, in the file structure I’ve been using to compile them:

http://www.fileden.com/files/2008/12/29/2243907/uncompiled%20slimeWIP.zip

If that link doesn’t want to work(never really tried sharing files I store on fileden.com, so direct links might only work for me), try this one instead:

http://www.fileden.com/getfile.php?file_path=http://www.fileden.com/files/2008/12/29/2243907/uncompiled%20slimeWIP.zip

Thanks!

Well I got it to compile fine and the model works, but still need to test it in-game ^^

Edit: I re-wrote the QC so you know:


$modelname "rocketslime/RocketSlime.mdl"

$scale 6.0 

$body studio "RocketSlime.smd" 

$cdmaterials "models/rocketslime"

$surfaceprop "antlion"

$sequence idle "RocketSlime_idle.smd" loop fps 15 

$collisionjoints "RocketSlime_phys.smd"
{
	$mass 100
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
	$rootbone "top_bone1"
}

$jigglebone "left1_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "left2_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "left3_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right1_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right2_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "right3_bone" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

$jigglebone "top_bone2" 
{
	is_flexible 
        {
		yaw_stiffness 20
		yaw_damping 3
		length 20
		yaw_constraint 0 0
	}
	has_base_spring 
        {
		stiffness 20 
		damping 1 
		left_constraint -40 40
		up_constraint -40 40
		forward_constraint -40 40
	}

}

Edit2: The model didn’t have any jiggle in-game, so I checked the SMD…and it only has one bone O.o I’m suprised it compiled. Checked your pic at the top and it definately looks like the bones are there :S So how come it doesn’t seem to have exported them?

Edit3: Got bored :stuck_out_tongue:

[img_thumb]http://r6wgsa.bay.livefilestore.com/y1p6Ie8_9Ojf1Mmw_qrk3wvN0lcrmE_h7Z9A4Q1Amn011w988YziLbobS1-bngSw8gRItT-17LUXwiuYQ94Q54dMmpgoaM5HOYz/Slime%20Kirby%20Hat.jpg[/img_thumb]

(Yes that is Kirby)

I have no idea why it won’t export them. Maybe I can try adding all of them to a group, but I don’t think groups compile into the SMD files? They are all properly linked to the slime in Softimage Mod Tool, as I can animate the slime’s jigglyness in the Mod Tool.

I’ll try rearranging the bones in Softimage then. Maybe they somehow need to be all part of one bone group, but the lamp tutorial has at least 3 seperate groups in his setup.

I just thought of something else, I might need to set them as a “Child” of the model, even though the exporter should have exported all of the bones with the rigged model, it might have something finiky with the parent/child or parent/parent setup in the object tree.

I don’t know. I’m just thinking out loud here. It’s really late, and I have a potentially busy weekend coming up, so I’ll retry exporting him when I can get to it, which might be as late as Monday or Tuesday.

I’m glad he compiled at least. Means something is probably broken with my setup over here. No idea what though.

Nice job on the kirby. He’s…really funny looking, and slime blue. :smiley: Hillarious!

Thanks for the help, both of you. It’s really nice to have someplace I can just ramble and get help from. Really, I can’t thank you all enough. :slight_smile:

You’re using XSI, right? Have you tried unchecking the box in the exporter that says to remove all unused bones? I remember having a problem like this before, I just don’t remember how I fixed it… I think I recall it requiring some extra step after properly painting the weightmap that I’m forgetting…

You’re using the old studiomdl, use the one in


c:\steam\steamapps\darkgriffin1986\sourcesdk\bin\orangebox\bin\