Page 1 of 1
Custom textures not loading in radiant
Posted: Sat Aug 02, 2003 3:37 pm
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?
Re: Custom textures not loading in radiant
Posted: Sat Aug 02, 2003 5:15 pm
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'
Posted: Sat Aug 02, 2003 6:47 pm
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.
Posted: Sat Aug 02, 2003 7:15 pm
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 .
Posted: Sat Aug 02, 2003 8:36 pm
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.
Posted: Sat Aug 02, 2003 8:55 pm
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
Posted: Sat Aug 02, 2003 9:17 pm
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.
Posted: Sat Aug 02, 2003 9:31 pm
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.