Q3map2 blending


(Smilie) #1

hi im trying the blending without alphamaps but it doesnt seem to be working

ok I got the path texture with an alpha channel

textures/POW/pow_grass
{
   qer_editorimage textures/POW/pow_grass.tga
   q3map_lightsampleoffset 16
   q3map_shadeangle 178
   q3map_nonplanar
   q3map_forcemeta
   q3map_tcgen ivector ( 512 0 0 ) ( 0 512 0 )
   surfaceparm grasssteps
   {
      map textures/POW/pow_grass.tga
   }
   {
      map $lightmap
      blendfunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
}

textures/POW/pow_path
{
   qer_editorimage textures/POW/pow_path.tga
   q3map_forcemeta
   q3map_nonplanar
   q3map_shadeAngle 179
   surfaceparm grasssteps
   {
      map textures/POW/pow_path.tga
      blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
      rgbGen vertex
   }
   {
      map $lightmap
      blendFunc GL_DST_COLOR GL_ZERO
      rgbGen identity
   }
}

theres the textures shader

can you help me


(EB) #2

BTW you’ve missed the whole point to it all.

http://www.planetquake.com/simland/pages/articles/terrain1_1.htm


(Smilie) #3

well actually i followed a tut i found not that one

it said make an alpha channel and put a alphafade brush along the vertices you want blended

i used price of peaces blending tut

http://www.priceofpeace.net/forums/index.php?act=ST&f=26&t=2079


(FireFly) #4

you are mising some lines in your second shader…

you also wanto add these lines to both your shaders: surfaceparm landmine so players wil be able to place landmines. And q3map_lightmapmergable that will cast (and someone correct me if i’m wrong) seamless shadows on your terrain…

Here are the correct shaders:

textures/POW/pow_grass
{ 
   qer_editorimage textures/POW/pow_grass.tga  
   q3map_lightmapsampleoffset 16 
   q3map_lightmapmergable 
   q3map_shadeangle 178
   q3map_nonplanar 
   q3map_forcemeta 
   q3map_tcgen ivector ( 512 0 0 ) ( 0 512 0 )
   
   surfaceparm landmine 
   surfaceparm grasssteps 
   { 
      map textures/POW/pow_grass.tga
   } 
   { 
       map $lightmap 
            blendFunc GL_DST_COLOR GL_ZERO
            rgbGen identity 
   } 
}


textures/POW/pow_path
{ 
   qer_editorimage textures/POW/pow_path.tga  
    
   q3map_lightmapsampleoffset 16 
   q3map_lightmapmergable 
   q3map_shadeangle 178
   q3map_nonplanar 
   q3map_forcemeta 
   q3map_tcgen ivector ( 512 0 0 ) ( 0 512 0 )
   surfaceparm landmine 
   surfaceparm grasssteps   
   { 
      map textures/POW/pow_path.tga 
      rgbGen identity 
   } 
   { 
     		 map textures/POW/pow_grass.tga 
     		 blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA             
       	 rgbGen identity 
             alphaGen vertex 
      } 
      { 
             map $lightmap 
            blendFunc GL_DST_COLOR GL_ZERO
            rgbGen identity
      } 
}

I also suggest to have a look at the link EB provided.
ratty redemption also wrote a great tutorial about terrain blending here on the SD forums link=http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8244


(Smilie) #5

ok i tried socks and i got a bit of blend :slight_smile: but his alphafade brushes didnt disappear in game ???


(Smilie) #6

cancel that got it working