Making for with turbidity

Helpdesk Real 3D Main area

Using Turbidity is a great way of making fog simulations with Real 3D. What many probably have a problem with, is the fact that the effect of turbidity depends on the size of the scene using the fog. The same amount of turbidity will produce different results depending on the size of the scene. Because of this you would often set the turbidity slider to 1 (to minimize the effect) and turbid saturation to 100 (to make it very depth sensitive), but the results would still not look good because the turbid level is way to high, even when set to 1. But since the turbidity is a floating point value it is possible to get even smaller values by setting the scope handler to formula and write tu=0.15 in the expression field.

Do you start to see the possibilities here? By using this technique you can set the turbidity level by various means. To simulate a foggy room, this would be the way to do it. However, fog is a lot more than this. Consider haze instead; it is a foggy kind of behaviour that increases greatly with distance. Close to the camera there would be no haze at all, but far away it would get very foggy. Also consider that fog is often gasious 'phenomena' that is heavier than air (as it is made of waterdrops) and thus the fog will be denser close to the ground.

Here is a method of how to make 'normal', even distributed fog:

Here is a way of how to make 'haze', distance distributed fog:

Change the scope handler formula of the above example to tu=relx. Remember that relx of a parallell map is the same as a normalized lenght of the x axis of the map, meaning that the first point is zero, and the second point is one. Assign this material from a top view, click the first point close to the camera (zero meaning there will be no fog at all), and the second point where you want the fog to reach its maximum value.

Here is a way of how to make 'gasious fog', distributed with height:

Well, this one should be pretty obvious if you got the right results with the above method. Just rotate the mapping primitive in such a way that the first point (relx=zero) is located at the top of the room, and the second point (relz=one) on the bottom. You have now made a simulation of a foggy gas that is heavier than air. To make it like smoke (lighter than air), just mirror the mapping primitive to switch the points.

Some points about the above methods

Below are some examples of different kind of fogs. It is an old 'barscene' of mine but it was never quite finished, so there are a lot of stuff missing.

Examples of fogmaterials with different scope

Foggyless NormalFog FloatingFog
Fig. 1. No fog, just the basic scene Fig. 2. tu=1, this produces way to much fog Fig. 3. tu=0.15, so this is starting to look better
Falloff Squared Noised
Fig. 4. Fog with falloff, denser fog at bottom Fig. 5. Squared falloff, more rapidly denser Fig. 6. Here noise have been added. See note above

As you can see from these pictures this method of making an object shine is quite useful and powerful. I will recommend to make separate textures which is going to be used as specularity maps because you can add inn some noise (speckle) to give he impression of a wethered material. Also the rendering will be faster if the map doesn't need any additional scaling with the formulae. Remember that if you have additional materials (color, bump etc.) assigned to the object, you will need to change the 'redefine reflected' setting in the extras part of the material for each material to the same. The reason is that this information is always mixed. So setting white in one and nothing in the other (if using two materials) would result in a 'redefine reflected' which is grey.

Helpdesk Real 3D Main area