Material doesn't render VTF properly Created 8 years ago2015-07-16 22:01:35 UTC by Notewell Notewell

Created 8 years ago2015-07-16 22:01:35 UTC by Notewell Notewell

Posted 8 years ago2015-07-16 22:01:35 UTC Post #326469
I made a model the other day, and realized I had extra UV-space which I didn't want to waste - So, I made another model using the extra. One of these models is a cardboard box, the other is a tin of food. They use separate vmts so I can have different parameters, with the same diffuse and normal map vtfs, but only the box is rendering properly.
The cardboard box vmt is this
[quote]"VertexlitGeneric"
{
"$basetexture" "models/props_jeffmod/orangebox"
"$bumpmap" "models/props_jeffmod/orangebox_n"
"$surfaceprop" "Wood"
}
[/quote]
The tin vmt is this
[quote]"VertexlitGeneric"
{
"$basetexture" "models/props_jeffmod/orangebox"
"$bumpmap" "models/props_jeffmod/orangebox_n"
"$envmap" "env_cubemap"
"$envmaptint" "[0.5 0.5 0.5]"
"$normalmapalphaenvmask" "1"
"$surfaceprop" "Metal"
}
[/quote]

Ingame, the tin appears pitch black with the envmap lines commented out, and entirely specular with them on. The normal map has the mask embedded in it, and is working properly, as you can see it with the specularity on the tin. (It's very subtle on the box, to the point where it's not really noticable)

Anyone have any idea why the basetexture on the second model would render as black rather than the texture, which has already been confirmed to work ingame?
Notewell NotewellGIASFELFEBREHBER
Posted 8 years ago2015-07-17 02:26:36 UTC Post #326470
I don't know much about source textures, but maybe try copy/paste them in csgo or something, to see if it an OB bug? Did you try other shaders for the hell of it?

I'm guessing you ruled out a paths error?
Captain Terror Captain Terrorwhen a man loves a woman
Posted 8 years ago2015-07-17 03:53:23 UTC Post #326471
Strange. The VMTs look right to me.

The only thing I can think of is adding the "$model" "1" command, though it's usually only needed for stuff like the refraction shader.
Strider StriderTuned to a dead channel.
Posted 8 years ago2015-07-17 11:47:28 UTC Post #326472
Disregard, after taking another look today to try out your suggestions I realized it was user error - I updated the normal map, but must not have saved the diffuse texture when I opened it in vtfedit - the background of the texture is black, so with the old version that's all that was present for the areas the tin use.

Needless to say, I feel quite dumb.
Notewell NotewellGIASFELFEBREHBER
Posted 8 years ago2015-07-17 13:08:48 UTC Post #326473
It's a common thing in my line of work, to rack your brains for hours on end, only to come in the following day and solve the issue in a matter of seconds. :P
monster_urby monster_urbyGoldsourcerer
You must be logged in to post a response.