Model textures not showing up. Created 12 years ago2012-01-09 08:44:03 UTC by Captain Terror Captain Terror

Created 12 years ago2012-01-09 08:44:03 UTC by Captain Terror Captain Terror

Posted 12 years ago2012-01-09 08:45:06 UTC Post #302551
I continued Rim's goldource modeling tutorial and tried compiling for source, following this tutorial, about exporting max models to hl2.

My models show up in wireframe, and i can see/touch the collision model in game, but the textures show invisible. If i delete the materials directory in the qc, the model shoes up perfectly in pink and black triangles, but with no texture at all.

Here is a copy of my qc, smds, max file, textures

I know i've seen this problem brought up in the forums, but for the life of me i can't find it ='(
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2012-01-10 10:39:07 UTC Post #302577
Fixed! My Shipment of win has arrived, in Source!
User posted image
I still have no idea what was wrong, i just kept rewriting the vmt and qc until it worked. Models coming in hot! =)

Thanks againe to Rimrook for writing the Modeling for goldsource tutorial, which helped refresh me how to do things in max.
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2012-01-10 20:15:04 UTC Post #302583
Maybe you should write a tutorial about it (a better, more illustrated one than the one above), I'm curious to know how you did it since I need to make some source models for something down the road. :D

I'm not partial to using blender or kHed for my source porting anyway.
Rimrook RimrookSince 2003
Posted 12 years ago2012-01-10 23:31:27 UTC Post #302586
It is REALLY easy:

Exporting 3DS Max Models to HL2 SMD format
1. Download and install VTF plugin, hl2 SMD exporter and GUIStudioMDL, from here or here, and of course, build your model ;)

2. Make a collision mesh, which is just a simplified version of your model for clipping and lighting, bullet holes and etc.

3. Export your primary model as SMD reference.

4. Export your primary model again as a SMD sequence, named <modelname>ref.smd with the range set to 0 - 1.

5. For the collision mesh, select the whole thing in polygon mode, add a smooth modifier, and set the entire thing to smoothing group "1".

6. Export your collision mesh as reference SMD, <modelname>phys.smd

7. Write your qc file. This is the bare-bones version i used.

8. Make sure all your VTF and VMT exist in the directory you'll be specifying in in the QC file. Make sure your VMTs set to vertexlit generic, and have the correct paths, e.g.:
[quote]"VertexLitGeneric "
{
"$basetexture" "c28_captainterror/rim_win"
}[/quote]
9. Drag and drop your QC file over the guistudiomdl shortcut to compile.

10. Admire your new creation in model viewer, sell to some guy, and then sit back and count all the monies. The End. :P
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2012-01-11 00:28:56 UTC Post #302596
Noticed you don't have a tutorial award yet, you could fix that if you wish.

We have tutorials for various XSI stuff, but with kHed and max around, things are different, and you can never have too much information out there. Someone else with max knowledge might stumble into our site and find it enlightening.

Comparatively we all use different tools and some tools get less attention than others. Even though we don't have an tut for everyone of the tools, we could at least cover the major ones.

And besides I'll be looking forward to following it myself when I get to the point where I can do source stuff again.
Rimrook RimrookSince 2003
Posted 12 years ago2012-01-15 00:02:54 UTC Post #302709
A few notes about exporting from Max...

*If you're making a staticprop you can omit the SMD sequence export (modelnameREF.smd) - you can use your reference mesh as the idle sequence in your .qc file instead. Infact you can always use your reference/base mesh as your idle animation if your model isn't going to have any movement/skeletal animation.

*Guistudiomodel is always broken for me but you can use studiomdl.bat for your mod/game if it has one (or studiomdl in /bin) to compile .qc files (just make a shortcut on your desktop to the .bat file and drag+drop) - if you don't have a .bat file you can make one as long as you append the -game parameter to studiomdl with the path to the game you're making models for

Last, but not least:

THE NAME OF YOUR TEXTURE YOU APPLY IN MAX IS THE NAME OF THE MATERIAL THE MODEL WILL SEARCH FOR!

This means if you apply texture2.tga to your max mesh, the compiled .mdl will look for texture2.vmt in the materials location you specify in your .qc! So make sure to name your materials properly before exporting.

If you did this and your materials were still not working, you can use a tool called MdlTextureInfo (http://www.wunderboy.org/sourceapps.php) to print all of the model's material information for debugging, so you can see exactly why it's broken.

Materials with broken paths or incorrect locations usually show up as white or checkerboard in-game for me while wireframe indicates either a material or shader problem, but can sometimes also indicate a missing asset (this usually happens to me if someone else is hosting and I join their server) - but mdltextureinfo will help you if you ever have models without materials that you can't figure out, for whatever reason :)
RabidMonkey RabidMonkeymapmapmapfapmap
Posted 12 years ago2012-01-15 00:17:19 UTC Post #302711
you don't use vtf plugin for max rabid?
Captain Terror Captain Terrorwhen a man loves a woman
Posted 12 years ago2012-01-15 03:27:39 UTC Post #302717
I usually work on textures as I'm working on a mesh and tend to save in .tga out of photoshop so I don't have to worry about selecting proper VTF options (or running thru vtex if you don't use the photoshop export plugin)

Format doesn't matter as long as the filename is correct so if you work with vtf plugin it works too ;)
RabidMonkey RabidMonkeymapmapmapfapmap
You must be logged in to post a response.