News: Celebrating over 10 years serving the creative community

Author Topic: GoldSrc Studiomdl.exe compile commands list  (Read 505 times)

The303

  • Scientists
  • **
  • Posts: 35
GoldSrc Studiomdl.exe compile commands list
« on: June 14, 2017, 12:03:19 AM »
http://www.the303.org/tutorials/gold_qc.htm

This is a big QC compile command quick convenient glossary page.  I made this because other online guides and even the SDK had missed certain details.  Ive also included lots of examples added comments on my experiences. Pretty much done but may add some stuff/fixes/XASH3D stuff/formatting later.

EDIT:
Get BrianOblivion's Studiomdl.exe, its the best one out of all of them:
http://www.half-lifecreations.com/forums/index.php?topic=2210.0
« Last Edit: September 13, 2017, 07:24:37 PM by The303 »

Thomas

  • Administrator
  • Gman
  • *****
  • Posts: 1894
  • Some nerd
    • Half-Life Creations
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #1 on: June 14, 2017, 11:49:13 AM »
Thanks for post this, part of me misses messing around in qc files.

The303

  • Scientists
  • **
  • Posts: 35
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #2 on: June 29, 2017, 11:52:30 AM »
Hey, im gonna be adding yet another piece of documentation to my long list of TODO things and that will be a "troubleshooting" reference list.  I recently found a few hard to diagnose issues and their solutions.  If there is any real common ones let me know.

My current work in progress:

Illegal parent bone replacement in sequence "X" , "X" has "X" reference has "X":
SMD skeleton bones mismatch.  Correct in your 3D editor or use $renamebone for a quick fix

Model looks good in 3d editor but polygons look faceted:
Your model likley is imported geometry and has explicit normals.  If your exporter has the option of exporting in explicit mode use that option.
2nd case:
If you have two bones of the same name on export it can do this to your mesh
3rd case:
In rare cases models with $texrendermode additive can do this when used as separate mesh parts or $bodygroups.  Change the order of the meshes in the QC

Unknown for bbox "bonename"
This happens when you are using $hitbox and the bone its trying to make it on is either a different name, wrong name or was stripped out by the compiler.  The compiler will strip out bones that have no verticies attached to it, the only exception is if a child bone of said bone that is parented to it has verticies skinned to it.
An example is say you have an arm set of bones an upper, lower and hand.  The upper and lower have no verticies attached to it but the hand does.  The model will be able to assign hitboxes to the arm bones since the hand is parented and has skinned verticies.

Unknown Attachment link "X"

Same thing as the hitbox issue only for attachment.

Line "X" is incomplete:
This can be difficult to diagnose since it can be a line way further down in your QC code that is causing the issue, for example having an FPS but with no number on a sequence can cause this or an improperly set brackers {} can do this

My model is rotated wrong but looked fine in 3d editor:

Most likley is your first or idle sequence has the bone rotated.  Either fix in editor or use "rotate" on your problem $sequence line

Models textures are all wrong but looked fine in the 3d editor:

Textures were likley tiled across the UV space. GoldSrc does not support UV tiling.  To fix you must take the tiled sections and either overlap in the main UV space or just re-uv the model parts

Model looks horribly broken with all limbs rotated 90 degrees
This is a milkshape3D issue where it can break animations on export

BMP X.bmp [-19999998 -19999998] (6260919%)  1025789700 bytes
9999999 -9999999 9999999 -9999999
************ ERROR ************
texture too large


You declared a texture in $texrendermode that exists in your directory but does not exist on the model itself.  So either you chose the wrong texture in your QC or your SMD had the wrong one assigned to it.

Model looks like a horrible mess of vertices scattered everywhere
This is likley a blender export problem where you either exported with a bone with multiple vertex weights or 2 verticies to the same bone.  Fix your skinning and re export.  If this still does not work, export in source engine mode then use peterthegoats SMD converter.

Model renders inverted

Use "reverse" after your $body line and smd name.  This reverses all the triangles in your reference mesh.

Getting wierd dark areas, or inconsistent shadows or smoothing problems

Several reasons: Unwelded vertices, overalpping faces, bad triangulation, overlapping edgeloops, large NGONS (a polygon in your editor with over 4 vertices which results in bad triangulation on export) bad vertex normals, improper use of smoothing groups such as using 1 smoothing across right angles, or errors with imported geometry.  This stuff needs to be fixed in your 3d editor.

My skin change does not work
The first skin in the $texturegroup bracket list must be the one that your SMD has on it.

invalid BMP file/compression
Your BMP texture is not 8bit indexed. Use an image editor to fix this (but be sure to keep a copy of your 24bit version just in case since 8bit conversion is destructive)

too many normals/verticies in model

You went over the per-SMD limit of normals or verticies.  Reduce your polycount and/or break up the mesh into different SMDs (also ffs, don't go stupid with your final polycount.  Porting high-density badly rigged stuff from gmod will animate horribly and is bad for performance).  This can also happen by accident if you ment to export one small part of a model but your exporter did everything in the scene.

bogus bone index
SMD formatting problem. This is due to an export issue or a source engine SMD.

My masked texture still has blue on it

The blue color was not made on the proper index (index 255).  You can fix this by bringing your texture into WALLY and using the "swap indices" feature or attempt to automatically do it by putting "{" on the front of your BMP before bringing it into wally.  When done export the bmp back.

My masked texture has blue fringe

You resized your image/used a soft edge on your transparent image.  You need a hard edge, so use pencil or a masked threshold.

My models limbs crumple/streach badly when animating

This is a topology issue + hard vertex weight issue.  You must modify your topology/edgeloops to compensate for hard vertex weights.  There is no vertex weight blending so you cannot spread out a movement over several verts or edgeloops.  To compensate remove some loops then create/cut new loops that have further distance on moving parts.  Hard-vertex limit favors lower poly/density meshes.  Testing movement in your 3D editor and a good understanding of topology and movement is key to fixing this.

My models UVs are offset badly from what they used to be

This is a problem that comes with decompiled models which causes UV shifting.  To compensate use this method of fixing:
http://www.the303.org/tutorials/gold_uvfix.htm

Josef

  • Baby Gargantua
  • ******
  • Posts: 404
  • Show them online!
    • Bloodbath Softworks
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #3 on: June 30, 2017, 03:06:25 PM »

Models textures are all wrong but looked fine in the 3d editor:

Textures were likley tiled across the UV space. GoldSrc does not support UV tiling.  To fix you must take the tiled sections and either overlap in the main UV space or just re-uv the model parts

Actually, you can UV tile, but not while $cliptotextures is active.

The303

  • Scientists
  • **
  • Posts: 35
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #4 on: June 30, 2017, 06:12:50 PM »
Interesting, however after a few tests it seems that it will only tile 1UV space and after that it clamps.  Another thing is that it manages to tile by tiling the BMP itself as well as creating wierd non-power2 sizes which can cause some alignment/scaling issues.

Ill probably add a note on that but I think its best to still avoid not using cliptotextures and instead doing either a face tile in the editor or just manually extend the BMP.

An example of face tiling I did here:

SPRKH

  • Cry of Fear Team
  • Gman
  • *
  • Posts: 2567
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #5 on: July 01, 2017, 03:01:51 AM »
Studiomdl for sven happiliy clips textures even if you use $cliptotextures in the qc, at least the version I have

SPRKH

  • Cry of Fear Team
  • Gman
  • *
  • Posts: 2567
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #6 on: August 31, 2017, 01:09:00 PM »
Played around with the $gamma line. It seems to be the inverse: smaller numbers make the textures brighter, not darker.

Norman The Loli Pirate

  • Pit Drone
  • *****
  • Posts: 153
  • Los! Los! Los!
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #7 on: August 31, 2017, 09:34:09 PM »
Studiomdl for sven happiliy clips textures even if you use $cliptotextures in the qc, at least the version I have

Sniper made the compiler force texture clipping as a way to prevent the edges of textures getting chopped off if you didn't have $cliptotextures.
Not really the way I wanted it when I requested preventing texture chopping, just another example of Sniper doing things the half-assed way.
Signatures are for nerds

The303

  • Scientists
  • **
  • Posts: 35
Re: GoldSrc Studiomdl.exe compile commands list
« Reply #8 on: September 13, 2017, 07:22:43 PM »
Played around with the $gamma line. It seems to be the inverse: smaller numbers make the textures brighter, not darker.

Ah thank you, looks like I mixed that up.  Fixed it.

Also anyone who doesn't know yet get BrianOblivion's Studiomdl.exe
http://www.half-lifecreations.com/forums/index.php?topic=2210.0