PDA

View Full Version : Good fog tutorial



Johnny
08-14-2006, 01:30 PM
can anyone recommend a good fog tutorial? I'm sort of fooling around with it, trying to learn if I can get what I want before the ice caps melt completely..

MAN, does fog ever take the juice!




skp

avkills
08-14-2006, 01:59 PM
Well, with ray marcher fog you might as well borrow Pixar's renderfarm to render it. ;)

The latest lighting challenge at cgsociety is a pretty good challenge to learn about fog; ie it is a underwater scene and the use of several fog methods plus particles are needed to really "pull it off".

I know you can get some interesting effects by using Fog and the textured environments.

I have not had a chance to mess with the new Fog in LW9 yet.

-mark

colkai
08-15-2006, 03:34 AM
Nine times out of ten, if you want ground fog, you're better off faking it, otherwise it's just soooo slooooww.

There is a 3rd party plugin, but I haven't tested it for speed.
Also, it may, or may not, work with LW9

http://www.flay.com/GetDetail.cfm?ID=310 - GD Fog Shader
http://www.flay.com/GetDetail.cfm?ID=1259 - GroundFog

Johnny
08-15-2006, 07:54 AM
as far as "faking it" is concerned, what ways are those?

fog plugs seem to be for the PC side only.....I was wondering if setting up low-altitude clouds at a height of a meter or so would get me what I need, but something tells me it isn't the same kind of thing....




J

colkai
08-15-2006, 08:37 AM
Nope, way back in the day (LW5.6) Steamer was the biz for doing groundfog.

Another way was/is the same idea behind grass 'clipvoxels', several planes with various turbulence / fractal noise textures on transparency etc.. grouped and vibrated up/down left/right. Mixed with motion blur, this gives a passable ground fog. As to whether it is faster these days than the groundfog in LW I dunno.

Johnny
08-15-2006, 08:40 AM
can these methods be achieved in LW 8.5? if so, know of any tutorials on it?

thank you!

J

Dave Jerrard
08-16-2006, 01:26 PM
I avoid the Ground Fog plugin at all costs. The render time hit isn't worth the results. First of all, there is absolutely no way to prevent this fog from casting shadows on everything when you're using the Ray Marcher mode. This means, that (in the classic camera and 8.5 or earlier) geometry, which will likely be buried in it will render painfully slow, and then be covered up later by the fog, which also renders excruciatingly slow. Until this thing gets worked out to allow shadowing options, and hopefully faster rendering, I'll pass on it.

Instead, I use other options which give me a bit more control. One method is to use flattened HyperVoxel volumes. One large HyperVoxel applied to a null will give your similar results to the Ground Fog plugin, but with the control to limit it to certain areas, and with more texturing abilities. And you can have it turn off its shadows.

Another method I've used inthe past is to use a volumetric light. Placing a Distant Light in the scene, at ground level and pointing up, and then activating its volumetrics will create a cylinder of V-light fog. Make the diameter of it really large, and you have a nice pool of ground fog. Use the light's Height setting to control how deep the fog is. You can get some pretty nice fog effects with this trick, and they can render pretty quick. You can exclude the light from all objects so it doesn't have any other effect in the scene other than to provide a fog patch. V-lights also give a better, wispier type of fog, but with a bit of parameter exaggeration, they can be really dense too.

He Who Suspects He'll Be Posting An Example Or Two Of This.

avkills
08-16-2006, 01:31 PM
That is a good idea Dave. Not only that, you could add in a texture to make it non-uniform.

-mark

Johnny
08-16-2006, 01:35 PM
yes, a good idea worth trying..

thank you!


J

colkai
08-16-2006, 01:42 PM
Hehe, Dave Jerrard giving a good texturing idea, who'da thunk it? ;) :p

Still, I do get misty-eyed for Steamer at times. :)

Johnny
08-16-2006, 02:36 PM
OK..maybe I'm not looking at this right...the fog I'm getting is all black..I don't have black anything in this Vlight (I have white, pink, green, just so I can see the effect of what I'm doing)

but the "fog" is all black...is there some box I'm not checking, or something stupid I'm not thinking about ?


thanks!

J

Dave Jerrard
08-16-2006, 05:07 PM
Here's my favorite test object again, this time in fog...

35966

And full of fog...

35965

In both cases, the fog was created with a distant light pointing straight up, centered at the base of the teapot. In the first image, the radius was 1 meter and the height was 12cm - just slightly less than the height of the teapot with the lid on it. Luminosity was set to 100%, Opacity at 200%, and Density set to 1000%. I had no attenuation applied. I'm using Texture Only, and I have a Value texture that falls off vertically at 1000% per meter, or 100% over 10 cm. On top of that I have a turbulence texture with Additive blending. This gives the fog a denser base, that gives way to a cloudy textured look at the top.

The second image is the same settings, but with two changes. The radius was reduced to 65mm, so the volumetric cylinder is the same width as the opening in the tea pot, and the height was increased to 15cm so the fog appears more like steam rising.These settings work fine for this scale, but would be a bit too dense for a typical outdoor scene. In those cases, the Density and Opacity would need to be lowered (probably quite a bit) in order to look right.

He Who Doesn't Even Want To Consider Rendering This With Ground Fog.

Dave Jerrard
08-16-2006, 06:09 PM
Well, I lost my capacity for rational thought and gave the Ground Fog's Ray Marcher a shot on that same scene. After 20 minutes, using the lowest quality, I saw a total of 1.3 of a line rendered. Actually, I saw FOUR pixels rendered on that line, where the tea pot was starting to be rendered. The ground was black because it was entirely in shadow from the fog, which wasn't being displayed yet. A word of advice. Don't try this fog with shadow casting area lights. Ouch!


He Who Didn't Feel Like Waiting Several Months For That To Finish Rendering.

Red_Oddity
08-17-2006, 03:23 AM
...we usually use what Jerrard said...
Another thing we use a lot, but is not going to help you right now, is Maya's Hardware Render Buffer, really handy and very fast (and silly enough the only way to get particles rendered in Maya by the way), i'd love to see something like this in LW (and no, Pixiedust is still too limited to be off any real use, but it's getting there, if development hasn't all of a sudden stopped on that one)

Johnny
08-17-2006, 07:34 AM
Here's my favorite test object again, this time in fog...



Nice...



J

Johnny
08-21-2006, 02:27 PM
Hey dave..just wanted to thank you for that tip/idea..
I've been messing with it and varying the parameters which are keyframable and getting some mighty nice results without huge render times.

big help!


J