dswp.de
http://www.dswp.de/old/

MAPPING: lightmap on transparent surface
http://www.dswp.de/old/mapping/mapping-lightmap-on-transparent-surface-t6211.html
Page 1 of 1

Author:  natirips [ 11.23.12 ]
Post subject:  MAPPING: lightmap on transparent surface

Here is an example of how to map lightmap onto a transparent surface (i.e. graffiti, tree branches,...).
Code:
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):
Attachment:
shot0143_.jpg

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/