Fog in WinQuake
Moderator: InsideQC Admins
29 posts
• Page 2 of 2 • 1, 2
Quake's lack of color variance makes any palette changes or attempts to fit it into 8/16-bit generic color palettes suffer too much. Maybe the fog might look better if your fog colormaps tried fitting to a Quake palette color ramp per distance instead of a straight up blend or something like that.
I've never really felt that fog was a good thing to have on standard Quake maps but people seem to want that feature.
I've never really felt that fog was a good thing to have on standard Quake maps but people seem to want that feature.
- TimeServ
- Posts: 38
- Joined: Wed Jun 08, 2005 4:02 pm
You could do cheap and cheesy (but fast) fog by blending miplevels 1, 2 and 3 of textures with your chosen fog colour. It actually looks OK in hardware with trilinear interpolation, but I'd guess it would look awful in software.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
How about some volumetric fog first?
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
-

dreadlorde - Posts: 268
- Joined: Tue Nov 24, 2009 2:20 am
For volumetric fog you really need to start putting entities into your map so that you can define which surfaces are fogged. Then I'd guess that you need to change mnode_t::contents and mleaf_t::contents so that they can take bitwise values instead of their current single values, and |= them with CONTENTS_FOG in your BSP compiler. Oh, and also update the BSP compiler so that it won't explode when you do this. And define a func_fog entity that sets the fog parameters correctly.
Whee, such fun!
Whee, such fun!
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
mh wrote:For volumetric fog you really need to start putting entities into your map so that you can define which surfaces are fogged. Then I'd guess that you need to change mnode_t::contents and mleaf_t::contents so that they can take bitwise values instead of their current single values, and |= them with CONTENTS_FOG in your BSP compiler. Oh, and also update the BSP compiler so that it won't explode when you do this. And define a func_fog entity that sets the fog parameters correctly.
you can't do volumetric fog with just contents, it makes no sense. you need to consider the fog plane, and which fog region to use, rather than a simple 'its fogged' flag.
Q3bsp has a list of fog regions, and each surface can be in at most one fog region. Meaning each surface is fogged based upon its distance from the view, and its distance from the fog plane (if its on the other side of it from the view). So for q3 its 'just' an extra pass with special texture coords, drawn after each mesh (drawnormal(); if (surf->fog) {glColor4f(surf->fog->colour);updatetexcoords();drawindicies();}, basically). Keeps it simple.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
29 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest


