Low lying fog shader - help please

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Low lying fog shader - help please

Post 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.
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post 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.
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post 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''.
i'm not f****** angry, i'm from philadelphia .
Image
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post 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.
PKM
General
Posts: 1888
Joined: Tue Aug 09, 2005 4:43 pm
Location: Philadelpia but stuck in San Antonio TX (hell)

Post by PKM »

if it works, i'm a freakin' genius. if it doesn't, i've had my moment.
i'm not f****** angry, i'm from philadelphia .
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

clouds

Post 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.
Tom Trude,

Image
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post by Waylander76 »

Thanks Tom will try your shader later :)

I've been playing around and this is what i've come up with....

Image

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
	}
}

Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post by Waylander76 »

This is using you shader tom ....

Image

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.
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

volume

Post 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.
Tom Trude,

Image
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post 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.
Post Reply