Fog?

General discussion of current events, conversations with other board members, etc.
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Fog?

Postby arfur9 » 2017-03-06, 00:35

I've noticed in the cmap files there is fog options, do these actually work?
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Fog?

Postby Carsten » 2017-03-06, 10:16

No, :sorry:
Best regards,
Carsten
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: Fog?

Postby arfur9 » 2017-03-06, 11:47

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
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Fog?

Postby Carsten » 2017-03-06, 12:05

Faking it might be an option, using appropriately made translucent textures that are put on Bezier Patches or brushes with otherwise invisible sides.
Best regards,
Carsten
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: Fog?

Postby arfur9 » 2017-03-06, 12:17

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
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: Fog?

Postby arfur9 » 2017-03-06, 14:23

So far I have:
pic0000.jpg


I can't get a white glow and maintain the transparency

here's the simple texture
rays.png
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Fog?

Postby Carsten » 2017-03-06, 15:15

What does the material definition / material script look like?
Best regards,
Carsten
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: Fog?

Postby arfur9 » 2017-03-06, 15:46

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?
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Fog?

Postby Carsten » 2017-03-06, 18:04

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:
Best regards,
Carsten
User avatar
arfur9
Posts: 69
Joined: 2017-02-25, 18:57
Location: uk
Contact:

Re: Fog?

Postby arfur9 » 2017-03-06, 18:24

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
Attachments
pic0001.jpg
User avatar
Carsten
Site Admin
Posts: 2130
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Fog?

Postby Carsten » 2017-03-07, 00:18

Good to hear and great to see that! :up:
Best regards,
Carsten

Return to “General and Miscellaneous”

Who is online

Users browsing this forum: No registered users and 1 guest