I’m having some trouble with custom textures and making them blend. I read the tutorial at simland to get started with shading, and it was pretty helpful but I still had some issues with shading. I’m using GTKRadiant for JKA. What i’m trying to do now is take some textures from the base JKA files and blend them. Do i need to add another channel to these textures… like an alpha channel? If so… how do I do that. I loaded the textuers into photoshop… copy and add an alpha channel with the same texture greyscaled and brightened up. When I go to save it, the alpha channel disappears though…
here is the coding i’m using for my shader.
textures/blending2/blend_grassTdirt
{
qer_editorimage textures/blending2/blend_grassTdirt.tga
q3map_nonplanar
q3map_shadeangle 120
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
{
map textures/blending2/blend_grass1.tga //Primary texture
rgbGen identity
}
{
map textures/blending2/blend_dirt1.tga //Secondary texture
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
textures/blending2/blend_grassTrock
{
qer_editorimage textures/blending2/blend_grassTrock.tga
q3map_nonplanar
q3map_shadeangle 120
q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
q3map_alphaMod dotproduct2 ( 0.0 0.0 0.75 )
{
map textures/blending2/blend_grass1.tga //Primary texture
rgbGen identity
}
{
map textures/blending2/blend_rock1.tga //Secondary texture
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
alphaFunc GE128
rgbGen identity
alphaGen vertex
}
{
map $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbGen identity
}
}
textures/blending2/alpha_000 // Primary texture ONLY
{
q3map_alphaMod volume
q3map_alphaMod set 0
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/blending2/alpha_025
{
q3map_alphaMod volume
q3map_alphaMod set 0.25
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/blending2/alpha_050 // Perfect mix of both Primary + Secondary
{
q3map_alphaMod volume
q3map_alphaMod set 0.50
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/blending2/alpha_075
{
q3map_alphaMod volume
q3map_alphaMod set 0.75
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/blending2/alpha_085
{
q3map_alphaMod volume
q3map_alphaMod set 0.85
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
textures/blending2/alpha_100 // Secondary texture ONLY
{
q3map_alphaMod volume
q3map_alphaMod set 1.0
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
qer_trans 0.75
}
When I compile and go ingame the textures are not even showing up… just the massive black/white boxes.
Also… if anyone knows of an easy tutorial besides simland for shading, please point me to it. Thanks.
