• QC Files
    77 replies, posted
As I start to understand a little more about how QC files work, I went back and wrote my own based on the old hl2 and L4D2 source files. They're not really perfect and they're primarily tailored to my own workflow, but perhaps they'll help someone out eventually. For the time being it should also help show how I changed the characters' statures. I still plan on writing something fancier for it but I'm still waiting on the next GMod update for some fixes as well. This contains two sets of QC files for Left 4 Dead 2 and for Garry's Mod. You can get the files [url=https://www.dropbox.com/s/nf18odc309crunp/QCs.rar?dl=0]here[/url]. These are the files used to compile the Miku Append model. The Left 4 Dead 2 compile contains two animation override scripts written by ZeqMacaw. Here are some things I learned as well (primarily regarding proportions): - Changing a character's proportions / stature is possible. It may have issues, but it works nonetheless without needing to redo a ridiculous amount of animations. - Proportions works by subtracting your modified skeleton from the original skeleton. The original skeleton is whatever skeleton the animations you wish to use are built on (in this case the female gmod skeleto and the Zoey skeleton). - Since the modified skeleton is subtracted from the original, you'll need to line the original skeleton up to your new one manually (by rotations only), though you can also use this to push the character's arms out for bulkier models like space marines. - ikchains can be re-enabled on the character's hands to force them back on to the weapon animations if the arms lengths have been modified. - Using the proportions stuff can allow you to bring models over to Left 4 Dead 2 from GMod fairly easily since the skeleton is mostly preserved (though the thumb bones will need to be rotated 180 degrees in the reference). - In 3ds max, bones [I]can[/I] be mirrored. Use the bone tools in the animation menu to do so rather than using the standard mirror tools. Make sure the axes are lined up with what you want. If any bones appear collapsed, detaching them and re-attaching them will reset them and remove any complaints from the exporter about them being "mirrored." - Changing the hierarchy is possible but may result in a few issues (I'm still experimenting with this). An alternative is to simply move bones in to the locations you desire and to ignore the bones below them. Since you have the power to change the location and since animations [I]usually[/I] only rotate bones then you could, for example, move Spine2 in to Spine1's location and act as if Spine1 isn't really there (though it's left in the hierarchy) for stiffer back movements. - Joint properties can be used. Normally a model's surface data is set for the whole model but models with joints can set them for specific bones so you could make the model metal in areas and fleshy in others for armored characters with exposed skin. - Helper bones really do help. Find a tutorial [URL="http://facepunch.com/showthread.php?t=1295558"]here.[/URL] - These changes open up a lot of opportunities, but you're still at the mercy of your animations, mostly. Non-humanoid characters my not necessarily suddenly work on humanoid animations. - The height of the pelvis will need to be adjusted to ensure the player's feet reach the ground and the player's legs are slightly bent without any snapping during running. - Since your skeleton will be modified, you may need to rig your model manually -- you might just have better results that way anyway. Lastly, here's an example of how drastic proportions can be on smaller characters. [t]http://i.imgur.com/vCaVI90.jpg[/t] (The original is below, but for some reason it vanished from the Steam cloud). [URL]http://cloud-4.steampowered.com/ugc/44230686587286787/4A7950D7BE3190783ECB4916AFDB25DB6CB80A5C/[/URL] Some more in-depth explanations: [URL]https://facepunch.com/showthread.php?t=1542556&p=51418064&viewfull=1#post51418064[/URL] [URL]https://facepunch.com/showthread.php?t=1499351&p=49416676&viewfull=1#post49416676[/URL]
Thanks for sharing! A more informed community means better content releases all around.
[QUOTE]- Joint properties can be used. Normally a model's surface data is set for the whole model but models with joints can set them for specific bones so you could make the model metal in areas and fleshy in others for armored characters with exposed skin. [/QUOTE] We've had support for this for how long?
[QUOTE=Sally;46588641]We've had support for this for how long?[/QUOTE] I believe half life 2 used this for the airboat for certain sounds on the pontoons and metal.
[QUOTE=Sally;46588641]We've had support for this for how long?[/QUOTE] Most of the stuff in that list has technically been do-able for quite some time, but that doesn't mean everybody knows about it.
What exactly is meant by subtracting a skeleton? I just need a little more clarification-- especially what you mean by lining it up. How can I line it up if it's differently proportioned, aside from lining up the pelvis?
The adjusted skeleton is subtracted from the original skeleton and runs it as a delta animation. This basically just means that replacing the reference.smd with your original skeleton means you can retain your adjusted skeleton without any other effort. In other words moving the model from GMod to Left 4 Dead 2 will entail replacing the reference.smd from the GMod skeleton with Zoey's skeleton. The animation says "let's take these bones and move them here, then play this sequence [I]over[/I] other sequences rather than overriding them." The animations move the bones in to the locations you set from the original animations, and since they don't override anything, the model doesn't just t-pose. As far as subtraction specifically, think of it as subtracting each of the values of each of the bones. Since the animation now runs on top of other animations with delta, it takes the difference of each of the values and just tells the skeleton to add those values to the existing animation values. I have no idea if that makes any sense or not. If your proportions skeleton has the arms out while your reference skeleton has the arms down, then the result will be your character's arms being further out in every animation which is good for bulkier models. For lining it up I just mean by rotation so limbs aren't pushed in to different locations if you don't want them to be. The translations themselves don't need to be aligned -- even on the pelvis. I'll clarify on that in the original post.
So, if I want to force one limb to be smaller, I'd just use the default skeleton as the reference sequence and my proportioned skeleton as the things my model is bound to?
If you wanted one limb to be smaller, you would re-arrange the bones in said limb and rig it the way you wanted it. The modified skeleton would be the proportions file and the unedited skeleton (excluding rotational adjustments to match your skeleton's modified pose) would be the reference file.
Alright. I'm just stumped with this. I have one mesh where I scaled down an arm in blender's pose mode, and then applied the scale so that the mesh was modified. I then copied that scaled skeleton and applied the scaling, such that all of the bones had modified position. I then reset the original skeleton, such that my mesh was bound to the reference skeleton. It looks like this: [url]https://mega.co.nz/#!YsImnAxY!un4XZpNdMmMEvjFhE6-fUrHOm_1YXt-mmkYeWQUUjXE[/url] I have these lines in my QC: $sequence reference "anims/reference.smd" fps 1 $animation a_proportions "anims/proportion.smd" subtract reference 0 $sequence proportions a_proportions predelta autoplay And the problem is, the bones rotate around their original positions. What do? If I bind the meshes to the proportions skeleton instead of the reference, the arms become stretched.
The most I use blender for is importing PMX files since I don't know of any importers for 3ds max for them. Other than that I know next to nothing about it so I couldn't tell you if you were just skipping something important on a modifier. In max, the skin modifier saves the locations and orientations of the bones and moving either the mesh or the bones usually requires the modifier to be reset (there's just a box you uncheck and check again).
Having a little trouble understanding what I'm supposed to do with the two skeletons. Could you possibly add a side by side picture example of the "original" and "modified" skeletons?
[t]http://i.imgur.com/ILt1EIV.png[/t] The model on the left is the original skeleton which is just the unedited Valve biped (with jigglebones added) and the one on the right shifted the bones around until they were in their own positions that fit the model. Here's an older comparison of the bodies as well: The early revisions of the model stretched the body on to the skeleton [t]http://i.imgur.com/AtL7oES.png[/t] Newer revisions modify the bones instead. The mesh is unedited out of MMD in terms of proportions. [t]http://i.imgur.com/nZ6efW4.png[/t] You're basically just modifying the skeleton by shifting the bones around until it fits your model. In the QC, the skeleton subtracts the original skeleton and applies it as an animation that forces the bones to realign themselves to fit your model.
So basically I keep my current smd unedited but I need another smd of the original rig with bones rotated to match the edited one?
[QUOTE=BlueCube;46688428]So basically I keep my current smd unedited but I need another smd of the original rig with bones rotated to match the edited one?[/QUOTE] If you're in Blender, follow these steps: 1: Import a reference valve skeleton. 2: In pose mode, move the bones where you want them to be so that they fit inside the mesh and fit at the proper position. Your mesh shouldn't be bound to this skeleton yet. 3: Duplicate your reference skeleton, and in the duplicate, apply your pose mode transforms. 4: On your original, reference skeleton, keyframe its modified pose as the default and make sure it's set up for export. 5: On your actual meshes, add the mesh modifier for the duplicated skeleton and make sure it's properly rigged. 6: Finally, add these lines to your QC. Make sure you have no other $sequence lines. $sequence reference "anims/reference.smd" fps 1 $animation a_proportions "anims/proportion.smd" subtract reference 0 $sequence proportions a_proportions predelta autoplay 7: Make sure when you export, your modified skeleton should be exported to "anims/reference.smd" and the original skeleton should be exported to "anims/proportion.smd". When you think about it, it makes sense. The bones are rigged to the correct positions in the modified skeleton, but in-game the bones are moved back to the original. Adding on those proportion movements moves them back in the same directions as you did with the original skeleton modification, resulting in a reproportioned model.
Okay it's making more sense now. x3 Not sure what you mean by key framing the original (pose) as the default though.
[QUOTE=BlueCube;46688538]Okay it's making more sense now. x3 Not sure what you mean by key framing the original (pose) as the default though.[/QUOTE] In the timeline, select LocRot key mode. Select all bones in the armature, and then click "add keyframe". Boom, done.
I think I've got it now. Thanks.
One more question, up in the post it says you have to use only rotations. Does that apply when I'm fitting the rig to the model in pose mode and if so, how is that going to fix arm length and such?
[QUOTE=BlueCube;46691372]One more question, up in the post it says you have to use only rotations. Does that apply when I'm fitting the rig to the model in pose mode and if so, how is that going to fix arm length and such?[/QUOTE] Only use TRANSLATIONS, not rotations.
[QUOTE=GreyGeist;46691384]Only use TRANSLATIONS, not rotations.[/QUOTE] Thanks for clarifying.
Things got messed up even more. I know I'm doing something wrong, I just don't know what. [url]http://i.imgur.com/tyMx3N9.png[/url] Here's the skeletons: [url]http://i.imgur.com/qQTRPd3.png[/url] [url]http://i.imgur.com/YlwhYDm.png[/url] And exactly what I put in the .qc: $sequence reference "anims/reference.smd" fps 1 $animation a_proportions "anims/proportion.smd" subtract reference 0 $sequence proportions a_proportions predelta autoplay
Rotations [I]can[/I] be used, I just let max handle the alignments for me. Since the new skeleton is subtracted from the standard GMod skeleton, you'll want to ensure you take the reference.smd skeleton and line it up with your model so the bone rotations are the same. While we're at it you should go ahead and replace the skeleton you used for reference.smd if it's the skeleton you first used. That's the one that didn't work in the first place so the wrong skeleton is being subtracted. Use a standard female skeleton or import the one I uploaded for reference and just remove the jigglebones.
[QUOTE=CaptainBigButt;46693323]Rotations [I]can[/I] be used, I just let max handle the alignments for me. Since the new skeleton is subtracted from the standard GMod skeleton, you'll want to ensure you take the reference.smd skeleton and line it up with your model so the bone rotations are the same. While we're at it you should go ahead and replace the skeleton you used for reference.smd if it's the skeleton you first used. That's the one that didn't work in the first place so the wrong skeleton is being subtracted. Use a standard female skeleton or import the one I uploaded for reference and just remove the jigglebones.[/QUOTE] I got things switched around in my head. Just to get it straight: The proportions rig is the one that fits to your model and the reference rig is the unedited valve skeleton with bones rotated? And in the reference skeleton the bones can only be rotated (not transformed) correct?
Yes, I suppose that's one way to put it. The proportions rig can change the rotations and translations of the bones. The reference rig should match your new rig's rotations but the translations should remain the same.
I got it to work finally. :v: I do have two problems though. First, the top part of the body is tilted to one side. Initially I thought this was because the skeleton/mesh were slightly off-center from the reference skeleton but the arms and lower body don't seem to be affected by the slant. [url]http://i.imgur.com/fDHhD3Q.png[/url] Second, the legs are bent too far and the knees are weirdly bulging for some reason. This didn't happen before I applied a reference rig. [url]http://i.imgur.com/mya9FW1.png[/url]
The first problem is most likely a bone in the spine out of alignment. Check the rotations between your rig and the reference. For the second one, mess with it in HLMV. Lower the ikchains so the feet touch the ground and raise her pelvis so her legs are slightly bent and so when she walks her legs don't snap into a full straight line.
Okay every time I fix something, something else messes up. >< The top half of the body is now in an upright position after fixing some bone rotations on the x axis (forward and backward). However, now the shoulders (which may have been messed up before) and the hips are tilted at odd angles: [url]http://i.imgur.com/m4D3lcS.png[/url] And the back is now bent due to what I think is the hip section pushed back (or upper body pushed forward...): [url]http://i.imgur.com/rTfgAo4.png[/url] Also regarding the HLMV, the original fails to load the model because it says it can't find the animation files and such and Jed's HLMV just up and crashes when I try to load it. (Sorry to keep asking for your help, but this is my first time so I don't really know exactly what I'm doing)
Did you ever give the bones in the reference file the same rotations that your edited skeleton has? As far as HLMV, I use SFM's. I've never had any luck with any of the other HLMV programs.
[QUOTE=CaptainBigButt;46699349]Did you ever give the bones in the reference file the same rotations that your edited skeleton has? As far as HLMV, I use SFM's. I've never had any luck with any of the other HLMV programs.[/QUOTE] Yes, I have rotated the bones in the reference to fit the rotations in the edit skeleton. I've rechecked all the bones and they're all rotated correctly (as far as I know). If I sent you the .smd files for the reference and proportion rigs do you think you could look them over and see what I'm doing wrong?
Sorry, you need to Log In to post a reply to this thread.