2 registered members (Ayumi, 1 invisible),
584
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Fog Problems
#70401
04/10/06 18:24
04/10/06 18:24
|
Joined: Feb 2005
Posts: 254 Colorado, USA
Spaz
OP
Member
|
OP
Member
Joined: Feb 2005
Posts: 254
Colorado, USA
|
When I add fog to my level, it looks like it kind of chunks out in a triangular pattern. I'm assuming the triangles match up with those of the terrain mesh, but what causes this? How can I get a nice, smooth fog? Is it something with code, or is it simply a monitor setting? Right now my monitor is set to 800x600 (though I've tried 1024x768 and that didn't make any difference), 32-bit color. I've got an nVidia GeForce 6600 GT graphics card running on an AMD Athlon 64 Processor with Windows XP. Also, is it possible with fog or some other method to get an effect like depth-of-field like you can with a camera, where things far away are blurrier than things up close? My level uses lod, but that doesn't really seem to do it. The problem is that as soon as trees or something come within the clip range, they appear instantly, rather than kind of fading in. Thanks for any help, Spaz
Using Professional Version 6.31.4
|
|
|
Re: Fog Problems
[Re: Spaz]
#70402
04/11/06 00:00
04/11/06 00:00
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
Are you using a shader for fog or are you using camera.fog_start and the related? Use camera.fog_start to get fog that works better. Either that or use volumetric fog (use a model with transparency and a grid-like pattern (and set it as passable) to do this.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Fog Problems
[Re: ulillillia]
#70403
04/11/06 14:19
04/11/06 14:19
|
Joined: Feb 2005
Posts: 254 Colorado, USA
Spaz
OP
Member
|
OP
Member
Joined: Feb 2005
Posts: 254
Colorado, USA
|
I'm using camera.fog_start. . . mostly because I don't know a thing about shaders . Can you explain the volumetric fog thing a little more and maybe show an example of the grid-like pattern you're talking about? Do you just place the model right in front of your camera? How about having trees and things gradually show up in the distance rather than just popping up on screen once in the clip range? Should I do some sort of transparency fade? Or would it look more realistic to change their scale based on distance like they do in Doom? Thanks, Spaz
|
|
|
Re: Fog Problems
[Re: Spaz]
#70404
04/12/06 13:20
04/12/06 13:20
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
I don't have such a model. How you use the volumetric fog depends on what your level has. For underwater, it needs to be more dense, but for air near the ground, it needs to be less dense and very high up (on the order of miles), it's nearly absent. Want me to make a quick sample model so you can see the structure? I'll be using something similar for my 3D game's water.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
Re: Fog Problems
[Re: Spaz]
#70406
04/13/06 06:25
04/13/06 06:25
|
Joined: Feb 2003
Posts: 6,818 Minot, North Dakota, USA
ulillillia
Senior Expert
|
Senior Expert
Joined: Feb 2003
Posts: 6,818
Minot, North Dakota, USA
|
Here's the model (ZIP file) that demonstrates it. This fog is rather dense though but is great for water. For air, have the grids spaced 8 times further apart (instead of 128, have it more around 512 or 1024). For sufficient testing, use this code and set the skills 1 through 4 in WED to set the color and alpha. Setting the alpha to 1% seems to be the best. Code:
material volume_fog { ambient_red = 255; ambient_green = 255; ambient_blue = 255; }
action gridfog { my.material = volume_fog; my.passable = on; my.transparent = on; volume_fog.ambient_red = my.skill1; volume_fog.ambient_green = my.skill2; volume_fog.ambient_blue = my.skill3; my.alpha = my.skill4; wait(1); // registers the above my.dynamic = off; // doesn't need to be dynamic }
This is only a small sample though. If make the cube 2048x2048x2048 instead, twice the size on each dimension, you only need 8 times as many polygons.
"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip
My 2D game - release on Jun 13th; My tutorials
|
|
|
|