Fog Created 10 years ago2014-02-11 08:10:41 UTC by Jessie Jessie

Created 10 years ago2014-02-11 08:10:41 UTC by Jessie Jessie

Posted 10 years ago2014-02-11 08:10:41 UTC Post #317878
I'm looking to make a fog effect in Goldsource.

-Not really over large areas, quite patchy
-Doesn't have to be pretty, just... foggish
-Cannot use coding
-Must be, if done through brush entities, low in entities

The way I have been doing it (a few func_illusionary brushes w/ transparent glass texture) worked fine, but it doesn't like compiling when there's >500 brush entities, it seems.

Any suggestions?
Jessie JessieTrans Rights <3
Posted 10 years ago2014-02-11 08:15:38 UTC Post #317879
Just tie every other brush to the same entity. You'll have a grand total 2 entities per axis (1 for "even" rows and 1 for "odd" rows) and they'll render just fine as long as they don't touch.

It'll be 4 entities if you make it two different directions (N/S + E/W). 6 if you need it to render vertically when looking up too.

You can also have more entities if you want to divide it into different areas.
Posted 10 years ago2014-02-11 08:19:51 UTC Post #317881
This sounds like what I'm after. You mean sort of have the brushes tied to entity in a checker'd fashion?

I know I tried tying everything to the same entity before and that didn't look right. Is it because they were touching?
Jessie JessieTrans Rights <3
Posted 10 years ago2014-02-11 08:23:58 UTC Post #317882
it may also be possible with a wide array of env_sprites
Posted 10 years ago2014-02-11 08:58:02 UTC Post #317883
Thankies, Stu, that worked.

I might try a few different methods, sprite-based may work better. For the moment though, this is fine.
Jessie JessieTrans Rights <3
Posted 10 years ago2014-02-11 09:40:10 UTC Post #317885
Why don't you use env_fog?
Stojke StojkeUnreal
Posted 10 years ago2014-02-11 10:26:35 UTC Post #317887
env_fog in goldsrc? ;o

i wonder if u go underwater in HL1 u will see a fog in far distances...
Posted 10 years ago2014-02-11 11:00:58 UTC Post #317888
From HEX805

@PointClass base(Targetname) iconsprite("sprites/CS/envfog.spr") = env_fog : "Global Fog Properties"
[
// No longer used
// fadein(integer) : "Fade in time" : 0
// holdtime(string) : "Hold time (0 = permanent)" : "0"
// fadeout(integer) : "Fade out time" : 0
// startdist(integer) : "Fog start position" : 0
// enddist(integer) : "Fog end position" : 1000
density(string) : "Fog density (0.01 > value > 0)" : "0.001"
rendercolor(color255) : "Fog Color (R G B)" : "255 255 255"
spawnflags(flags) =
[
	1 : "Start active"   : 0
]
]
Stojke StojkeUnreal
Posted 10 years ago2014-02-11 16:54:12 UTC Post #317891
I was wondering why not use env_fog or are there better methods to do it ?
Posted 10 years ago2014-02-11 18:31:58 UTC Post #317893
Because env_fog is for Source, and there is no equivalent in Goldsource.
Posted 10 years ago2014-02-11 18:38:53 UTC Post #317895
User posted image
Archie ArchieGoodbye Moonmen
Posted 10 years ago2014-02-11 20:44:40 UTC Post #317899
DiscoFail :D
Stojke StojkeUnreal
Posted 10 years ago2014-02-11 23:32:02 UTC Post #317902
In Goldsource mods, yes. In standard Half-Life, no. :)
Posted 10 years ago2014-02-12 00:11:39 UTC Post #317903
So how does archie have it if its not standard half life?
Is that a special FGD?
Tetsu0 Tetsu0Positive Chaos
Posted 10 years ago2014-02-12 00:16:37 UTC Post #317904
Must've come with VHLT or Spirit, then. My bad, although both should really be considered 'standard half-life' at this stage.
Archie ArchieGoodbye Moonmen
Posted 10 years ago2014-02-12 00:44:48 UTC Post #317905
Posted 10 years ago2014-02-12 01:45:00 UTC Post #317906
I have to assume The Core is not vanilla HL.
That explains it. Because this uses fog how DiscoStu explained it. I.E. No env_fog; just additive brushes.
Tetsu0 Tetsu0Positive Chaos
Posted 10 years ago2014-02-12 07:07:58 UTC Post #317912
Counter Strike 2004 has env_fog, I used it, Skals used it. I posted FGD content on how does it work a few posts back.
Here are screen shots of the exact same entity from updated CS:
User posted image
User posted image
User posted image
Note - I set the values high on purpose.

This works only under OpenGL rendering mode.
It should be possible in Half Life as well since it uses a simple sprite to achieve the effect.
Stojke StojkeUnreal
Posted 10 years ago2014-02-12 11:21:51 UTC Post #317915
I'm keeping this as vanilla as possible.
Jessie JessieTrans Rights <3
Posted 10 years ago2014-02-12 11:33:06 UTC Post #317916
Vanilla?
Stojke StojkeUnreal
Posted 10 years ago2014-02-12 11:55:48 UTC Post #317917
a simple sprite? I doubt that. I think it uses z-buffer depth map or something (that was left present unused in quake code, might be wrong...) the same one used for water fog
Posted 10 years ago2014-02-12 12:29:30 UTC Post #317919
Here is some more on fog:

http://am.half-lifecreations.com/forums/index.php?topic=399.0;wap2

Seem that some one before tried to post a tutorial here but failed.
Stojke StojkeUnreal
Posted 10 years ago2014-02-12 13:43:09 UTC Post #317920
Notice how CS fog doesn't affect the skybox while SOHL or Sven-Coop fog does.
Posted 10 years ago2014-02-17 06:13:12 UTC Post #317983
I've always made fog by using env_sprites.
I just use the generic glowy sprite that is used for env_sprite by default upon placing one into the map, and I set its colors to be very grey-ish and match its surroundings.
Unfortunately it can be a pain in the arse working in a map with a bunch of massive sprites in the way. But some maps that I've made looked fantastic with sprites as fog, like rooms on fire filled with smoke.
Posted 10 years ago2014-02-17 07:15:38 UTC Post #317985
Post some examples to help others.
Stojke StojkeUnreal
Posted 10 years ago2014-02-17 11:48:15 UTC Post #317988
I don't have examples such as maps or images to post, but I can say this:
If you're using env_sprites as fog, then make them an additive and keep their render amount low, like 20 or 30. Also keep their color dark/grey-ish and make it blend in with the surrounding area. Also make the sprite very large (scale 8 or lower would work) and place more sprites in one area to make the fog dense, and less as the fog dissapears. But don't overdo it. I've had too many of them crash a map beyond repair.
You must be logged in to post a response.