Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Fog problem #1,899,473,291 - _foghull

Page: 1 of 1
 mknote
07-24-2004, 5:14 PM
#1
Okiedokie, so, I gave up my plan for light, yavin_swamp fog for volumetric, yavin_white with the _foghull. I read a tout. on it (forgot the site), and did the steps it told me (make 6 8x8 pixle things with the RGB of the fog), put it into a folder, and did the worldspawn. I am positive it is the .shader file, because I took it out and nothing changed. Anyway, I get a HOM effect, even though this shader was supposed to prevent that. I looked at the 8x8 things, they were named right (yavinwhitefoghul_ft, ..._dn, ..._bk, ..._up, ..._lf, ..._rt). I will now post the .shader I made:

textures/fogs/yavin_white
{
qer_editorimage textures/fogs/fog.tga
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm fog
surfaceparm trans
q3map_nolightmap
fogparms ( 1 1 1 ) 18000.0
}

textures/yavinwhitefoghullfolder/yavinwhitefoghull
{
surfaceparm nolightmap
surfaceparm nonsolid
surfaceparm trans
surfaceparm sky
skyparms textures/yavinwhitefoghullfolder/yavinwhitefoghull 0 -
}

I also added yavinwhitefoghullfolder.shader to the .shader list. It still didn't work. The _farplanedist was first set at 9000, then at 18000, but no difference. _foghull value was yavinwhitefoghullfolder/yavinwhitefoghull

What am I doing wrong?

MK
 mslaf
07-24-2004, 6:22 PM
#2
How big is this map: 36k units? You need the fog for covering invisible geometry. It must “finish” just before the HOM starts. If you see the HOM it means that your fog doesn’t cover it.

In other words, you need something like this:

P--------F--G

P=player
F=fog range limit / “finish” line / beyond this point you will see nothing.
G=geometry in range of _farplanedist. From this point the HOM starts.

and you currently have

P---------F/G
P----G----F

F/G= F and G are at the same position.

Change:

fogparms ( 1 1 1 ) 18000

to

fogparm ( 1 1 1 ) 9000

or something smaller. Alternatively you can change _farplanedist to 40k and see how q3map2 will die trying to compile it.

Real sample:

http://www.mslaf.com/tutorials/fogrange1.jpeg)

The back side of this church that is barely visible is in range of 12000 from the player’s view. The fog range is to 7000 and you still see the shapes.

Tutorials:
http://members.lycos.co.uk/quakeroats/le/tutorials/foghull/foghull.htm)
http://members.lycos.co.uk/quakeroats/le/tutorials/foghull/forum.htm)
http://membres.lycos.fr/oldfellow/)
 mknote
07-24-2004, 7:28 PM
#3
Does the value for _farplanedist need to be a power of 2?

MK

*edit*

Could somebody post a complete _foghull shader script, maybe tinkering with it above stats. The map in question is rectangular, 26592 x 13752 x 2032, although I may make it square 26592 x 26592 x 2032. The player can get to 9728 x 9728 from the center of the map, and 1264 from the ground. The name of the folder in which has my "things" is called yavinwhitefoghullfolder, the shader is yavinwhitefoghullfolder.shader, and the names of the "things" are given above. Sorry if I repeated myself. Thanks.
 wedge2211
07-25-2004, 10:51 AM
#4
No, farplanedist doesn't have to be a power of 2. It just has to be larger than your fog drawdist.

Also, try keeping all your shader files in the shaders directory. I don't think shaders take nicely to being organized. ;)
 mknote
07-25-2004, 12:06 PM
#5
(Doesn't understand what wedge said) I only have one shader file, and it IS in the shader folder... and what do you mean, organized?

Also, no matter how much I tinker with the _farplanedist, I still get the HOM effect. I have set it from as low as 1 to as high as 100000, and not one bit of difference. No, it MUST be the shader itself.

MK
 GothiX
07-25-2004, 1:38 PM
#6
surfaceparm nonsolid in a skyshader? Eh, you'll want to nuke that. Use surfaceparm noimpact instead.
 mslaf
07-25-2004, 3:04 PM
#7
Originally posted by mknote

Also, no matter how much I tinker with the _farplanedist, I still get the HOM effect. I have set it from as low as 1 to as high as 100000, and not one bit of difference. No, it MUST be the shader itself.

MK

Originally posted by mknote
(Doesn't understand what wedge said) I only have one shader file, and it IS in the shader folder... and what do you mean, organized?

Also, no matter how much I tinker with the _farplanedist, I still get the HOM effect. I have set it from as low as 1 to as high as 100000, and not one bit of difference. No, it MUST be the shader itself.

MK

Try to wipe out “surfaceparm trans” in the skyshader.

textures/yavinwhitefoghullfolder/yavinwhitefoghull
{
surfaceparm nolightmap
surfaceparm noimpact // Credit goes to GothiX :))
surfaceparm sky
skyparms textures/yavinwhitefoghullfolder/yavinwhitefoghull 0 -
}

BTW: If you had “nonsolid” and “trans” in the sky shader didn’t you have the “map leaked” message?
 mknote
07-25-2004, 4:39 PM
#8
No, I didn't get leaked... I'll try what GothiX said.

MK

*edit*

Still doesn't work, but I revised my shader somewhat:

In the maps worldspawn - key _foghull value textures/yavinwhitefoghullfolder/yavinwhitefoghull. Key _farplanedist value 18000.

The shader, which is in the shader folder:

textures/fogs/yavin_white
{
qer_editorimage textures/fogs/fog.tga
surfaceparm nonsolid
surfaceparm nonopaque
surfaceparm fog
surfaceparm trans
q3map_nolightmap
fogparms ( 1 1 1 ) 9000.0
}

textures/yavinwhitefoghullfolder/yavinwhitefoghull
{
surfaceparm nolightmap
surfaceparm noimpact
surfaceparm sky
skyparms textures/yavinwhitefoghullfolder/yavinwhitefoghull 0 -
}

Are all of my directories right? And do I need to put something after 0 - and before the }?

MK
 mslaf
07-25-2004, 5:01 PM
#9
Originally posted by mknote
No, I didn't get leaked... I'll try what GothiX said.

MK

GothiX was right about "noimpact" but it won't fix the HOM effect. Removing "trans" will.
 wedge2211
07-25-2004, 6:14 PM
#10
All I meant about "organized" was I don't think shader files like to be in subfolders. Have ALL your shaders directly in the shaders directory.

Oh, hey. Do you have _fog textures/fogs/yavin_white in your worldspawn?
 mslaf
07-25-2004, 6:38 PM
#11
Originally posted by wedge2211
All I meant about "organized" was I don't think shader files like to be in subfolders. Have ALL your shaders directly in the shaders directory.



I think the tutorial states that. He was just following it.
 mknote
07-25-2004, 6:43 PM
#12
Wait, that fixed it... well, not really:mad: No HOM, but the fog EVERYWHERE. I don't want that. How do I fix that problem?

MK
 GothiX
07-26-2004, 6:26 AM
#13
That's how a foghull works.
 mknote
07-26-2004, 1:57 PM
#14
*sigh* Oh well, better then nothing. But now, I just compiled with .light, and I got this. http://server6.uploadit.org/files/mknote-shot0218.jpg)
I have a sun shader, and all of the outer-most walls (the ones touching the void) are textured white, but as you can see, the one above is black. I think you can see the other problem.

MK
 Jedi_Vogel
07-26-2004, 4:33 PM
#15
If you just want an area with fog, just create a fog brush, surely?
 Codja X
07-26-2004, 4:48 PM
#16
Originally posted by Jedi_Vogel
If you just want an area with fog, just create a fog brush, surely?

A _foghull is something completely different - don't get confused:

http://shaderlab.com/q3map2/shader_manual/apC.html)

(Advanced and technical)
 mknote
07-26-2004, 4:51 PM
#17
Actually, I like the new effect (global fog). I just want to get rid of this new problem (see last post). And I need to edit something: I don't have a sun "shader": I have a sun "light". It works properly, and this only appeared after I ran -light with the new global fog.

MK
 Jedi_Vogel
07-26-2004, 5:06 PM
#18
Originally posted by Codja X
A _foghull is something completely different - don't get confused:

I know Codja :) Just that he seemed to be complaining that he had fog everywhere, which is what a foghull does, so I just suggested a method of ... not having fog everywere lol.

Maybe I misunderstood though lol
 Codja X
07-26-2004, 5:28 PM
#19
Mental note: must. read. all. of. thread. before. posting.
 Jedi_Vogel
07-26-2004, 6:21 PM
#20
Originally posted by mknote
No HOM, but the fog EVERYWHERE. I don't want that.

;)
 mknote
07-27-2004, 12:47 AM
#21
I just sent in the BETA for this project:

Please go here. (http://www.pcgamemods.com/6342/)

Please download it and post comments, either here or at pcgamemods.com.

MK
Page: 1 of 1