Results 1 to 2 of 2

Thread: Double Sided Faces Issue

  1. #1

    Default Double Sided Faces Issue

    I've had this problem in the past, but someone posting the issue on MOHAAAA made me interested to find an answer...

    The problem is with *some* two sided brush faces, such as grills and grates not behaving as they should when used in conjunction with nodraw, appearing invisible from one side. Checking the shader files, they have 'cull none' so I can't see a problem there. The textures work fine in the stock mp maps, but strangely recompiling the map breaks them.

    One of the offending shaders is:

    Code:
    textures/general_industrial/deckgrate_set1
    {
    	qer_editorimage textures/general_industrial/deckgrate_set1.tga
    	qer_keyword wall
    	qer_keyword floor
    	qer_keyword masked
    	qer_keyword rusted
    	qer_keyword metal
    	surfaceParm fence
    	surfaceparm metal
    	surfaceParm nomarks
    	surfaceParm grill
    //	surfaceparm alphashadow
    	cull none
    	nopicmip
    	nomipmaps
    	{
    		map textures/general_industrial/deckgrate_set1.tga
    		alphaFunc GE128
    		depthWrite
    	nextbundle
    		map $lightmap
    	}
    }
    This works fine in obj_team2 but when adding it to my own (or recompiling obj_team2) I can't get it to behave properly.

    It seemingly works in Spearhead but not Allied Assault.

    Any ideas? I'm not a texture guy so don't have much knowledge in this area.
    Last edited by 1337Smithy; October 3rd, 2018 at 03:41 AM.

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I think this is your problem.

    Code:
    alphaFunc func
    Determines the alpha test function used when rendering this map. Valid values are GT0, LT128, and GE128. These correspond to "GREATER THAN 0", "LESS THAN 128", and "GREATER THAN OR EQUAL TO 128". This function is used when determining if a pixel should be written to the framebuffer. For example, if GT0 is specified, the only the portions of the texture map with corresponding alpha values greater than zero will be written to the framebuffer. By default alpha testing is disabled. Both alpha testing and normal alpha blending can be used to get textures that have see-through parts. The difference is that alphaFunc is an all-or-nothing test, while blending smoothly blends between opaque and translucent at pixel edges. Alpha test can also be used with depthWrite, allowing other effects to be conditionally layered on top of just the opaque pixels by setting depthFunc to equal.


    source:
    http://q3map2.everyonelookbusy.net/s...manual/ch6.htm

    I'm assuming the texture grate is the image and the background is black? What you can try to do is maybe remove the alpha func and depthwrite or just the alphablend and try adding
    "blendfunc add" in there

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •