Materials Problem, pink'n'black

Need help Modeling Props and Physical Objects for your Maps.
Post Reply
SgtPotato
Vertex
Vertex
Posts: 5
Joined: Thu Aug 04, 2011 12:26 pm

Materials Problem, pink'n'black

Post 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?
SgtPotato
Vertex
Vertex
Posts: 5
Joined: Thu Aug 04, 2011 12:26 pm

Re: Materials Problem, pink'n'black

Post by SgtPotato »

Nevermind, i got it working!

I just needed to point the texture name in the modelling program (Blender).
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Materials Problem, pink'n'black

Post by MaestraFénix »

:medic:

Those type of errors makes you lose your important time. I hate it.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Re: Materials Problem, pink'n'black

Post 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]
SgtPotato
Vertex
Vertex
Posts: 5
Joined: Thu Aug 04, 2011 12:26 pm

Re: Materials Problem, pink'n'black

Post by SgtPotato »

Alright, thanks :lol:
User avatar
AsG1Alligator
prop_static
prop_static
Posts: 91
Joined: Wed Dec 01, 2010 4:53 pm
Contact:

Re: Materials Problem, pink'n'black

Post 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 :cry:)
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.
John Freeman looked at the ground and found a WEPON! So he picked it up and fired it at zombie goasts... in front of a house.

Image

Steam is so f*&(^g annoying.

http://www.radicalplay.com/madcars/egame.html

http://forums.steampowered.com/forums/s ... st23240389
Image
[thumbnail=center]http://i234.photobucket.com/albums/ee10 ... -dance.gif[/thumbnail]
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Materials Problem, pink'n'black

Post 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:

Image

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).
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
User avatar
AsG1Alligator
prop_static
prop_static
Posts: 91
Joined: Wed Dec 01, 2010 4:53 pm
Contact:

Re: Materials Problem, pink'n'black

Post by AsG1Alligator »

THX MAN! I owe you a big beer :D .

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.
John Freeman looked at the ground and found a WEPON! So he picked it up and fired it at zombie goasts... in front of a house.

Image

Steam is so f*&(^g annoying.

http://www.radicalplay.com/madcars/egame.html

http://forums.steampowered.com/forums/s ... st23240389
Image
[thumbnail=center]http://i234.photobucket.com/albums/ee10 ... -dance.gif[/thumbnail]
Post Reply