Custom texture problem


(houdao920) #1

Hi! guys,I am a newbie of RTCW ET mapping and I got this problem
my custom texture : grass1.jpg
was put in the folder extures\pathaa
and its script name is pathaa.shader in script\ and have added in the shaderlist
an in this shader file i wrote:

textures/pathaa/grass1
{
qer_editorimage textures/pathaa/grass1.jpg
q3map_nonplanar
q3map_shadeangle 120
surfaceparm grasssteps
implicitMap textures/pathaa/grass1.jpg
}

but after i compile my map, i still got a black-yellow-block texture, is that the problem of the form of the shader?? or my texture is not in the right form?

Can some one please give me a hand

I have searched the forum but I cant find one and the tutorial I got is for quake war not ET


(Qualmi) #2

if you walk above it, do you hear grasssounds ? if yes, then your shader works.

for the black-yellow-thingie. open up the console. normally it should tell you somewhere that your picture is not scaled by the power of 2, means you have to do it like 64X64, 128X64, 128X128, 128X256, 256X128 i think you get it. that should have been it.


(Wezelkrozum) #3

The problem is you’ve defined the image as a jpg. And the shader does only use the .tga extension to find images. However, if there isn’t a tga in that folder it automaticly search for a jpg image.
So: change .jpg to .tga and every should work out fine.


(houdao920) #4

[QUOTE=Qualmi;199470]if you walk above it, do you hear grasssounds ? if yes, then your shader works.

for the black-yellow-thingie. open up the console. normally it should tell you somewhere that your picture is not scaled by the power of 2, means you have to do it like 64X64, 128X64, 128X128, 128X256, 256X128 i think you get it. that should have been it.[/QUOTE]

Yes,there’s grass sound and when shot on it there is dust splashing.
and
Yehooow~I made the resolution to 512*512 and it really worked!!!
That’s of great help!! Many thanks!!
and about the console thing, actually i didnt get any message about that, but hey anyway it worked!! :stuck_out_tongue:


(houdao920) #5

[QUOTE=wezelkrozum;199471]The problem is you’ve defined the image as a jpg. And the shader does only use the .tga extension to find images. However, if there isn’t a tga in that folder it automaticly search for a jpg image.
So: change .jpg to .tga and every should work out fine.[/QUOTE]

I unzip some pk3 and found they use jpg.s so I thought it’s OK though
I only have jpg. s in my folder so I guess the engine just accept them
Thanks all the same:)


(murka) #6

Word of advice: Always use .jpg unless the texture needs an alpha channel(in that case, 32bit tga).