WARNING: no patch


(GRouZER) #1

I have made a test room with a path for on terrain, made of pathes; 2 simple patch meshes and 1 cap of a thickened bevel.

When i compile i get the error “WARNING: no patch”.

[i]EDIT: I forgot to group the patches, and gave it the value/key : _lightmapscale 0.125, so i grouped and gave it the key/value and recompiled, and i didn’t get the error, but when i load the map in ET, the patches have the orange grid, and is z-fighting with the floor brush.

  • the paths of the textures are correct, and the texture names also[/i]

I have made a shader for a decal and has a texture with a alpha channel and has a normal image :P.

textures/test_shaders/bootprints
{
    qer_editorimage textures/test_shaders/bla_texture.tga
    q3map_lightmapsamplesize 1x1
    q3map_normalimage textures/test_shaders/bla_bumpmap.tga
    
    polygonOffset
    
    surfaceparm nomarks
    surfaceparm nonsolid
    surfaceparm trans
    
    {
    map textures/test_shaders/bla_texture.tga
    implicitMask -
    }

}

(phobos) #2

It’s probably not parsing the shader correctly with “q3map_lightmapsamplesize 1x1”, change that to just “1”.


(GRouZER) #3

it makes no difference :frowning:


(chavo_one) #4

   { 
    map textures/test_shaders/bla_texture.tga 
    implicitMask - 
    } 

You’re referencing two textures in the same stage.


(GRouZER) #5

i changed it to this but still have the orange grid:

    {
    implicitMask textures/test_shaders/bla_texture.tga
    }

(ydnar) #6

implicitMask is a top-level shader parameter.

Remove the { } around it.

y


(GRouZER) #7

implicitMask is a top-level shader parameter.

Remove the { } around it.

y

Done that but it didn’t fixed the problem, this is how the shader looks now:

textures/test_shaders/bootprints 
{ 
    qer_editorimage textures/test_shaders/bla_texture.tga 
    q3map_lightmapsamplesize 1x1 
    q3map_normalimage textures/test_shaders/bla_bumpmap.tga 
    
    polygonOffset 
    
    surfaceparm nomarks 
    surfaceparm nonsolid 
    surfaceparm trans 

    implicitMask - 
    
    { 
    map textures/test_shaders/bla_texture.tga 
    } 
}

(chavo_one) #8

I think what you really want is this


textures/test_shaders/bootprints 
{ 
    qer_editorimage textures/test_shaders/bla_texture.tga 
    q3map_lightmapsamplesize 1x1 
    q3map_normalimage textures/test_shaders/bla_bumpmap.tga 
    
    polygonOffset 
    
    surfaceparm nomarks 
    surfaceparm nonsolid 
    surfaceparm trans 

    implicitMask textures/test_shaders/bla_texture.tga 
}

(ydnar) #9

This is correct:


textures/test_shaders/bootprints 
{ 
    qer_editorimage textures/test_shaders/bla_texture.tga 
    q3map_lightmapSamplesize 1
    q3map_normalimage textures/test_shaders/bla_bumpmap.tga 
    
    polygonOffset 
    
    surfaceparm nomarks 
    surfaceparm nonsolid 
    surfaceparm trans 

    implicitMask textures/test_shaders/bla_texture.tga 
}

y


(GRouZER) #10

The bumpmap effect works, but the masking isn’t working.


(chavo_one) #11

Make sure bla_texture.tga has an alpha channel that contains the masking you want. You have to save it as a 32bit tga file to get an alpha channel.


(GRouZER) #12

Quote from first post:

I have made a shader for a decal and has a texture with a alpha channel and has a normal image
:wink:


(MindLink) #13

I guess he just wanted to make sure. PS 7.0 for example does NOT write alpha channels to .tga’s correctly unless you install a patch. That was source of a looooong headache. :wink:


(GRouZER) #14

Sorry i didn’t save it as a 24bit file, i just saved it to a 32bit file and now it works. :banana:
There is another thing, when i walk over the decal the shadow of the player “z-fights” with the decal, what params should i add or remove in my shader?

I use paintshop pro 7 btw :).

I’ll show the result soon :cool: .


(ydnar) #15

Decals that write to the Z-buffer will z-fight with shadows and other marks. This is why none of the decals in Enemy Territory do this. They’re all translucent and multiply (and posisbly add) to the framebuffer, but don’t write to the Z buffer.

TBH, using a normalmapped decal for footprints is overkill. Make a simple black texture sized 128x128 or smaller, then paint on the shadow in white that the footprint would cast, IE inverted from what it would end up being.

Alternatively you can start with a white texture, then paint the shadow/outline/footprint onto it, then invert the image.

Then your shader will look something like this:


textures/test_shaders/bootprints
{
	qer_editorimage textures/test_shaders/bla_texture.tga

	polygonOffset

	surfaceparm nolightmap
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans

	{
		map textures/test_shaders/bla_texture.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
	}
}

This is identical to how all the player/foot shadows work. It will fog correctly and never z-fights with any other marks.

y


(ratty redemption) #16

@ydnar, what are the commands you recommend we shouldn`t use which write to the depth buffer?


(ydnar) #17

Opaque, non-blending shaders and shaders with “depthWrite” write to the zbuffer. Avoid those for decals.

y


(ratty redemption) #18

Opaque, non-blending shaders

do you mean decal shaders with blendfunc gl_dst_color gl_zero or literally no blendfunc?

I understand about the depthwrite command, thanx :slight_smile: