GUIStudioMDL Problems

Hey everyone, I just need help. I converted CJ from SA and I compiled the model. Everything worked fine its just that when I go in game, I spawn him, and it is just invisible. I can see error when I spawn because of the blue shock that they have when you spawn them. But he is just invisible. He doesn’t have ragdoll physics either. I can tell because when you drop him to the ground, 1 cloud of dust comes out. Like when they collide with the ground. I really need help.

QC copy:

$modelname “models\cj.smd”
$cdmaterials “materials”
$model “cj.smd” “cj.smd”
$body “cj.smd” “cj.smd”

$scale 1
$surfaceprop “flesh”

$sequence idle “cj.smd” fps 1

$collisionmodel “cj.smd” {
$mass 100.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}

$collisionmodel should be $collisionjoints

And joint constrains for each joint on your model.

Heres a revised version for you (i’m not writing out the joint constrains though as it would takes ages and I don’t know the names/positions of your bones). Also you don’t need body and model, you need model for props and body for ragdolls (though I don’t think it makes much difference as long as you only use 1).


$modelname "models/cj.smd"
$cdmaterials "materials/models/cj"
$model "cj" "cj.smd"

$scale 1
$surfaceprop "flesh"

$sequence idle "cj.smd" fps 30.0

$collisionjoints"cj.smd" {
$mass 100.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}

You will also need a collision model with separate parts for each moving part for you to be able to actually pose it.

Also make sure your VMT files have this at the top:


"VertexlitGeneric"

and not anything else, as not having that and instead having “LightmappedGeneric” is the most common reason for invisible models (that and hexing errors).

So I have to do a collision joint for every bone? That will take a while. And how do I make a collision file?

You lay out the joint constrains in the brackets below the $collisionjoint parameter like this:


$collisionjoints "phymodel.smd" {

	$mass 90.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "valvebiped.bip01_pelvis"
	$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

	$jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 0.00

	$jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 23.00 0.00

	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -86.00 26.00 0.00

	$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.00

	$jointconstrain "valvebiped.bip01_l_hand" x limit -37.00 37.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 59.00 0.00

	$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.00

	$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.00

	$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.00

	$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.00

	$jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.00
	$jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 0.00

	$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.00

	$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 0.00

	$jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00

	$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00
	$animatedfriction 1.000 400.000 0.500 0.300 0.000
}

(Think thats your basic valve biped rig)

Also you cannot have more than 24 bones referenced as joint constrains otherwise your model will go loopy (and sorta not spawn right, if you do it you’ll see what I mean) but you can make some extra ones with jigglebones if you so wish (but their fairly complicated to do right and arn’t posable).

Can I change the names of the bones to the bones of my ragdoll? I rigged him to the charple01 ragdoll. The burnt guy.

charple uses the standard valve skeleton, doesn’t it

I don’t know. I just wanted to change it to the charple bones

I got all the joint constraints and everything finished. I fixed the VMT files but the model is still invisible! I just need to know how to get the textures onto my model.

Change “LightmappedGeneric” to “VertexlitGeneric” in the VMT. Or whatever it has in “” at the top if its not “VertexlitGeneric”.

I already tried that
he is still invisible. Everything was correct.

What’s your console saying? It almost always tells you exactly what the problem is.

Never looked at it. Will try though :wink:

It says I have no VVD data. How do I make a VVD file?

I have a VVD. It just doesn’t want to read it.

Its made when you compile a model, what model is missing it?

The model I have been trying to convert. It is cj.mdl and whenever I spawn it the game lags.