Custom textures not loading in radiant

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Custom textures not loading in radiant

Post by matt_moh »

I made a custom texture but every time I try to load it in radiant, it crashes. The texture is a .jpg located in textures/gustav_gun. The shader is located in scripts/ and called gustav_gun.shader

Here is what is in the shader:

textures/gustav_gun/dora_blueprints1
{
surfaceParm nonsolid

qer_keyword gustav_gun

{
map textures/gustav_gun/dora_blueprints1.tga

nextbundle
map $lightmap
}
}

Anyone know what is wrong?
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Re: Custom textures not loading in radiant

Post by Bjarne BZR »

matt_moh wrote:map textures/gustav_gun/dora_blueprints1.tga
Shouldent it be 'map textures/gustav_gun/dora_blueprints1.jpg' ?

And put 'qer_editorimage textures/gustav_gun/dora_blueprints1.jpg' above the 'qer_keyword' entry.

And replace 'qer_keyword gustav_gun' with 'qer_keyword metal'
Admin .MAP Forums
Image
Head above heels.
[AoHx]Omnicient
Corporal
Posts: 44
Joined: Sat Jul 26, 2003 1:44 am

Post by [AoHx]Omnicient »

its much easier - and looks better - if u save ur image as a tga. tgas are the original pics and they'll blend in much better. if u have photoshop u can just do File: Save As and save it as a tga. they have converters for pics too if u need.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I think the shaders must use .tga even if it is a .jpg . The game looks for a .tga first but will load a .jpg if a .tga is not found .
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Post by matt_moh »

Thanks for trying to help, but for some reason it still isn't working.

Here is the new script:


textures/gustav_gun/dora_blueprints1
{
surfaceParm metal
qer_editorimage textures/gustav_gun/dora_blueprints1.tga
qer_keyword metal

{
map textures/gustav_gun/dora_blueprints.tga

nextbundle
map $lightmap
}
}

I changed the 'qer_keyword' to metal and now even though radiant doesn't crash anymore, the texture still fails to load.

I do remember reading on this website that even though your texture may be a .jpg, it still needs to be called a .tga in the shader.

Also, I would like to be able to make all my textures .tga files but photoshop doesn't convert them into the right type of tga files. The .tga file will load in radiant, but when I compile my map and open it up in spearhead, the server shuts down and I get this error message in the console:

ERROR: Load TGA: Only type 2 (RGB), 3 (gray), and 10 (RGB) TGA images supported.

If anyone can show me a working .tga converter or can show me how to make my .jpg work I would realy appreciate it.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

most if not all of the shaders I have seen have some kind of blend func
textures/algiers/gasvent_1
{
qer_keyword trim
qer_keyword metal
surfaceparm metal
{
map textures/algiers/gasvent_1.tga
depthWrite
rgbGen identity
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthFunc equal
}
}
maybe use this one as a template and add the blendfunc to your shader
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Post by matt_moh »

I don't get it ! the texture still doesn't load. bdbodger, I used what you posted as a template but the texture still fails to load in radiant. I'm going to go back to photoshop and see what happens when I convert it to a .tga.
matt_moh
Sergeant
Posts: 65
Joined: Sat Feb 08, 2003 12:04 am

Post by matt_moh »

Woohooooo! It works! I coverted the .jpg to a .tga file and it loaded fine in both radiant and spearhead. I don't know why my other .tga didn't work in MOH but I will figure that out soon. Thanks for the hep guys, but If anyone happens to find out how to make a .jpg work than post it.
Post Reply