Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Say hello to akn, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

15

Cobalt

32

Turquoise

10

Cyan

11

Royal

9

Teal

3

Onliners

1 mins

akn

2 mins

Silvertongue

17 mins

Penguinboy

20 mins

Shepard62700FR

34 mins

NineTnine

35 mins

Jessie

37 mins

Solokiller

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

MDL QC Compile command list

[1]

Forums > HL Engine Discussion

14 Jun 17, 07:36
By The303
avatar
Member
http://www.the303.org/tutorials/gold_qc.htm


Latest thing ive been working on as I ramp up to a full model export/compile guide, this is a quick list that ive made that fills a lot of the gaps that the SDK and some online lists have missed. Ive included as many examples and my personal comments on them. There is still a few things I may need to add/fixes but its mostly done.
19 Jun 17, 04:03
By The303
avatar
Member
Also anyone know of any order conflicts that I may have missed? For example things like having to put $origin before $body or similar things.
20 Jun 17, 03:13
By Tetsu0
avatar
Tet Soo Oh
Oh dude this is awesome. I can't wait to test some of these. I don't know of any special orders though.
24 Jun 17, 07:03
By The303
avatar
Member
So I revisited an old error while going through stuff and I found that having separate meshes with $additive has some unusual behavior in $body or bodygroup order:

The closer one had the main lamp mesh first, then the blobs. The farther one had the blobs mesh first then the main lamp. This error is easily mistaken for the "explicit normals" issue since it looks the same but is additive and mesh order related.

Now heres another thing that I cannot figure out. I noticed that on some props the additive would not render when another prop was present. But in trying to replicate the error I got some strange sometimes working sometimes not. Thought it was light or distance but its not consistent:

Notice the far stove in the back is rendered correct but only in the second pic.
24 Jun 17, 11:38
By tschumann
avatar
Member
Nice - I didn't realise that most of the $flags variables from Quake still worked - I'll have to try them out some time.
29 Jun 17, 19:54
By The303
avatar
Member
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
15 Jul 17, 03:44
By tschumann
avatar
Member
So the engine requires the model to be in motion for $flags to take effect - what does in motion actually mean? I've set pev->velocity on my entity and still don't see any effects (the model itself is an empty model i.e. it has no body or whatever).
15 Jul 17, 04:55
By The303
avatar
Member
"empty" model? as in no mesh or bones? I'm assuming that you need your model to have at least one bone or something. For example my first test with QUAKE mdl flags was putting $flags 1 on the mp5 grenade. So whenever it launched it had that trail while in motion. I did similar by giving the gib model $flags 4 for blood and the blood particles stop flowing as soon as the bouncing gibs come to a rest.
15 Jul 17, 06:20
By Solokiller
avatar
Member
The effects use R_RocketTrail, with the old and new origin as the start and end. As long as the entity has a model it will do this, but i don't know if the engine will load an empty model or if it discards it.
15 Jul 17, 10:27
By abbadon
avatar
Member
Transparent (alpha) textures behind another transparent textures are not rendered, even solid meshes disappear and are not rendered if they are behind an alpha texture. :/
15 Jul 17, 11:28
By tschumann
avatar
Member
Yeah it's a model with no bones or meshes or whatever. I guess I'll try something more substantial.
The engine doesn't complain when it loads it but JHLMV gives an error.
15 Jul 17, 23:28
By Tetsu0
avatar
Tet Soo Oh
Killer thread! Can't wait to get back into modeling once my computer is online again
[1]

Forums > HL Engine Discussion

Login to Reply

You must be logged in to reply.