Fog

This page uses sample data to describe basic settings for fogs.

Fogs are set on the scene environment Properties panel of CreativeStudio.

The scene environment can set lights, fogs and cameras for each of several materials in a scene.

Note: Fog is a feature for blending a fog color with a fragment color depending on the distance from the camera. This can be used to express haziness in distant scenery.
Fog color is made to change based on the distance from the camera based on depth values representing depth information.

The following two methods can be used to create fog.

Loading sample data

Use CreativeStudio to load the ToyBook sample data prepared in the following folder.

" %NW4C_ROOT%/SampleData/Graphics/Intermediate/ManualResource/TutorialToyBook/ToyBook.cres "

ToyBook uses a fog that uses the depth buffer.

In addition, created fogs are reflected in materials using fog settings found on the scene environment Properties panel.

Fog has been set for the following node in the loaded ToyBook sample data.

Fog Image 01

Checking Material Settings

Use of fog has been enabled for the Tree node in ToyBook on the material Properties panel.

Select Tree in the Contents panel to open the material Properties panel.

Fog Image 02

Check the fog settings under General on the material Properties panel.

Fog Image 03

The Enable fog checkbox should be selected and the Fog number should be 0.

Fog number represents the number set for the fog on the scene environment Properties panel.

Note that if the Enable fog checkbox is not selected, fog settings will not be applied.

Fog Settings

This section describes how to actually create a new fog that uses the depth buffer and how to set it for Toy_Book on the scene environment Properties panel.

Creating a Fog That Uses the Depth Buffer

On the CreativeStudio menu, select Create > Fog to create a new fog.

FogCtr2 is created on the Contents panel.

Setting Fog Parameters

Select FogCtr2 displayed in the Contents panel to open the fog Properties panel.

Here, we will change the fog color to make changes due to fog in the sample data easier to see.

Note: Left-clicking on the color thumbnail displays a Color Picker pop-up that allows you to set the color.

Fog Image 04

Settings other than fog color are all the same as those used in the sample data.

For details on settings on the fog Properties panel, click Here.

Setting the Created Fog on the Scene Environment Panel

This section describes how to set the fog created on the fog Properties panel on the scene environment Properties panel and apply it to a material.

Select SceneEnvironment1 displayed in the Contents panel to open the scene environment Properties panel.

Fog Image 05

The originally configured FogCtr1 is displayed on the scene environment Properties panel.

Add the newly FogCtr2 here.

Clicking the Add button under Fog settings displays the Add fog dialog box.

Fog Image 06

The number displayed is an automatically selected serial number. This number can be changed freely.

Here, leave the number unchanged.

Use the Fog pull-down menu and select FogCtr2.

Fog Image 07

Select FogCtr2 and press OK. The newly created fog will be added to the scene environment Properties panel.

Fog Image 08

Now, fog settings made on the scene environment Properties panel can be applied to the material.

Applying the Created Fog to a Material

Here, we will apply the fog (FogCtr2) set on the scene environment Properties panel to a material.

Since we are setting the fog to Tree of ToyBook, select the Tree material on the Contents panel.

Fog Image 02

The material Properties panel will appear when Tree is selected. Change the Fog number under General to 1.

Fog Image 09

The fog currently set will change to FogCtr2 once Fog number is changed to 1. Confirm that the fog color changes on the Preview panel.

Fog Image 10

This technique can be applied to create various different fogs ahead of time, allowing the fog settings for each material to be easily changed.

In addition, a multitude of fog settings can be easily shared within a project using sharing.


CONFIDENTIAL