Page 1 of 1
Materials Problem, pink'n'black
Posted: Sun Aug 14, 2011 4:27 pm
by SgtPotato
Hello, i have encountered an novice problem in modelling.
I have started to model to source, but when i compile, it has pink and black texture, and model viewer says :
***ERROR*** Model attempted to load one or more VMTs it can't find.
QC :
Code: Select all
$cd "C:\Users\****\Desktop\sodacan"
$modelname "props_potato\potato_sodacan.mdl"
$model "Body" "sodacan_ref.smd"
$cdmaterials "models/props_potato/"
$surfaceprop "metal"
$sequence idle "sodacan_idle" fps 30.00
(And yes, there is stars at the start because theres some personal info, dont mind about that!)
Materials ARE in models/props_potato/, there's VMT, VTF, and bumpmap
VMT :
Code: Select all
"LightmappedGeneric"
{
"$basetexture" "Program Files (x86)/Steam/steamapps/****/half-life 2/hl2/models/props_potato/sodacan"
"$bumpmap" "Program Files (x86)/Steam/steamapps/****/half-life 2/hl2/models/props_potato/sodacan_normal"
"$surfaceprop" "Metal"
"$model" 1
}
So, what i am doing wrong?
Re: Materials Problem, pink'n'black
Posted: Sun Aug 14, 2011 5:33 pm
by SgtPotato
Nevermind, i got it working!
I just needed to point the texture name in the modelling program (Blender).
Re: Materials Problem, pink'n'black
Posted: Sun Aug 14, 2011 8:21 pm
by MaestraFénix
Those type of errors makes you lose your important time. I hate it.
Re: Materials Problem, pink'n'black
Posted: Mon Aug 15, 2011 2:30 am
by Gary
SgtPotato wrote:
VMT :
Code: Select all
"LightmappedGeneric"
{
"$basetexture" "Program Files (x86)/Steam/steamapps/****/half-life 2/hl2/models/props_potato/sodacan"
"$bumpmap" "Program Files (x86)/Steam/steamapps/****/half-life 2/hl2/models/props_potato/sodacan_normal"
"$surfaceprop" "Metal"
"$model" 1
}
You know that means it won't work on anyone else's computer right? Those directories should be relative to the game, not your computer.
Also, the LightmappedGeneric shader is for brushes, not models. You want VertexLitGeneric.
Like This:
Code: Select all
"VertexLitGeneric"
{
"$basetexture" "models/props_potato/sodacan"
"$bumpmap" "models/props_potato/sodacan_normal"
"$surfaceprop" "Metal"
"$model" 1
}
[/quote]
Re: Materials Problem, pink'n'black
Posted: Thu Aug 18, 2011 6:05 am
by SgtPotato
Alright, thanks
Re: Materials Problem, pink'n'black
Posted: Wed Aug 24, 2011 2:58 pm
by AsG1Alligator
Well I won't start the next topic because my problem fits right into this one...
My problem is that after compiling the model textures do not appear on the model (I get pink & black
)
Thats the second model i have this problem with. (to be precise: one model is completly made by me and another was a port from UT2004) Any ideas?
qc of the ported model:
Code: Select all
$cd "D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog"
$modelname "Bulldog_jeep.mdl"
$model "studio" "reference.smd"
$cdmaterials "models\bulldog\"
$hboxset "default"
$surfaceprop "metal_seafloorcar"
$keyvalues { prop_data { "base" "metal.Small" } }
$sequence idle "ragdoll.smd" fps 1.00
$collisionmodel "phymodel.smd" {
$concave
$mass 0.2
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
Compile log:
Code: Select all
GUIStudioMDL 2.2/Source - © 2007 Neil 'Jed' Jedrzejewski - http://www.wunderboy.org/
Loaded QC file - "D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog\bulldog.qc"
Created command line: "C:\Program Files\Steam\steamapps\michalm9\sourcesdk\bin\orangebox\bin\studiomdl.exe" -game "c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2" -nop4 -nox360 "D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog\bulldog.qc"
qdir: "d:\documents and settings\d\my documents\3dsmax\export\bulldog\"
gamedir: "c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\"
g_path: "D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog\bulldog.qc"
Building binary model files...
Working on "bulldog.qc"
SMD MODEL D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog/reference.smd
SMD MODEL D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog/ragdoll.smd
SMD MODEL D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog/phymodel.smd
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Model has 2-dimensional geometry (less than 0.500 inches thick on any axis)!!!
WARNING: Error with convex elements of D:\Documents and Settings\d\My Documents\3dsMax\export\bulldog/phymodel.smd, building single convex!!!!
Model has 11 convex sub-parts
Collision model completed.
---------------------
writing c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\models/Bulldog_jeep.mdl:
bones 896 bytes (1)
animations 136 bytes (1 anims) (2 frames) [0:02]
sequences 220 bytes (1 seq)
ik/pose 164 bytes
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
textures 72 bytes
keyvalues 56 bytes
bone transforms 0 bytes
Collision model volume 40288296.00 in^3
collision 0 bytes
total 1732
---------------------
writing c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\models/Bulldog_jeep.vvd:
vertices 196752 bytes (4099 vertices)
tangents 65584 bytes (4099 vertices)
total 262400 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\models/Bulldog_jeep.sw.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 36891 bytes
indices: 10890 bytes
bone changes: 8 bytes
everything: 47914 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\models/Bulldog_jeep.dx80.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 36891 bytes
indices: 10584 bytes
bone changes: 16 bytes
everything: 47616 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\michalm9\half-life 2 episode two\ep2\models/Bulldog_jeep.dx90.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 9 bytes
strip groups: 25 bytes
strips: 27 bytes
verts: 36891 bytes
indices: 10584 bytes
bone changes: 16 bytes
everything: 47616 bytes
Completed "bulldog.qc"
Ignore the 2D geometry errors... Model is fine... Materials are the problem.
Re: Materials Problem, pink'n'black
Posted: Mon Sep 12, 2011 5:33 pm
by MaestraFénix
Interesting that you couldnt see the textures. I directly couldnt see the model (unless you sent me an old version of your max file).
Those were the problems:
Your texture was in .tga format. You must use .vtf to use it in Source (use VTFEdit).
Your model need at least 1 bone, in order to can be used (at least as a static/dynamic prop).
You assignated the texture in the model as a specular and ambient. You have to put it as a diffuse.
I redone the phymodel, resized the model (in comparation with a female rebel, the jeep was fraking BIG), tweaked a bit the qc file (put always the materials and models in their folder, not outside) and made bumpmapping a little:
Here is your precious model (it includes the core files :3 ):
http://www.mediafire.com/?ff3fpf0d1c4j4ty
About your rifle, i´ll try to look it (today i did this because i was bored).
Re: Materials Problem, pink'n'black
Posted: Tue Sep 13, 2011 4:02 pm
by AsG1Alligator
THX MAN! I owe you a big beer
.
So the problem was the diffuse thing? Ill try to remember that. *goes to compile the model*
PS: I know that textures have to be in vtf+vmt I just was too lazy to look for them.