MDL QC Compile command list Created 6 years ago2017-06-14 06:36:59 UTC by The303 The303

Created 6 years ago2017-06-14 06:36:59 UTC by The303 The303

Posted 6 years ago2017-06-14 06:36:59 UTC Post #335466
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.
Posted 6 years ago2017-06-19 03:03:39 UTC Post #335579
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.
Posted 6 years ago2017-06-20 02:13:46 UTC Post #335592
Oh dude this is awesome. I can't wait to test some of these. I don't know of any special orders though.
Tetsu0 Tetsu0Positive Chaos
Posted 6 years ago2017-06-24 06:03:35 UTC Post #335713
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:
User posted image
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:
User posted image
Notice the far stove in the back is rendered correct but only in the second pic.
Posted 6 years ago2017-06-24 10:38:46 UTC Post #335720
Nice - I didn't realise that most of the $flags variables from Quake still worked - I'll have to try them out some time.
Posted 6 years ago2017-06-29 18:54:52 UTC Post #335813
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
Posted 6 years ago2017-07-15 02:44:16 UTC Post #336046
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).
Posted 6 years ago2017-07-15 03:55:09 UTC Post #336047
"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.
Posted 6 years ago2017-07-15 05:20:54 UTC Post #336049
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.
Posted 6 years ago2017-07-15 09:27:33 UTC Post #336053
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. :/
Posted 6 years ago2017-07-15 10:28:39 UTC Post #336058
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.
Posted 6 years ago2017-07-15 22:28:48 UTC Post #336083
Killer thread! Can't wait to get back into modeling once my computer is online again
Tetsu0 Tetsu0Positive Chaos
You must be logged in to post a response.