MAPPING: lightmap on transparent surface

*map* *map* *map*

MAPPING: lightmap on transparent surface

Postby natirips » 11.23.12

Here is an example of how to map lightmap onto a transparent surface (i.e. graffiti, tree branches,...).
Code: Select all
textures/ut_faks2/gr-ntr
{
   surfaceparm nonsolid
   surfaceparm trans
   polygonOffset
   nomipmaps
   nopicmip
   {
      map textures/ut_faks2/gr-ntr.tga
      blendfunc blend
      alphafunc GE128
      depthwrite
      rgbgen identity
   }
   {
      map $lightmap
      rgbgen identity
      blendfunc filter
      depthfunc equal
   }
}

polygonOffset is not needed for tree branches, but is needed for graffiti, cracks, stains, etc.

This example is from ut_faks3 and is used for "NATIRIPS" graffiti.

This is what it can look like in-game (wall is one brush and graffiti is an overlapping brush that causes z-fighting in the editor but polygonOffset fixes z-fighting in-game):
shot0143_.jpg
You do not have the required permissions to view the files attached to this post.
ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
User avatar
natirips
[dswp]R.Stallman
 
Posts: 2946
Joined: 04.13.09
Location: Solar System/≈Zagreb
-----tdm:  
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:  
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60

Who is online

Users browsing this forum: No registered users and 1 guest

Misc