Page 1 of 2
Low lying fog shader - help please
Posted: Wed Mar 29, 2006 8:37 am
by Waylander76
I believe the MoH implementation of the Q3 engine doesn't support
the fog surfaceparm so the fog texture doesn't work.
I want to create a low lying fog like the one in the crypt levels of RTCW.
I did try cobbling together a shader from Q3 Arena for fog and got the
texture to show in Radiant.
When the map was compiled the gfx didn't display but the lighting properties did (it was for a nice red hell fog)
as the crates it was next to were bathed in the red light.
I was planning to use the fog gfx from Q3 Arena as I have had partial success with them, i just can't get them to show up in game.
The problem is the shader.
Does anyone know what I need to put in the shader to make it work?
I know I can't use the fog properties and surfaceparms so what would be a good alternative?
I'll post my shader later as I'm at work now.
Any help appreciated.
Posted: Wed Mar 29, 2006 9:34 am
by k47a
Posted: Wed Mar 29, 2006 12:54 pm
by Rookie One.pl
There is no other fog than farplane in MoHAA. You could try layering translucent textures, don't know if the effect's worth the effort.
Posted: Wed Mar 29, 2006 1:14 pm
by Waylander76
Rookie that's what I thought I might have to do as I want a low lying fog effect...not the farplane fog effect.
Posted: Wed Mar 29, 2006 1:16 pm
by PKM
Rookie One.pl wrote:There is no other fog than farplane in MoHAA. You could try layering translucent textures, don't know if the effect's worth the effort.
bingo, i'm not a scripter in anyway shape or form, that's an engineers job but what about re-texturing a water texture ? you could then place a brush at
X height and texture with your new custom fog texture using the surface inspector to change the qualities of the ''fog''.
Posted: Wed Mar 29, 2006 2:41 pm
by Waylander76
I was thinking more along the lines of a smoke/cloud texture...didn't think
of using water and changing the surface properties.
Will give that ago along with the shader method and see what I come up with.
Posted: Wed Mar 29, 2006 3:00 pm
by PKM
if it works, i'm a freakin' genius. if it doesn't, i've had my moment.
Posted: Wed Mar 29, 2006 3:23 pm
by Rookie One.pl
If you change the surface's properties to water, player moving in it will emit water movement sounds, and you probably don't want to do that.
I'd say make an all-grey texture with some low alpha and lay a few layers of it above the ground. Just make sure it's not solid.
clouds
Posted: Wed Mar 29, 2006 6:57 pm
by tltrude
Some of the sky shaders have moving cloud textures. I tried to make ground fog too, but with only limited success. I even made new cloud images, but it still looked dumb. Here is the shader--the fog surfaceparm does not work, but I stuck it in anyway.
Code: Select all
//tomfog
textures/common/fog
{
qer_editorimage textures/common/fog
qer_keyword fog
qer_trans .5
surfaceparm nonsolid
surfaceparm trans
surfaceparm fog
surfaceparm nolightmap
cull none
deformvertexes wave 2 sin 0 1 0 .2
{
map textures/custom/tomclouds.tga
depthwrite
blendfunc add
tcMod scroll 0.03 0.03
nextbundle
map textures/custom/tomzorclouds.tga
tcMod scroll -0.02 -0.02
}
{
map $lightmap
rgbGen identity
blendFunc GL_DST_COLOR GL_ZERO
depthfunc equal
}
}
I think the editorimage is also one I made--just the word "FOG". I applied it using a brush with 5 nodraw sides, and I tried a patch mesh which has one side also.
Posted: Wed Mar 29, 2006 10:30 pm
by Waylander76
Thanks Tom will try your shader later
I've been playing around and this is what i've come up with....
That's using this shader, the textures are from SH and RTCW i think or possibly Q3 Arena, anyhow it's a combination!
Code: Select all
textures/rtcw/fog_grey
{
qer_editorimage textures/rtcw/fog_grey.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm nolightmap
{
map textures/rtcw/kc_fogcloud3_alpha.tga
blendfunc GL_ONE GL_ONE
tcmod scale -.05 -.05
tcmod scroll .01 -.01
rgbgen identity
}
{
map textures/rtcw/dimclouds2-jpw.tga
blendfunc GL_ONE GL_ONE
tcmod scale .05 .05
tcmod scroll .01 -.01
rgbgen identity
}
}
Posted: Wed Mar 29, 2006 10:50 pm
by Waylander76
This is using you shader tom ....
It has the effect I'm looking for but when you enter the fog volume there's no fog.If a player ducks then they will jsut see the walls.
Is there a way to make it appear foggy all through the brush's volume?
Could I use something like the smokegrenade efffect from SH but only
have the smoke billow to a certain height?
I know that uses a sprite and I have no idea how to do it.
Posted: Thu Mar 30, 2006 1:10 am
by ViPER
there is a cool cloudbank in the skylimit sl_alamein map that you fly through and has the effect your looking for - check it out.
Posted: Thu Mar 30, 2006 4:38 am
by lizardkid
whats to stop you scaling up a few respawning smoke puffs scaled to a huge size, placing them halfway under the ground and respawning them after they finish their life cycle (they could last for a minute even), respawning so they overlay so you wont have your fog bank drop drastically every minute or so.
i mean textures are great but they have obvious drawbacks, all of which have been mentioned.
volume
Posted: Thu Mar 30, 2006 5:35 am
by tltrude
I don't think your going to get a brush volume filled with fog. That is what surfaceparm fog does, but it dosen't work in moh. Even water wont do that.
You could try two patch mesh in the same spot and invert the texture on one. Then you could see the fog layer from below as well.
Posted: Thu Mar 30, 2006 6:51 am
by Waylander76
Viper: Will check out that cloud texture and the mod...thanks
lizardkid: I think this may be the way to go so I'll try that next..ty
Tom: Will try the patch mesh idea, but I was wondering seeing as the surfaceparm fog doesn't work in MoH is there a close approximation of a
surfaceparm that does
work?
Thanks again fro the replies guys.