Compile error: Too many materials used, max 32?

I’m trying to port these.
[img_thumb]http://filesmelt.com/downloader/Romkas_goldsource_hgrunts.png[/img_thumb]

Human Grunt models for use in Half-Life: Source.

The only issue is that it stops compiling and gives me this error.


qdir:    "c:\users\charlie\documents\decompiled models\hls\romka's grunts\hgrunt\"
gamedir: "c:\program files\steam\steamapps\shotgunguy49\half-life 2\hl2\"
g_path:  "Hgrunt"
Working on "Hgrunt.qc"
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/hgrunt_torso.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/Hgrunt_mask.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/Hgrunt_beret.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/Hgrunt_shotgun.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/Hgrunt_grunt.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/M16_reference.smd
SMD MODEL C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt/deployed_SPAS12_reference.smd
ERROR: Too many materials used, max 32
ERROR: Aborted Processing on 'Hgrunt.mdl'


The only problem is that the model doesn’t even have 32 textures…

It doesn’t give any information on how to fix the error, so I’m asking if you guys know what to do.

Edit:

If it helps at all, here’s the .qc.


$cd "C:\Users\Charlie\Documents\Decompiled models\hls\Romka's grunts\Hgrunt"
$modelname "Hgrunt.mdl"
$cdmaterials "models\hgrunt"
$cdmaterials "models\v_9mmar"
$cdmaterials "models\w_shotgun"
$scale 1.0
$cliptotextures


$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$eyeposition 0.000000 0.000000 73.000000


//reference mesh(es)
$body "body" "hgrunt_torso"

$bodygroup "heads"
{
studio "Hgrunt_mask"
studio "Hgrunt_beret"
studio "Hgrunt_shotgun"
studio "Hgrunt_grunt"
}

$bodygroup "weapons"
{
studio "M16_reference"
studio "deployed_SPAS12_reference"
blank
}

// 2 skin families
$texturegroup skinfamilies 
{
{ "hgrunt_arms.vmt"  "mask_sheet.vmt"  "Hgrunt_cmdr.vmt" }
{ "hgrunt_arms_blk.vmt"  "mask_sheet_blk.vmt"  "Hgrunt_blk.vmt" }
}

// 3 attachment(s)
$attachment 0 "Bip01 R Hand" 32.000000 2.500000 8.500000
$attachment 1 "Bip01 R Hand" 0.000000 0.000000 0.000000
$attachment 2 "Bip01 Head" 0.000000 0.000000 0.000000

// 2 bone controller(s)
$controller 0 "Bip01 Head" XR -70.000000 70.000000
$controller 4 "Mouth" ZR 0.000000 20.000000

// 17 hit box(es)
$hbox 3 "Bip01 Pelvis" -3.640000 -6.050000 -8.070000 6.340000 8.410000 8.300000
$hbox 6 "Bip01 L Thigh" 0.000000 -6.350000 -6.050000 16.309999 5.570000 3.840000
$hbox 6 "Bip01 L Calf" 0.000000 -5.190000 -4.440000 22.150000 5.680000 4.780000
$hbox 6 "Bip01 L Foot" -1.080000 -1.900000 -3.240000 3.230000 11.210000 2.860000
$hbox 7 "Bip01 R Thigh" 0.000000 -6.350000 -4.060000 16.309999 5.570000 5.820000
$hbox 7 "Bip01 R Calf" 0.000000 -5.190000 -5.010000 22.150000 5.680000 4.220000
$hbox 10 "Bip01 Spine1" -4.570000 -9.990000 -10.520000 11.490000 8.420000 10.750000
$hbox 10 "Bip01 Spine2" 0.000000 -10.510000 -11.440000 14.050000 9.260000 12.420000
$hbox 4 "Bip01 L UpperArm" -2.810000 -1.990000 -4.740000 12.060000 4.780000 3.500000
$hbox 4 "Bip01 L Forearm" 0.000000 -1.430000 -2.150000 10.210000 4.010000 2.980000
$hbox 4 "Bip01 L Hand" -0.270000 -2.650000 -2.750000 7.580000 1.890000 1.800000
$hbox 5 "Bip01 R UpperArm" -2.830000 -1.990000 -3.460000 12.030000 4.780000 4.780000
$hbox 5 "Bip01 R Forearm" 0.000000 -1.430000 -2.940000 10.190000 4.000000 2.180000
$hbox 5 "Bip01 R Hand" -0.160000 -2.040000 -1.790000 7.500000 2.400000 2.760000
$hbox 11 "Bip01 Head" 9.000000 -5.220000 -4.590000 15.150000 7.560000 6.010000
$hbox 11 "Bip01 Head" 1.700000 -5.220000 -4.590000 9.000000 1.000000 6.010000
$hbox 1 "Bip01 Head" 1.700000 1.000000 -4.590000 9.000000 7.560000 6.010000
$surfaceprop "flesh"
$eyeposition -0.000 0.000 73.000
$illumposition -3.441 10.717 36.650
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 1.00
// 85 animation sequence(s)
$sequence "walk1" "walk1" LX fps 35 loop ACT_WALK 1 {
  { event 1004 4 "common/npc_step2.wav" } 
  { event 1004 25 "common/npc_step4.wav" } 
  { event 1004 46 "common/npc_step1.wav" } 
  { event 1004 67 "common/npc_step3.wav" } 
 }
$sequence "run" "run" LX fps 40 loop ACT_RUN 1 { event 1004 1 "common/npc_step2.wav" } { event 1004 13 "common/npc_step4.wav" } 
$sequence "victorydance" "victorydance" fps 21 ACT_VICTORY_DANCE 1 
$sequence "cower" "cower" fps 14 ACT_COWER 1 
$sequence "smflinch" "smflinch" fps 20 ACT_SMALL_FLINCH 5 
$sequence "leftlegsmflinch" "leftlegsmflinch" fps 22 ACT_FLINCH_LEFTLEG 1 
$sequence "rightlegsmflinch" "rightlegsmflinch" fps 22 ACT_FLINCH_RIGHTLEG 1 
$sequence "rightarmflinch" "rightarmflinch" fps 22 ACT_FLINCH_RIGHTARM 1 
$sequence "leftarmflinch" "leftarmflinch" fps 22 ACT_FLINCH_LEFTARM 1 
$sequence "launchgrenade" "launchgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 8 24 } 
$sequence "throwgrenade" "throwgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 7 34 } 
$sequence "idle1" "idle1" fps 15 loop ACT_IDLE 1 
$sequence "idle2" "idle2" fps 10 loop ACT_IDLE 1 
$sequence "combatidle" "combatidle" fps 20 loop ACT_IDLE_ANGRY 1 
$sequence "frontkick" "frontkick" fps 35 ACT_MELEE_ATTACK1 1 { event 3 13 } { event 2010 13 } 
$sequence "crouching_idle" "crouching_idle" fps 15 loop 
$sequence "crouching_wait" "crouching_wait" fps 15 ACT_CROUCH 0 
$sequence "crouching_mp5" "crouching_mp5_blend1" "crouching_mp5_blend2" blend XR -45 45 fps 20 loop ACT_RANGE_ATTACK1 1 {
  { event 4 1 } 
  { event 5 5 } 
  { event 6 9 } 
  { event 5001 1 "50" } 
  { event 5001 5 "50" } 
  { event 5001 9 "50" } 
 }
$sequence "standing_mp5" "standing_mp5_blend1" "standing_mp5_blend2" blend XR -45 45 fps 20 loop {
  { event 4 1 } 
  { event 5 5 } 
  { event 6 9 } 
  { event 5001 1 "50" } 
  { event 5001 5 "50" } 
  { event 5001 9 "50" } 
 }
$sequence "reload_mp5" "reload_mp5" fps 36 ACT_RELOAD 1 { event 2 41 } 
$sequence "crouching_shotgun" "crouching_shotgun_blend1" "crouching_shotgun_blend2" blend XR -45 45 fps 20 ACT_RANGE_ATTACK1 1 { event 4 1 } { event 5001 1 "51" } 
$sequence "standing_shotgun" "standing_shotgun_blend1" "standing_shotgun_blend2" blend XR -45 45 fps 20 { event 4 1 } { event 5001 1 "51" } 
$sequence "reload_shotgun" "reload_shotgun" fps 36 { event 2 41 } 
$sequence "advance_signal" "advance_signal" fps 25 ACT_SIGNAL1 1 { event 10 7 } 
$sequence "flank_signal" "flank_signal" fps 19 ACT_SIGNAL2 1 
$sequence "retreat_signal" "retreat_signal" fps 25 ACT_SIGNAL3 1 
$sequence "drop_grenade" "drop_grenade" fps 40 ACT_SPECIAL_ATTACK1 1 { event 9 31 } 
$sequence "limpingwalk" "limpingwalk" LX fps 30 loop ACT_WALK_HURT 1 
$sequence "limpingrun" "limpingrun" LX fps 30 loop ACT_RUN_HURT 1 
$sequence "180L" "180L" fps 12 ACT_TURN_LEFT 1 
$sequence "180R" "180R" fps 12 ACT_TURN_RIGHT 1 
$sequence "strafeleft" "strafeleft" LX LY fps 30 loop ACT_STRAFE_LEFT 1 
$sequence "straferight" "straferight" LX LY fps 30 loop ACT_STRAFE_RIGHT 1 
$sequence "dieback1" "dieback1" X fps 25 ACT_DIEBACKWARD 1 { event 11 5 } { event 2001 17 } 
$sequence "dieforward_1" "dieforward_1" X fps 26 ACT_DIEFORWARD 1 { event 11 12 } { event 2001 19 } 
$sequence "dieforward_2" "dieforward_2" X fps 30 ACT_DIEFORWARD 1 { event 11 12 } { event 2001 19 } 
$sequence "diesimple" "diesimple" X fps 15 ACT_DIESIMPLE 1 { event 11 3 } { event 2001 10 } 
$sequence "diebackwards" "diebackwards" X fps 30 ACT_DIEBACKWARD 1 { event 11 6 } { event 2001 12 } 
$sequence "dieheadshot" "dieheadshot" X fps 30 ACT_DIE_HEADSHOT 1 { event 11 1 } { event 2001 20 } 
$sequence "diegutshot" "diegutshot" X fps 30 ACT_DIE_GUTSHOT 1 { event 11 0 } { event 2001 29 } 
$sequence "barnacled1" "barnacled1" fps 40 ACT_BARNACLE_HIT 1 
$sequence "barnacled2" "barnacled2" fps 40 loop ACT_BARNACLE_PULL 1 {
  { event 1008 1 "hgrunt/gr_die1.wav" } 
  { event 4 9 } 
  { event 5001 9 "50" } 
  { event 5 11 } 
  { event 5001 11 "50" } 
  { event 1008 13 "hgrunt/gr_pain4.wav" } 
  { event 6 13 } 
  { event 5001 13 "50" } 
  { event 5 15 } 
  { event 5001 15 "50" } 
  { event 6 23 } 
  { event 5001 23 "50" } 
  { event 4 24 } 
  { event 5001 24 "50" } 
  { event 1008 24 "hgrunt/gr_die2.wav" } 
  { event 6 25 } 
  { event 5001 25 "50" } 
  { event 4 41 } 
  { event 5001 41 "50" } 
  { event 5 43 } 
  { event 5001 43 "50" } 
  { event 6 47 } 
  { event 5001 47 "50" } 
  { event 5 60 } 
  { event 5001 60 "50" } 
  { event 1008 62 "hgrunt/gr_die1.wav" } 
  { event 4 62 } 
  { event 5001 62 "50" } 
  { event 5 64 } 
  { event 5001 64 "50" } 
  { event 6 67 } 
  { event 5001 67 "50" } 
  { event 4 68 } 
  { event 5001 68 "50" } 
 }
$sequence "barnacled3" "barnacled3" fps 18 ACT_BARNACLE_CHOMP 1 
$sequence "barnacled4" "barnacled4" fps 15 loop ACT_BARNACLE_CHEW 1 
$sequence "dead_on_stomach" "dead_on_stomach" fps 10 
$sequence "deadstomach" "deadstomach" fps 10 
$sequence "deadside" "deadside" fps 10 
$sequence "deadsitting" "deadsitting" fps 10 
$sequence "repel_jump" "repel_jump" fps 22 ACT_HOVER 1 
$sequence "repel_repel" "repel_repel" fps 18 loop ACT_GLIDE 1 
$sequence "repel_shoot" "repel_shoot_blend1" "repel_shoot_blend2" blend XR -90 45 fps 18 loop ACT_FLY 1 {
  { event 4 0 } 
  { event 5 2 } 
  { event 6 4 } 
  { event 5001 0 } 
  { event 5001 2 } 
  { event 5001 4 } 
 }
$sequence "repel_land" "repel_land" fps 20 ACT_LAND 1 
$sequence "repel_die" "repel_die" fps 12 
$sequence "dragholeidle" "dragholeidle" fps 10 loop 
$sequence "draghole" "draghole" fps 5 { event 1000 1 } { event 1004 20 "debris/bustflesh1.wav" } 
$sequence "bustwall" "bustwall" fps 20 { event 1000 1 } 
$sequence "hoprail" "hoprail" fps 22 
$sequence "converse1" "converse1" fps 14 loop 
$sequence "converse2" "converse2" fps 14 loop 
$sequence "startleleft" "startleleft" fps 12 
$sequence "startleright" "startleright" fps 12 
$sequence "divecover" "divecover" fps 22 
$sequence "defuse" "defuse" fps 14 loop 
$sequence "corner1" "corner1" fps 14 loop 
$sequence "corner2" "corner2" fps 10 loop 
$sequence "stone_toss" "stone_toss" fps 15 
$sequence "cliffdie" "cliffdie" AX AY AZR fps 36 { event 1001 0 } { event 1000 0 } 
$sequence "WM_button" "WM_button" AX AY AZR fps 30 
$sequence "WM_moatjump" "WM_moatjump" AX AY AZR fps 30 
$sequence "bustwindow" "bustwindow" fps 24 { event 1003 5 "break" } 
$sequence "dragright" "dragright" LX fps 28 loop 
$sequence "dragleft" "dragleft" LX fps 28 loop 
$sequence "trackwave" "trackwave" fps 24 loop 
$sequence "trackdive" "trackdive" fps 28 { event 1003 38 "switch" } 
$sequence "flyback" "flyback" fps 25 { event 1003 29 "zap" } { event 1008 25 "weapons/electro4.wav" } 
$sequence "impaled" "impaled" fps 10 { event 1000 1 } 
$sequence "jumptracks" "jumptracks" fps 30 
$sequence "pipetoss" "pipetoss" fps 30 
$sequence "plunger" "plunger" fps 22 
$sequence "soldier_dump" "soldier_dump" fps 28 
$sequence "soldier_dump_idle" "soldier_dump_idle" fps 28 loop 
$sequence "soldier_shoot_ahead" "soldier_shoot_ahead" fps 32 loop {
  { event 4 1 } 
  { event 5 6 } 
  { event 6 12 } 
  { event 5001 1 "50" } 
  { event 5001 6 "50" } 
  { event 5001 12 "50" } 
 }
$sequence "soldier_kick" "soldier_kick" fps 35 { event 1003 13 "00xy_frontkick" } 
$sequence "cap_gordon_idle" "cap_gordon_idle" fps 10 loop 
$sequence "cap_gordon" "cap_gordon" fps 27 
$collisionjoints "phymodel.smd" {

	$mass 115.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "bip01"

	$jointconstrain "bip01 spine" x limit -20.00 20.00 0.00
	$jointconstrain "bip01 spine" y limit -25.00 25.00 0.00
	$jointconstrain "bip01 spine" z limit -25.00 30.00 0.00

	$jointconstrain "bip01 r upperarm" x limit -30.00 30.00 0.00
	$jointconstrain "bip01 r upperarm" y limit -45.00 80.00 0.00
	$jointconstrain "bip01 r upperarm" z limit -110.00 40.00 0.00

	$jointconstrain "bip01 r forearm" x limit 0.00 0.00 0.00
	$jointconstrain "bip01 r forearm" y limit 0.00 0.00 0.00
	$jointconstrain "bip01 r forearm" z limit -90.00 4.00 0.00

	$jointconstrain "bip01 l upperarm" x limit -30.00 30.00 0.00
	$jointconstrain "bip01 l upperarm" y limit -80.00 45.00 0.00
	$jointconstrain "bip01 l upperarm" z limit -110.00 40.00 0.00

	$jointconstrain "bip01 l forearm" x limit 0.00 0.00 0.00
	$jointconstrain "bip01 l forearm" y limit 0.00 0.00 0.00
	$jointconstrain "bip01 l forearm" z limit -90.00 4.00 0.00

	$jointconstrain "bip01 l hand" x limit -60.00 60.00 0.00
	$jointconstrain "bip01 l hand" y limit 0.00 20.00 0.00
	$jointconstrain "bip01 l hand" z limit -35.00 35.00 0.00

	$jointconstrain "bip01 r hand" x limit -60.00 60.00 0.00
	$jointconstrain "bip01 r hand" y limit -20.00 0.00 0.00
	$jointconstrain "bip01 r hand" z limit -35.00 35.00 0.00

	$jointconstrain "bip01 r thigh" x limit -25.00 30.00 0.00
	$jointconstrain "bip01 r thigh" y limit -40.00 20.00 0.00
	$jointconstrain "bip01 r thigh" z limit -37.00 63.00 0.00

	$jointconstrain "bip01 r calf" x limit 0.00 0.00 0.00
	$jointconstrain "bip01 r calf" y limit 0.00 0.00 0.00
	$jointconstrain "bip01 r calf" z limit -95.00 4.00 0.00

	$jointrotdamping "bip01 head" 5.00
	$jointconstrain "bip01 head" x limit -40.00 40.00 0.04
	$jointconstrain "bip01 head" y limit -25.00 25.00 0.04
	$jointconstrain "bip01 head" z limit -13.00 30.00 0.04

	$jointconstrain "bip01 l thigh" x limit -30.00 25.00 0.00
	$jointconstrain "bip01 l thigh" y limit -20.00 40.00 0.00
	$jointconstrain "bip01 l thigh" z limit -37.00 63.00 0.00

	$jointconstrain "bip01 l calf" x limit 0.00 0.00 0.00
	$jointconstrain "bip01 l calf" y limit 0.00 0.00 0.00
	$jointconstrain "bip01 l calf" z limit -95.00 4.00 0.04

	$jointconstrain "bip01 l foot" x limit -10.00 10.00 0.00
	$jointconstrain "bip01 l foot" y limit -5.00 5.00 0.00
	$jointconstrain "bip01 l foot" z limit -15.00 35.00 0.00

	$jointconstrain "bip01 r foot" x limit -10.00 10.00 0.00
	$jointconstrain "bip01 r foot" y limit -5.00 5.00 0.00
	$jointconstrain "bip01 r foot" z limit -15.00 35.00 0.04
}


Are you using lots of alternate skins? Because when I tried to make a model with around 6 skins with 5 textures each (which adds up to 30 not 32 you’ll notice), I also got that error.

Well, the model has exactly 30 .bmp files…

Ah I know what it might be, it sometimes doesn’t like having lots of texture path with lots of textures I think it may think (as much as a piece of code can think) it’s looking for 90 textures instead of 30 for some reason (as compilers aren’t the smartest of creatures ¬.¬)

Well, I got past the texture error by re-doing the UV map.
but now I have this issue.

http://filesmelt.com/downloader/bad_rig.png

Ignore the missing textures.

Hmm its seems you have stuffed the rig. Try re-rigging the arms.

Well It worked, Thanks for the help. :buddy:

http://filesmelt.com/downloader/c1a3a0001.jpg

Sorry i know it’s a bump, but can i have those models? pleeassssse

:wtc:

The model was released in the HL:S HD SVN.