Custom Textures not Showing Up in Game

Post your skinning / modelling questions or answers here

Moderator: Moderators

Post Reply
ozmium
Private
Posts: 9
Joined: Wed Feb 27, 2008 6:19 pm

Custom Textures not Showing Up in Game

Post by ozmium »

I followed nemeses' tut on custom textures, and it seemed as if i were doing everything right until i compiled and tested. The textures are showing in mohradiant, but not in game. Everything i have a custom texture on is showing up as black/white alternating colors.

Here is an example of a one of my shader files (taken from Nemes' tut on custom textures and i changed what needed to be changed)

Code: Select all

textures/casino/drums
{
qer_keyword metal
qer_keyword metal
surfaceparm metal
{
map textures/casino/drums.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR
GL_ZERO
depthFunc equal
}
}
ozmium
Private
Posts: 9
Joined: Wed Feb 27, 2008 6:19 pm

Post by ozmium »

Here's some more information that i found out:

The shader file must be working in game to a point, because the sounds when i shoot the textures and the fx of wood, glass, metal splints coming off the textures work when i shoot it all work, just the textures dont show up is all. Also, no errors are coming up in console.
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

try this one instead...
textures/casino/drums.tga
{
qer_keyword metal
surfaceparm metal


{
map textures/casino/drums.tga
depthWrite
rgbGen identity

}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
i'm not f****** angry, i'm from philadelphia .
Image
ozmium
Private
Posts: 9
Joined: Wed Feb 27, 2008 6:19 pm

Post by ozmium »

That worked... kinda. lol. Now it's showing up in the game but not in mohradiant, and the sounds are not correct when walking on the textures, shooting them etc. Instead of being what i put in for qer_keyword, they all sound like rock. Perhaps i need the addition qer_keyword like in my original shader?

the only differences between our shaders are that you put .tga at the end of textures/casino/drums (the first one), and you only had one qer_keyword where as mine had two.

I'm going to try adding back in the second qer_keyword, while leaving the .tga and see if that does anything. I'll let you know
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

the additional keyword , or any keyword is for radiant texture searches . there is something wrong on your end or something you missed if you're hearing a rock (stone/plaster) sound when the surface parm i listed was for metal .
i'm not f****** angry, i'm from philadelphia .
Image
ozmium
Private
Posts: 9
Joined: Wed Feb 27, 2008 6:19 pm

Post by ozmium »

Alright, figured it out. You do need both qer_keyword in order for the fx and sounds to work... not sure why, but it worked. And it doesnt seem that having the .tga at the end of the path matters. The problem was probably my shader file organization at the bottom. Thanks for you help. For anyone who needs help with the texture, here is an example of one of my final .shader files

Code: Select all

textures/casino/drums
{ 
qer_keyword metal
qer_keyword metal
surfaceparm metal


{ 
map textures/casino/drums.tga 
depthWrite 
rgbGen identity 

} 
{ 
map $lightmap 
rgbGen identity 
blendFunc GL_DST_COLOR GL_ZERO 
depthFunc equal 
} 
}
notice that in my original .shader file GL-ZERO was placed on a separate line. That must have been it, because everything else was the same in the original.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Why do you have qer_keyword metal twice ? also you can add qer_editorimage as well and set it to another smaller image that will look better in radiant .
Image
ozmium
Private
Posts: 9
Joined: Wed Feb 27, 2008 6:19 pm

Post by ozmium »

i honestly dont know why i had to put qer_keyword twice... but without it the sounds did not work. Like i previously stated, i took the script from nemeses' tut for custom textures and he had it twice, when PKM sent me his it fixed the problem in that the textures showed up in game, but then it wouldnt show up in mohradiant, also the sounds wouldnt work. I added back in the second qer_keyword and the sounds and fx were fixed.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

No, you need only one qer_keyword metal :) . Placing more doesn't harm, but does nothing useful either.

Shader commands cannot be continued across lines, so having GL_ZERO on a next line is definitely an error.

Note that your shader is overly complicated, the following will do the job too:

Code: Select all

textures/casino/drums
{
  qer_keyword metal
  surfaceparm metal
  {
    map textures/casino/drums.tga
  }
  {
    map $lightmap
    blendFunc filter
  }
}
Or even:

Code: Select all

textures/casino/drums
{
  qer_keyword metal
  surfaceparm metal
  {
    map textures/casino/drums.tga
  nextbundle
    map $lightmap
  }
}
Image
Post Reply