Page 1 of 1

Fog?

Posted: 2017-03-06, 00:35
by arfur9
I've noticed in the cmap files there is fog options, do these actually work?

Re: Fog?

Posted: 2017-03-06, 10:16
by Carsten
No, :sorry:

Re: Fog?

Posted: 2017-03-06, 11:47
by arfur9
ok ta
I'll probably get away with lights, I have a short exterior scene which needs dark areas were the player can't go

Re: Fog?

Posted: 2017-03-06, 12:05
by Carsten
Faking it might be an option, using appropriately made translucent textures that are put on Bezier Patches or brushes with otherwise invisible sides.

Re: Fog?

Posted: 2017-03-06, 12:17
by arfur9
I was going to try that with light rays through a window, like this:
https://www.youtube.com/watch?v=Zafmx3GjNhM

I've used this in rendered images, but usually in the distance

Re: Fog?

Posted: 2017-03-06, 14:23
by arfur9
So far I have:
pic0000.jpg
I can't get a white glow and maintain the transparency

here's the simple texture
rays.png

Re: Fog?

Posted: 2017-03-06, 15:15
by Carsten
What does the material definition / material script look like?

Re: Fog?

Posted: 2017-03-06, 15:46
by arfur9
my wild guess was something long the lines:

Code: Select all

"rays"
{
    diffusemap /Textures/rays/rays.png
 //lumamap  /Textures/rays/rays_inv.png

ambientMask d  
alphaTest .8 
 LightShader   none1234 
  noDynLight 
  noShadows
  blendFunc   zero  one_minus_src_color
  meta_editorSave
}
I came up with that looking at decals, I'm guessing its " blendFunc zero one_minus_src_color" which is probably not right?

Re: Fog?

Posted: 2017-03-06, 18:04
by Carsten
arfur9 wrote:I came up with that looking at decals, I'm guessing its " blendFunc zero one_minus_src_color" which is probably not right?
Yes, I think so.

blendFunc zero one_minus_src_color can work well – if you have the proper texture for it, which must be specially colored (see some of the related decals for examples).

blendFunc src_alpha one_minus_src_alpha is what is normally used for translucent surfaces, see e.g. Games/DeathMatch/Materials/liquids.cmat for examples. I think that this is the one that I'd use or at least consider as the most promising candidate.

blendFunc one one might work with (very dark-grey) fog textures as well. The fog might be glowing a bit. :cheesy:

Re: Fog?

Posted: 2017-03-06, 18:24
by arfur9
Thank you the last one did it (blendFunc one one ) :)

I might need to stop the back faces showing but its getting there :)
This is my "test stuff" level lol

Re: Fog?

Posted: 2017-03-07, 00:18
by Carsten
Good to hear and great to see that! :up: