visible despite fog?


(Zer0Cool) #1

Is it possible to write a shader which is visible despite fog? I am using this two shaders for my fog:

textures/sfx/xblackfog
{
	qer_editorimage textures/sfx/blackness.tga
	qer_nocarve
	surfaceparm	trans
	surfaceparm	nonsolid
	surfaceparm	fog
	surfaceparm	nolightmap
	fogparms ( 0 0 0 ) 512

}
textures/sfx/blackness
{	
	surfaceparm nolightmap
	surfaceparm noimpact
	surfaceparm nomarks
	{
		map textures/sfx/blackness.tga
	}
}

It should work like a lighthouse that shows you the way through the fog.


(-SSF-Sage) #2

q3map_noFog


(Zer0Cool) #3

Thank you, it seems to work.
EDIT: For brushes the shader works fine. but when i add the shader to models the “q3map_noFog” doesnt work anymore. Can sbdy tell me why?


(Zer0Cool) #4

nobody knows why it behaves different for models? :o


(kamikazee) #5

Did you alter the shader without recompiling the map? If it worked for brushes without recompiling, I’d think it should work for models too. Otherwhise, it could still be that Q3Map needs to compile the shader option into the BSP, hence it won’t work for models.

On the other hand, tried it with a script_mover with a “model2” key?


(Zer0Cool) #6

:X believe me i tested a lot of things, and i compiled almost every time afer i changed smth (altough it should work without compiling anyway)

On the other hand, tried it with a script_mover with a “model2” key?

Nope, doesnt work.

Edit: thats the shader i use:

textures/mytexture
{

      qer_editorimage textures/mytexture.tga	
      q3map_noFog


	{

		map textures/mytexture.tga
         	rgbGen identity
	}
}

got it working for misc_models, seems like have forgotten to compile once :frowning:
BUT i want it to work for the player skins (eyes), what still doesnt work!


(Zer0Cool) #7

Well, it seems like i wont get any answer anymore. I have a further question:
Is it possible to set the fog off with a command in the console? like for example the r_gamma command which can be very usefull in dark maps…


(-SSF-Sage) #8

It is possible to set it of with a cmd, I don’t remember the exact commad tho. It’s a server side setting, which turns off the fog, but not fog clipping. So incase the map has fog clipping, it will show hom effect, unless you turn of totally the fog, which requires recompiling the map I think.


(kamikazee) #9

Google for r_wolffog, there’s some info about it on the ETPro forums.


(FireFly) #10

[QUOTE=Zer0Cool;183260]:
BUT i want it to work for the player skins (eyes), what still doesnt work![/QUOTE]

Remapshader might work for the player skins, I personally haven’t tested this, but Gerbril used his own shaders for the mineflags in his helmsdeep map: He used remapshader in his script to change the shader / texture of the mineflags: same could work for the player skins… Note that there’s an engine limit of 16 for the remapshader command :slight_smile:


(ailmanki) #11

[QUOTE=Ragnar_40k;178157]Afaik W:ET has an overall limit of 128 remapshaders.

I don’t know if there is a limit for the combined length of all remapshader commands (for sending it over the net), but you could partly avoid this by using short shader q-paths.[/QUOTE]

I hope Ragnar_40k is correct, I started now writing the mapskins… I noticed not such a limit… rather the limit of q-paths… which does need now to make lots of shaders newly …

You can find a working example on my webpage (in signature) for resurrection. There I replace the eyes, I guess all you need todo is to add you shadercmds…


(FireFly) #12

Sorry for the confusion but Ragnar is right and I was wrong: A maximum of 128 shaders can be remapped and not the 16 I mentioned before…sorry about this :slight_smile:


(Zer0Cool) #13

@Firefly

thats my problem:

For brushes the shader works fine. but when i add the shader to models the “q3map_noFog” doesnt work anymore

It seems like r_wolffog is clientsided command… so my project is senseless :frowning:


(merlin1991) #14

try

textures/mytexture
{
    qer_editorimage textures/mytexture.tga
    {
        fog off
        map textures/mytexture.tga
        rgbGen identity
    }
}

because nearly all shaderwords above the stages gt compiled into the bsp into the mesh especially shaderwords that start with “q3map_” (wich stands for q3map/q3map2)


(Zer0Cool) #15

@merlin1991

No, it doesnt work.


(Wezelkrozum) #16

just a question…
Is it possible ot give fog a texture in stead of a color?

PS: Because the fog displayed on the textures seems to me a color what is blended over the texture, and the distance between the camera and the texture results in a transparant value. I could have it wrong, but thats what i think…