QC Help

Modelling, Textures, Animating and other general engine asset topics.

QC Help

Postby Epifire on Mon Jul 16, 2012 6:31 pm

So I have finally broken through a big skill barrier, and learned the basics of layer masks in Gimp. It has made a huge difference in what I can put together, even after one night of work.

So I got several pointers on what I wanted to do with a window prop I have made for fun.

Needs to glow, at least the glass part. Would be nice to also use a secular map on the glass so that it is also reflective. And lastly I split the model up into two textures, so I need to know how to tie two textures to one model. And I am not talking about multiple skins, I just gotta separate stuff a little more because the UV tools in XSI are not as manageable for a single UV map.

Just wanting to know how to do this right, cause I could be guessing all day on how I am supposed to setup the additional QC parameters.

EDIT: Alright so I ended up compiling the two areas separately that have the different UVs for the model. But with a basic QC that appears to have no faults here is a compile that went wrong.
Code: Select all
C:\Users\*pc user name*\Desktop\Compile Folder>"d:\steam\steamapps\sir_epifire\sou
rcesdk/bin/orangebox/bin/studiomdl.exe" -nop4 "C:\Users\*pc user name*\Desktop\Com
pile Folder\ext_smallwindow0001b.qc"
qdir:    "c:\users\*pc user name*\desktop\compile folder\"
gamedir: "d:\steam\steamapps\sourcemods\hl2w-ravenholm\"
g_path:  "C:\Users\*pc user name*\Desktop\Compile Folder\ext_smallwindow0001b.qc"
Building binary model files...
Working on "ext_smallwindow0001b.qc"
ERROR: c:\users\*pc user name*\desktop\compile folder\ext_smallwindow0001b.qc(4):
- could not load file 'ext_smallwindow0001b_ref'
ERROR: Aborted Processing on 'ravenprops\ext_smallwindow0001b'
WARNING: Leaking 1 elements

C:\Users\*pc user name*\Desktop\Compile Folder>pause
Press any key to continue . . .


The QC that goes on before that goes like this.

Code: Select all
$modelname ravenprops\ext_smallwindow0001b
$staticprop
$cdmaterials models\ravenprops
$body Body ext_smallwindow0001b_ref

$sequence Idle ext_smallwindow0001b_ref.smd

$surfaceprop glass

$collisionmodel ext_smallwindow0001b_phys

{
$concave
}
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: QC Help

Postby Stormy on Mon Jul 16, 2012 9:30 pm

glow - $selfillum

reflective - $envmap, $enmapmask

Two textures to one model: Make your two different materials in XSI and then make two different VMT files with the same names as the materials in XSI. The SMD file is a list of vertices and the materials assigned to those vertices, so it will find the VMT materials itself, as long as the VMT filenames are the same as the XSI material names.
The file path is constructed when you compile the model, using the $cdmaterials line. So where your XSI material name is
Code: Select all
"model_material"

and your $cdmaterials line reads
Code: Select all
$cdmaterials props/my_models/gaymodel

then your compiled model will be looking for
Code: Select all
[mod directory]/materials/models/props/my_models/gaymodel/model_material.vmt

Please note that if you have created a material in XSI from an image file, it will hold the extension in the material name. For instance "model_diffuse.tga" will be the material name, so the smd will be looking for "model_diffuse.tga.vmt". If you want to, you can manually change the material name in the SMD file, just open it in notepad to have a look at the material name for the vertices. whatever it says in the smd file is the material name, so if you change it to "BLACK_STORMYISAFAGIT" your smd will now look for "BLACK_STORMYISAFAGIT.vmt"
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: QC Help

Postby Stormy on Mon Jul 16, 2012 9:33 pm

On your edit there, the qc file can't find your reference model. Make sure you have it named properly, and have it in the same folder as your qc file.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: QC Help

Postby Epifire on Tue Jul 17, 2012 5:52 am

Okay so I have got my model compiled and without the compiler screaming errors at me. So I got two more things to note. I added a normal map and I think I got my vmt paths right cause all I did was keep the normal map along side the base texture. I used the same vmt path too, and now I get a checkerboard stuff on my model when I toggle it in mdl viewer.

Here is the weird error. I sized my model up wrong the first time and rexported the smds with the adjusted size. This had no effect for some reason when I had overwritten the old smds/mdl. Not sure why that is, I even deleted my mdl, just to see if it was overwriting it or not and I got the same result. The collision mesh (just being single block outline, was out of position as well, and my prop was partially hidden in the floor, contrary to how it was in XSI. Little confused on this one. :?
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: QC Help

Postby Stormy on Wed Jul 18, 2012 12:37 am

Not too sure about the XSI mod tools, but in blender the origin point on the mesh lines up with the ground plane in source. I'm pretty sure you can manually adjust this in the .qc as well with $offset or $origin or something like that, but you're better of making the model itself have the correct origin and avoid extraneous declarations in your qc. Also I can remember this happening to me when I started compiling, I generally used to restart and then it would work, but looking back I think I had the filepaths mixed up. Sometimes I compile different versions, or for different engines. Make sure you haven't changed to a different mod directory, check the output path in studiomdl to make sure you know where you're writing to. Also try deleting all your smds before exporting, and all your compiled model files after exporting. These are all just ways of making sure you are compiling to the right path, however.

Also check your filepaths in your vmt, and check what compression type your .vtf files are using, a bad compression type can result in bizarre happenings, usually in the form of invisible models in HLMV. Purple checker almost always means bad filepaths, however. You can also check the filepath your model is looking at for materials in the .mdl file. Open it in notepad and have a look at the legible writing near the end of the file, it should have material names and filepaths. I'm not sure if you can change them here, but you can recompile and check again.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: QC Help

Postby Epifire on Wed Jul 18, 2012 9:25 pm

Yeah I think the reason why it got screwed up, (being my only prop that has done this) mainly due in part to deleting and separating part of the mesh after it had been merged. Difficult to explain, but that whole split texture thing had a lot to do with it.

Thanks for all the advice though.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: QC Help

Postby Naticus on Thu Aug 02, 2012 1:50 pm

Black_Stormy wrote:Please note that if you have created a material in XSI from an image file, it will hold the extension in the material name. For instance "model_diffuse.tga" will be the material name, so the smd will be looking for "model_diffuse.tga.vmt". If you want to, you can manually change the material name in the SMD file, just open it in notepad to have a look at the material name for the vertices. whatever it says in the smd file is the material name, so if you change it to "BLACK_STORMYISAFAGIT" your smd will now look for "BLACK_STORMYISAFAGIT.vmt"


Black Stormy, you helped my ass!! I recently tried my hand and compiling models again and could not figure out how to link up the compiled model with the material files. This makes perfect sense. Thanks a million!!

You wouldn't happen to know why Valve's SMD exporter won't work with XSI 7 64bit would you? I had to use some guy's OBJ to SMD converter.
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Re: QC Help

Postby Epifire on Thu Aug 02, 2012 9:26 pm

Ah I can help with a lot of the XSI stuff. You gotta use XSI 6 to use the Valve exporter, since 7 is not compatible for some reason. I use them like this... 7 is used for rendermapping since 6 has a bugged rendermapping system. 6 I use for everything else since it will do just that. A technique I use is I make a copy of my scene that is loaded in 6 so that 7 can save over onto the copy (rendermapping will not work otherwise) then once I got the rendermapped texture, I make sure to have no clusters left except for the projection in 6. Then I can just take the rendermapped texture and apply it in 6 without having to load any other scenes.

I can make a more in depth guide on that if you are interested in hearing.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: QC Help

Postby Naticus on Fri Aug 03, 2012 12:15 pm

That's a little annoying that the exporter won't work with the latest version of XSI. I'd rather not have two installs of XSI on my machine. Thanks for your offer to help with XSI. I will probably have many more questions.
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Re: QC Help

Postby Epifire on Fri Aug 03, 2012 4:58 pm

If your like me and have issues acclimating to other modeling applications then I can supply a lot of help and advice along the lines of using XSI for Source props. It is difficult to find many XSI users anymore, so feel free to PM me if you need to.
Image
User avatar
Epifire
Senior Member
Senior Member
 
Joined: Fri Mar 25, 2011 8:54 pm
Location: Minnesota, where you're froze 24/7

Re: QC Help

Postby Naticus on Thu Aug 09, 2012 2:14 pm

I finally tried to give another go at compiling a model and I am still ending up with checkerboards. I can see the formed model in the viewer but the texture isn't coming through. Here are the steps I took and the files I used:

The QC File
Code: Select all
$modelname   "lcg\test_battery.mdl"
$body mybody   "test_battery_01-ref.smd"
$staticprop
$surfaceprop   combine_metal
$cdmaterials   "materials\lcg"

$sequence idle   "test_battery_01-ref.smd"

$collisionmodel   "test_battery_01-phys.smd" { $concave }


The SMD File (same file content for both the ref and phys)
Code: Select all
version 1
nodes
  0 "test_battery_01"  -1
end
skeleton
time 0
  0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
triangles
test_battery_texture2.vmt
 0     2.5794     2.1768   -16.0000 -0.0535 -0.0102 -0.9985  0.9152  0.9354
 0     1.3691     2.1768   -15.8552 -0.3069 -0.0150 -0.9516  0.9150  0.9740
 0     1.3860     4.0442   -15.8523 -0.3093  0.0029 -0.9510  0.8555  0.9732
// TONS MORE LIKE THE LAST 4 LINES
end


The VMT File
Code: Select all
"VertexlitGeneric"
{
   "$basetexture" "lcg/test_battery_texture2"
   "$surfaceprop" "Metal"
}


When I compile the model, I am dragging and dropping the QC file above on to the studiomdl.exe file located in sourcesdk/bin/source2009/bin

The destination folder for the model is half-life 2 episode 2/ep2/models/lcg
The folder where the material files are located is half-life 2 episode 2/ep2/materials/lcg

The resulting files for the model are showing up in the right place.

Please let me know if you can see where I am going wrong with the texture locations. Thanks!!
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Re: QC Help

Postby shawnolson on Thu Aug 09, 2012 2:18 pm

Try changing the line:
Code: Select all
$cdmaterials   "materials\lcg"


to

Code: Select all
$cdmaterials   "lcg"
__________________________
Shawn Olson
Product Owner -- Autodesk 3ds Max
Developer of Wall Worm
Technical Artist for Black Mesa
User avatar
shawnolson
Regular
Regular
 
Joined: Tue May 26, 2009 11:18 pm
Location: USA

Re: QC Help

Postby Naticus on Thu Aug 09, 2012 2:23 pm

That worked! Thanks!!
Naticus
Been Here A While
Been Here A While
 
Joined: Mon May 22, 2006 4:54 pm

Re: QC Help

Postby Stormy on Sat Aug 11, 2012 11:51 pm

Black_Stormy wrote:Purple checker almost always means bad filepaths


But I can see why you would be a bit confused about the qc path. $cdmaterials is relative to your [mod dir]/materials folder and $modelname is relative to your [mod dir]/models folder, which is why you'll often see "$cdmaterials models/X/Y"
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Return to Art Creation

Who is online

Users browsing this forum: No registered users